File tree Expand file tree Collapse file tree 3 files changed +10
-9
lines changed
lib/rspec_api_documentation/views
templates/rspec_api_documentation Expand file tree Collapse file tree 3 files changed +10
-9
lines changed Original file line number Diff line number Diff line change 1
1
module RspecApiDocumentation
2
2
module Views
3
3
class ApiBlueprintExample < MarkupExample
4
- TOTAL_SPACES_INDENTATION = 8 . freeze
4
+ TOTAL_SPACES_INDENTATION = 12 . freeze
5
5
6
6
def initialize ( example , configuration )
7
7
super
Original file line number Diff line number Diff line change 59
59
60
60
context 'when charset=utf-8 is present' do
61
61
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"
63
63
end
64
64
end
65
65
66
66
context 'when charset=utf-16 is present' do
67
67
let ( :content_type ) { "application/json; charset=utf-16" }
68
68
69
69
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"
71
71
end
72
72
end
73
73
end
95
95
96
96
context 'when charset=utf-8 is present' do
97
97
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"
99
99
end
100
100
end
101
101
102
102
context 'when charset=utf-16 is present' do
103
103
let ( :content_type ) { "application/json; charset=utf-16" }
104
104
105
105
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"
107
107
end
108
108
end
109
109
end
Original file line number Diff line number Diff line change 1
1
FORMAT: 1A
2
+ # { { api_name } }
2
3
{ {# sections } }
3
4
4
5
# Group { { resource_name } }
@@ -48,13 +49,13 @@ explanation: {{ explanation }}
48
49
49
50
+ Headers
50
51
51
- { {{ request_headers_text } }}
52
+ { {{ request_headers_text } }}
52
53
{ {/ request_headers_text } }
53
54
{ {# request_body } }
54
55
55
56
+ Body
56
57
57
- { {{ request_body } }}
58
+ { {{ request_body } }}
58
59
{ {/ request_body } }
59
60
{ {# has_response? } }
60
61
@@ -64,13 +65,13 @@ explanation: {{ explanation }}
64
65
65
66
+ Headers
66
67
67
- { {{ response_headers_text } }}
68
+ { {{ response_headers_text } }}
68
69
{ {/ response_headers_text } }
69
70
{ {# response_body } }
70
71
71
72
+ Body
72
73
73
- { {{ response_body } }}
74
+ { {{ response_body } }}
74
75
{ {/ response_body } }
75
76
{ {/ requests } }
76
77
{ {/ examples } }
You can’t perform that action at this time.
0 commit comments