Skip to content

Commit aee3bc0

Browse files
committed
1 parent 95fe538 commit aee3bc0

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

lib/rspec_api_documentation/views/api_blueprint_example.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module RspecApiDocumentation
22
module Views
33
class ApiBlueprintExample < MarkupExample
4-
TOTAL_SPACES_INDENTATION = 8.freeze
4+
TOTAL_SPACES_INDENTATION = 12.freeze
55

66
def initialize(example, configuration)
77
super

spec/views/api_blueprint_example_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,15 +59,15 @@
5959

6060
context 'when charset=utf-8 is present' do
6161
it "just strips that because it's the default for json" do
62-
expect(subject).to eq "Content-Type: application/json\n Another: header; charset=utf-8"
62+
expect(subject).to eq "Content-Type: application/json\n Another: header; charset=utf-8"
6363
end
6464
end
6565

6666
context 'when charset=utf-16 is present' do
6767
let(:content_type) { "application/json; charset=utf-16" }
6868

6969
it "keeps that because it's NOT the default for json" do
70-
expect(subject).to eq "Content-Type: application/json; charset=utf-16\n Another: header; charset=utf-8"
70+
expect(subject).to eq "Content-Type: application/json; charset=utf-16\n Another: header; charset=utf-8"
7171
end
7272
end
7373
end
@@ -95,15 +95,15 @@
9595

9696
context 'when charset=utf-8 is present' do
9797
it "just strips that because it's the default for json" do
98-
expect(subject).to eq "Content-Type: application/json\n Another: header; charset=utf-8"
98+
expect(subject).to eq "Content-Type: application/json\n Another: header; charset=utf-8"
9999
end
100100
end
101101

102102
context 'when charset=utf-16 is present' do
103103
let(:content_type) { "application/json; charset=utf-16" }
104104

105105
it "keeps that because it's NOT the default for json" do
106-
expect(subject).to eq "Content-Type: application/json; charset=utf-16\n Another: header; charset=utf-8"
106+
expect(subject).to eq "Content-Type: application/json; charset=utf-16\n Another: header; charset=utf-8"
107107
end
108108
end
109109
end

templates/rspec_api_documentation/api_blueprint_index.mustache

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
FORMAT: 1A
2+
# {{ api_name }}
23
{{# sections }}
34

45
# Group {{ resource_name }}
@@ -48,13 +49,13 @@ explanation: {{ explanation }}
4849

4950
+ Headers
5051

51-
{{{ request_headers_text }}}
52+
{{{ request_headers_text }}}
5253
{{/ request_headers_text }}
5354
{{# request_body }}
5455

5556
+ Body
5657

57-
{{{ request_body }}}
58+
{{{ request_body }}}
5859
{{/ request_body }}
5960
{{# has_response? }}
6061

@@ -64,13 +65,13 @@ explanation: {{ explanation }}
6465

6566
+ Headers
6667

67-
{{{ response_headers_text }}}
68+
{{{ response_headers_text }}}
6869
{{/ response_headers_text }}
6970
{{# response_body }}
7071

7172
+ Body
7273

73-
{{{ response_body }}}
74+
{{{ response_body }}}
7475
{{/ response_body }}
7576
{{/ requests }}
7677
{{/ examples }}

0 commit comments

Comments
 (0)