rspec_api_documentation 4.9.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/rspec_api_documentation/api_documentation.rb +2 -0
- data/lib/rspec_api_documentation/client_base.rb +8 -8
- data/lib/rspec_api_documentation/configuration.rb +12 -1
- data/lib/rspec_api_documentation/curl.rb +7 -2
- data/lib/rspec_api_documentation/dsl/endpoint/params.rb +19 -3
- data/lib/rspec_api_documentation/dsl/endpoint/set_param.rb +18 -5
- data/lib/rspec_api_documentation/dsl/endpoint.rb +44 -2
- data/lib/rspec_api_documentation/dsl/resource.rb +48 -1
- data/lib/rspec_api_documentation/dsl.rb +1 -1
- data/lib/rspec_api_documentation/example.rb +4 -0
- data/lib/rspec_api_documentation/open_api/contact.rb +9 -0
- data/lib/rspec_api_documentation/open_api/example.rb +7 -0
- data/lib/rspec_api_documentation/open_api/header.rb +12 -0
- data/lib/rspec_api_documentation/open_api/headers.rb +7 -0
- data/lib/rspec_api_documentation/open_api/helper.rb +29 -0
- data/lib/rspec_api_documentation/open_api/info.rb +12 -0
- data/lib/rspec_api_documentation/open_api/license.rb +8 -0
- data/lib/rspec_api_documentation/open_api/node.rb +112 -0
- data/lib/rspec_api_documentation/open_api/operation.rb +18 -0
- data/lib/rspec_api_documentation/open_api/parameter.rb +33 -0
- data/lib/rspec_api_documentation/open_api/path.rb +13 -0
- data/lib/rspec_api_documentation/open_api/paths.rb +7 -0
- data/lib/rspec_api_documentation/open_api/response.rb +10 -0
- data/lib/rspec_api_documentation/open_api/responses.rb +9 -0
- data/lib/rspec_api_documentation/open_api/root.rb +21 -0
- data/lib/rspec_api_documentation/open_api/schema.rb +15 -0
- data/lib/rspec_api_documentation/open_api/security_definitions.rb +7 -0
- data/lib/rspec_api_documentation/open_api/security_schema.rb +14 -0
- data/lib/rspec_api_documentation/open_api/tag.rb +9 -0
- data/lib/rspec_api_documentation/railtie.rb +1 -1
- data/lib/rspec_api_documentation/views/api_blueprint_example.rb +116 -0
- data/lib/rspec_api_documentation/views/api_blueprint_index.rb +105 -0
- data/lib/rspec_api_documentation/views/markdown_example.rb +1 -1
- data/lib/rspec_api_documentation/views/markup_example.rb +12 -3
- data/lib/rspec_api_documentation/views/markup_index.rb +2 -4
- data/lib/rspec_api_documentation/views/slate_index.rb +4 -0
- data/lib/rspec_api_documentation/writers/api_blueprint_writer.rb +29 -0
- data/lib/rspec_api_documentation/writers/combined_json_writer.rb +1 -1
- data/lib/rspec_api_documentation/writers/general_markup_writer.rb +20 -7
- data/lib/rspec_api_documentation/writers/json_iodocs_writer.rb +3 -2
- data/lib/rspec_api_documentation/writers/json_writer.rb +10 -6
- data/lib/rspec_api_documentation/writers/markdown_writer.rb +1 -1
- data/lib/rspec_api_documentation/writers/open_api_writer.rb +244 -0
- data/lib/rspec_api_documentation/writers/slate_writer.rb +2 -8
- data/lib/rspec_api_documentation.rb +29 -0
- data/templates/rspec_api_documentation/api_blueprint_index.mustache +80 -0
- data/templates/rspec_api_documentation/html_index.mustache +1 -1
- data/templates/rspec_api_documentation/markdown_example.mustache +4 -3
- data/templates/rspec_api_documentation/markdown_index.mustache +1 -0
- data/templates/rspec_api_documentation/slate_example.mustache +2 -2
- data/templates/rspec_api_documentation/slate_index.mustache +8 -0
- data/templates/rspec_api_documentation/textile_index.mustache +1 -0
- metadata +61 -3
@@ -0,0 +1,244 @@
|
|
1
|
+
require 'rspec_api_documentation/writers/formatter'
|
2
|
+
require 'yaml'
|
3
|
+
|
4
|
+
module RspecApiDocumentation
|
5
|
+
module Writers
|
6
|
+
class OpenApiWriter < Writer
|
7
|
+
FILENAME = 'open_api'
|
8
|
+
|
9
|
+
delegate :docs_dir, :configurations_dir, to: :configuration
|
10
|
+
|
11
|
+
def write
|
12
|
+
File.open(docs_dir.join("#{FILENAME}.json"), 'w+') do |f|
|
13
|
+
f.write Formatter.to_json(OpenApiIndex.new(index, configuration, load_config))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def load_config
|
20
|
+
return JSON.parse(File.read("#{configurations_dir}/open_api.json")) if File.exist?("#{configurations_dir}/open_api.json")
|
21
|
+
YAML.load_file("#{configurations_dir}/open_api.yml") if File.exist?("#{configurations_dir}/open_api.yml")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
class OpenApiIndex
|
26
|
+
attr_reader :index, :configuration, :init_config
|
27
|
+
|
28
|
+
def initialize(index, configuration, init_config)
|
29
|
+
@index = index
|
30
|
+
@configuration = configuration
|
31
|
+
@init_config = init_config
|
32
|
+
end
|
33
|
+
|
34
|
+
def as_json
|
35
|
+
@specs = OpenApi::Root.new(init_config)
|
36
|
+
add_tags!
|
37
|
+
add_paths!
|
38
|
+
add_security_definitions!
|
39
|
+
specs.as_json
|
40
|
+
end
|
41
|
+
|
42
|
+
private
|
43
|
+
|
44
|
+
attr_reader :specs
|
45
|
+
|
46
|
+
def examples
|
47
|
+
index.examples.map { |example| OpenApiExample.new(example) }
|
48
|
+
end
|
49
|
+
|
50
|
+
def add_security_definitions!
|
51
|
+
security_definitions = OpenApi::SecurityDefinitions.new
|
52
|
+
|
53
|
+
arr = examples.map do |example|
|
54
|
+
example.respond_to?(:authentications) ? example.authentications : nil
|
55
|
+
end.compact
|
56
|
+
|
57
|
+
arr.each do |securities|
|
58
|
+
securities.each do |security, opts|
|
59
|
+
schema = OpenApi::SecuritySchema.new(
|
60
|
+
name: opts[:name],
|
61
|
+
description: opts[:description],
|
62
|
+
type: opts[:type],
|
63
|
+
in: opts[:in]
|
64
|
+
)
|
65
|
+
security_definitions.add_setting security, :value => schema
|
66
|
+
end
|
67
|
+
end
|
68
|
+
specs.securityDefinitions = security_definitions unless arr.empty?
|
69
|
+
end
|
70
|
+
|
71
|
+
def add_tags!
|
72
|
+
tags = {}
|
73
|
+
examples.each do |example|
|
74
|
+
tags[example.resource_name] ||= example.resource_explanation
|
75
|
+
end
|
76
|
+
specs.safe_assign_setting(:tags, [])
|
77
|
+
tags.each do |name, desc|
|
78
|
+
specs.tags << OpenApi::Tag.new(name: name, description: desc) unless specs.tags.any? { |tag| tag.name == name }
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
def add_paths!
|
83
|
+
specs.safe_assign_setting(:paths, OpenApi::Paths.new)
|
84
|
+
examples.each do |example|
|
85
|
+
specs.paths.add_setting example.route, :value => OpenApi::Path.new
|
86
|
+
|
87
|
+
operation = specs.paths.setting(example.route).setting(example.http_method) || OpenApi::Operation.new
|
88
|
+
|
89
|
+
operation.safe_assign_setting(:tags, [example.resource_name])
|
90
|
+
operation.safe_assign_setting(:summary, example.respond_to?(:route_summary) ? example.route_summary : '')
|
91
|
+
operation.safe_assign_setting(:description, example.respond_to?(:route_description) ? example.route_description : '')
|
92
|
+
operation.safe_assign_setting(:responses, OpenApi::Responses.new)
|
93
|
+
operation.safe_assign_setting(:parameters, extract_parameters(example))
|
94
|
+
operation.safe_assign_setting(:consumes, example.requests.map { |request| request[:request_content_type] }.compact.map { |q| q[/[^;]+/] })
|
95
|
+
operation.safe_assign_setting(:produces, example.requests.map { |request| request[:response_content_type] }.compact.map { |q| q[/[^;]+/] })
|
96
|
+
operation.safe_assign_setting(:security, example.respond_to?(:authentications) ? example.authentications.map { |(k, _)| {k => []} } : [])
|
97
|
+
|
98
|
+
process_responses(operation.responses, example)
|
99
|
+
|
100
|
+
specs.paths.setting(example.route).assign_setting(example.http_method, operation)
|
101
|
+
end
|
102
|
+
end
|
103
|
+
|
104
|
+
def process_responses(responses, example)
|
105
|
+
schema = extract_schema(example.respond_to?(:response_fields) ? example.response_fields : [])
|
106
|
+
example.requests.each do |request|
|
107
|
+
response = OpenApi::Response.new(
|
108
|
+
description: example.description,
|
109
|
+
schema: schema
|
110
|
+
)
|
111
|
+
|
112
|
+
if request[:response_headers]
|
113
|
+
response.safe_assign_setting(:headers, OpenApi::Headers.new)
|
114
|
+
request[:response_headers].each do |header, value|
|
115
|
+
response.headers.add_setting header, :value => OpenApi::Header.new('x-example-value' => value)
|
116
|
+
end
|
117
|
+
end
|
118
|
+
|
119
|
+
if /\A(?<response_content_type>[^;]+)/ =~ request[:response_content_type]
|
120
|
+
response.safe_assign_setting(:examples, OpenApi::Example.new)
|
121
|
+
response_body = JSON.parse(request[:response_body]) rescue nil
|
122
|
+
response.examples.add_setting response_content_type, :value => response_body
|
123
|
+
end
|
124
|
+
responses.add_setting "#{request[:response_status]}", :value => response
|
125
|
+
end
|
126
|
+
end
|
127
|
+
|
128
|
+
def extract_schema(fields)
|
129
|
+
schema = {type: 'object', properties: {}}
|
130
|
+
|
131
|
+
fields.each do |field|
|
132
|
+
current = schema
|
133
|
+
if field[:scope]
|
134
|
+
[*field[:scope]].each do |scope|
|
135
|
+
current[:properties][scope] ||= {type: 'object', properties: {}}
|
136
|
+
current = current[:properties][scope]
|
137
|
+
end
|
138
|
+
end
|
139
|
+
current[:properties][field[:name]] = {type: field[:type] || OpenApi::Helper.extract_type(field[:value])}
|
140
|
+
current[:properties][field[:name]][:example] = field[:value] if field[:value] && field[:with_example]
|
141
|
+
current[:properties][field[:name]][:default] = field[:default] if field[:default]
|
142
|
+
current[:properties][field[:name]][:description] = field[:description] if field[:description]
|
143
|
+
|
144
|
+
opts = {enum: field[:enum], minimum: field[:minimum], maximum: field[:maximum]}
|
145
|
+
|
146
|
+
if current[:properties][field[:name]][:type] == :array
|
147
|
+
current[:properties][field[:name]][:items] = field[:items] || OpenApi::Helper.extract_items(field[:value][0], opts)
|
148
|
+
else
|
149
|
+
opts.each { |k, v| current[:properties][field[:name]][k] = v if v }
|
150
|
+
end
|
151
|
+
|
152
|
+
current[:required] ||= [] << field[:name] if field[:required]
|
153
|
+
end
|
154
|
+
|
155
|
+
OpenApi::Schema.new(schema)
|
156
|
+
end
|
157
|
+
|
158
|
+
def extract_parameters(example)
|
159
|
+
extract_known_parameters(example.extended_parameters.select { |p| !p[:in].nil? }) +
|
160
|
+
extract_unknown_parameters(example, example.extended_parameters.select { |p| p[:in].nil? })
|
161
|
+
end
|
162
|
+
|
163
|
+
def extract_parameter(opts)
|
164
|
+
OpenApi::Parameter.new(
|
165
|
+
name: opts[:name],
|
166
|
+
in: opts[:in],
|
167
|
+
description: opts[:description],
|
168
|
+
required: opts[:required],
|
169
|
+
type: opts[:type] || OpenApi::Helper.extract_type(opts[:value]),
|
170
|
+
value: opts[:value],
|
171
|
+
with_example: opts[:with_example],
|
172
|
+
default: opts[:default],
|
173
|
+
).tap do |elem|
|
174
|
+
if elem.type == :array
|
175
|
+
elem.items = opts[:items] || OpenApi::Helper.extract_items(opts[:value][0], { minimum: opts[:minimum], maximum: opts[:maximum], enum: opts[:enum] })
|
176
|
+
else
|
177
|
+
elem.minimum = opts[:minimum]
|
178
|
+
elem.maximum = opts[:maximum]
|
179
|
+
elem.enum = opts[:enum]
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
184
|
+
def extract_unknown_parameters(example, parameters)
|
185
|
+
if example.http_method == :get
|
186
|
+
parameters.map { |parameter| extract_parameter(parameter.merge(in: :query)) }
|
187
|
+
elsif parameters.any? { |parameter| !parameter[:scope].nil? }
|
188
|
+
[OpenApi::Parameter.new(
|
189
|
+
name: :body,
|
190
|
+
in: :body,
|
191
|
+
description: '',
|
192
|
+
schema: extract_schema(parameters)
|
193
|
+
)]
|
194
|
+
else
|
195
|
+
parameters.map { |parameter| extract_parameter(parameter.merge(in: :formData)) }
|
196
|
+
end
|
197
|
+
end
|
198
|
+
|
199
|
+
def extract_known_parameters(parameters)
|
200
|
+
result = parameters.select { |parameter| %w(query path header formData).include?(parameter[:in].to_s) }
|
201
|
+
.map { |parameter| extract_parameter(parameter) }
|
202
|
+
|
203
|
+
body = parameters.select { |parameter| %w(body).include?(parameter[:in].to_s) }
|
204
|
+
|
205
|
+
result.unshift(
|
206
|
+
OpenApi::Parameter.new(
|
207
|
+
name: :body,
|
208
|
+
in: :body,
|
209
|
+
description: '',
|
210
|
+
schema: extract_schema(body)
|
211
|
+
)
|
212
|
+
) unless body.empty?
|
213
|
+
|
214
|
+
result
|
215
|
+
end
|
216
|
+
end
|
217
|
+
|
218
|
+
class OpenApiExample
|
219
|
+
def initialize(example)
|
220
|
+
@example = example
|
221
|
+
end
|
222
|
+
|
223
|
+
def method_missing(method, *args, &block)
|
224
|
+
@example.send(method, *args, &block)
|
225
|
+
end
|
226
|
+
|
227
|
+
def respond_to?(method, include_private = false)
|
228
|
+
super || @example.respond_to?(method, include_private)
|
229
|
+
end
|
230
|
+
|
231
|
+
def http_method
|
232
|
+
metadata[:method]
|
233
|
+
end
|
234
|
+
|
235
|
+
def requests
|
236
|
+
super.select { |request| request[:request_method].to_s.downcase == http_method.to_s.downcase }
|
237
|
+
end
|
238
|
+
|
239
|
+
def route
|
240
|
+
super.gsub(/:(?<parameter>[^\/]+)/, '{\k<parameter>}')
|
241
|
+
end
|
242
|
+
end
|
243
|
+
end
|
244
|
+
end
|
@@ -21,17 +21,11 @@ module RspecApiDocumentation
|
|
21
21
|
def write
|
22
22
|
File.open(configuration.docs_dir.join("#{FILENAME}.#{extension}"), 'w+') do |file|
|
23
23
|
|
24
|
-
file.write
|
25
|
-
file.write %Q{title: "#{configuration.api_name}"\n}
|
26
|
-
file.write %Q{language_tabs:\n}
|
27
|
-
file.write %Q{ - json: JSON\n}
|
28
|
-
file.write %Q{ - shell: cURL\n}
|
29
|
-
file.write %Q{---\n\n}
|
24
|
+
file.write markup_index_class.new(index, configuration).render
|
30
25
|
|
31
26
|
IndexHelper.sections(index.examples, @configuration).each do |section|
|
32
|
-
|
33
27
|
file.write "# #{section[:resource_name]}\n\n"
|
34
|
-
section[:
|
28
|
+
file.write "#{section[:resource_explanation]}\n\n"
|
35
29
|
|
36
30
|
section[:examples].each do |example|
|
37
31
|
markup_example = markup_example_class.new(example, configuration)
|
@@ -37,6 +37,7 @@ module RspecApiDocumentation
|
|
37
37
|
autoload :HtmlWriter
|
38
38
|
autoload :TextileWriter
|
39
39
|
autoload :MarkdownWriter
|
40
|
+
autoload :JSONWriter
|
40
41
|
autoload :JsonWriter
|
41
42
|
autoload :AppendJsonWriter
|
42
43
|
autoload :JsonIodocsWriter
|
@@ -44,6 +45,32 @@ module RspecApiDocumentation
|
|
44
45
|
autoload :CombinedTextWriter
|
45
46
|
autoload :CombinedJsonWriter
|
46
47
|
autoload :SlateWriter
|
48
|
+
autoload :ApiBlueprintWriter
|
49
|
+
autoload :OpenApiWriter
|
50
|
+
end
|
51
|
+
|
52
|
+
module OpenApi
|
53
|
+
extend ActiveSupport::Autoload
|
54
|
+
|
55
|
+
autoload :Helper
|
56
|
+
autoload :Node
|
57
|
+
autoload :Root
|
58
|
+
autoload :Info
|
59
|
+
autoload :Contact
|
60
|
+
autoload :License
|
61
|
+
autoload :Paths
|
62
|
+
autoload :Path
|
63
|
+
autoload :Tag
|
64
|
+
autoload :Operation
|
65
|
+
autoload :Parameter
|
66
|
+
autoload :Responses
|
67
|
+
autoload :Response
|
68
|
+
autoload :Example
|
69
|
+
autoload :Headers
|
70
|
+
autoload :Header
|
71
|
+
autoload :Schema
|
72
|
+
autoload :SecurityDefinitions
|
73
|
+
autoload :SecuritySchema
|
47
74
|
end
|
48
75
|
|
49
76
|
module Views
|
@@ -59,6 +86,8 @@ module RspecApiDocumentation
|
|
59
86
|
autoload :MarkdownExample
|
60
87
|
autoload :SlateIndex
|
61
88
|
autoload :SlateExample
|
89
|
+
autoload :ApiBlueprintIndex
|
90
|
+
autoload :ApiBlueprintExample
|
62
91
|
end
|
63
92
|
|
64
93
|
def self.configuration
|
@@ -0,0 +1,80 @@
|
|
1
|
+
FORMAT: 1A
|
2
|
+
# {{ api_name }}
|
3
|
+
{{# sections }}
|
4
|
+
|
5
|
+
# Group {{ resource_name }}
|
6
|
+
{{# resource_explanation }}
|
7
|
+
|
8
|
+
{{{ resource_explanation }}}
|
9
|
+
{{/ resource_explanation }}
|
10
|
+
{{# description }}
|
11
|
+
|
12
|
+
{{ description }}
|
13
|
+
{{/ description }}
|
14
|
+
{{# routes }}
|
15
|
+
|
16
|
+
## {{ route_name }} [{{ route }}]
|
17
|
+
{{# description }}
|
18
|
+
|
19
|
+
description: {{ description }}
|
20
|
+
{{/ description }}
|
21
|
+
{{# explanation }}
|
22
|
+
|
23
|
+
explanation: {{ explanation }}
|
24
|
+
{{/ explanation }}
|
25
|
+
{{# has_parameters? }}
|
26
|
+
|
27
|
+
+ Parameters
|
28
|
+
{{# parameters }}
|
29
|
+
+ {{ name }}{{# example }}: {{ example }}{{/ example }}{{# properties_description }} ({{ properties_description }}){{/ properties_description }}{{# description }} - {{ description }}{{/ description }}
|
30
|
+
{{/ parameters }}
|
31
|
+
{{/ has_parameters? }}
|
32
|
+
{{# has_attributes? }}
|
33
|
+
|
34
|
+
+ Attributes (object)
|
35
|
+
{{# attributes }}
|
36
|
+
+ {{ name }}{{# example }}: {{ example }}{{/ example }}{{# properties_description }} ({{ properties_description }}){{/ properties_description }}{{# description }} - {{ description }}{{/ description }}
|
37
|
+
{{/ attributes }}
|
38
|
+
{{/ has_attributes? }}
|
39
|
+
{{# http_methods }}
|
40
|
+
|
41
|
+
### {{ description }} [{{ http_method }}]
|
42
|
+
{{# examples }}
|
43
|
+
{{# requests }}
|
44
|
+
{{# has_request? }}
|
45
|
+
|
46
|
+
+ Request {{ description }}{{# request_content_type }} ({{ request_content_type }}){{/ request_content_type }}
|
47
|
+
{{/ has_request? }}
|
48
|
+
{{# request_headers_text }}
|
49
|
+
|
50
|
+
+ Headers
|
51
|
+
|
52
|
+
{{{ request_headers_text }}}
|
53
|
+
{{/ request_headers_text }}
|
54
|
+
{{# request_body }}
|
55
|
+
|
56
|
+
+ Body
|
57
|
+
|
58
|
+
{{{ request_body }}}
|
59
|
+
{{/ request_body }}
|
60
|
+
{{# has_response? }}
|
61
|
+
|
62
|
+
+ Response {{ response_status }} ({{ response_content_type }})
|
63
|
+
{{/ has_response? }}
|
64
|
+
{{# response_headers_text }}
|
65
|
+
|
66
|
+
+ Headers
|
67
|
+
|
68
|
+
{{{ response_headers_text }}}
|
69
|
+
{{/ response_headers_text }}
|
70
|
+
{{# response_body }}
|
71
|
+
|
72
|
+
+ Body
|
73
|
+
|
74
|
+
{{{ response_body }}}
|
75
|
+
{{/ response_body }}
|
76
|
+
{{/ requests }}
|
77
|
+
{{/ examples }}
|
78
|
+
{{/ http_methods }}
|
79
|
+
{{/ routes }}
|
80
|
+
{{/ sections }}
|
@@ -25,10 +25,11 @@
|
|
25
25
|
{{# has_response_fields? }}
|
26
26
|
|
27
27
|
### Response Fields
|
28
|
-
{{# response_fields }}
|
29
28
|
|
30
|
-
Name
|
31
|
-
|
29
|
+
| Name | Description | Scope |
|
30
|
+
|------|-------------|-------|
|
31
|
+
{{# response_fields }}
|
32
|
+
| {{ name }} | {{ description }} | {{ scope }} |
|
32
33
|
{{/ response_fields }}
|
33
34
|
|
34
35
|
{{/ has_response_fields? }}
|
@@ -9,7 +9,7 @@
|
|
9
9
|
#### Endpoint
|
10
10
|
|
11
11
|
{{# requests}}
|
12
|
-
```
|
12
|
+
```plaintext
|
13
13
|
{{ request_method }} {{ request_path }}
|
14
14
|
{{ request_headers_text }}
|
15
15
|
```
|
@@ -50,7 +50,7 @@ None known.
|
|
50
50
|
|
51
51
|
### Response
|
52
52
|
|
53
|
-
```
|
53
|
+
```plaintext
|
54
54
|
{{ response_headers_text }}
|
55
55
|
{{ response_status }} {{ response_status_text}}
|
56
56
|
```
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec_api_documentation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 6.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Cahoon
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
13
|
+
date: 2018-10-03 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
@@ -252,6 +252,40 @@ dependencies:
|
|
252
252
|
- - ">="
|
253
253
|
- !ruby/object:Gem::Version
|
254
254
|
version: 1.6.3
|
255
|
+
- !ruby/object:Gem::Dependency
|
256
|
+
name: nokogiri
|
257
|
+
requirement: !ruby/object:Gem::Requirement
|
258
|
+
requirements:
|
259
|
+
- - "~>"
|
260
|
+
- !ruby/object:Gem::Version
|
261
|
+
version: '1.8'
|
262
|
+
- - ">="
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: 1.8.2
|
265
|
+
type: :development
|
266
|
+
prerelease: false
|
267
|
+
version_requirements: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - "~>"
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: '1.8'
|
272
|
+
- - ">="
|
273
|
+
- !ruby/object:Gem::Version
|
274
|
+
version: 1.8.2
|
275
|
+
- !ruby/object:Gem::Dependency
|
276
|
+
name: yard
|
277
|
+
requirement: !ruby/object:Gem::Requirement
|
278
|
+
requirements:
|
279
|
+
- - ">="
|
280
|
+
- !ruby/object:Gem::Version
|
281
|
+
version: 0.9.11
|
282
|
+
type: :development
|
283
|
+
prerelease: false
|
284
|
+
version_requirements: !ruby/object:Gem::Requirement
|
285
|
+
requirements:
|
286
|
+
- - ">="
|
287
|
+
- !ruby/object:Gem::Version
|
288
|
+
version: 0.9.11
|
255
289
|
description: Generate API docs from your test suite
|
256
290
|
email:
|
257
291
|
- chris@smartlogicsolutions.com
|
@@ -279,9 +313,30 @@ files:
|
|
279
313
|
- lib/rspec_api_documentation/http_test_client.rb
|
280
314
|
- lib/rspec_api_documentation/index.rb
|
281
315
|
- lib/rspec_api_documentation/oauth2_mac_client.rb
|
316
|
+
- lib/rspec_api_documentation/open_api/contact.rb
|
317
|
+
- lib/rspec_api_documentation/open_api/example.rb
|
318
|
+
- lib/rspec_api_documentation/open_api/header.rb
|
319
|
+
- lib/rspec_api_documentation/open_api/headers.rb
|
320
|
+
- lib/rspec_api_documentation/open_api/helper.rb
|
321
|
+
- lib/rspec_api_documentation/open_api/info.rb
|
322
|
+
- lib/rspec_api_documentation/open_api/license.rb
|
323
|
+
- lib/rspec_api_documentation/open_api/node.rb
|
324
|
+
- lib/rspec_api_documentation/open_api/operation.rb
|
325
|
+
- lib/rspec_api_documentation/open_api/parameter.rb
|
326
|
+
- lib/rspec_api_documentation/open_api/path.rb
|
327
|
+
- lib/rspec_api_documentation/open_api/paths.rb
|
328
|
+
- lib/rspec_api_documentation/open_api/response.rb
|
329
|
+
- lib/rspec_api_documentation/open_api/responses.rb
|
330
|
+
- lib/rspec_api_documentation/open_api/root.rb
|
331
|
+
- lib/rspec_api_documentation/open_api/schema.rb
|
332
|
+
- lib/rspec_api_documentation/open_api/security_definitions.rb
|
333
|
+
- lib/rspec_api_documentation/open_api/security_schema.rb
|
334
|
+
- lib/rspec_api_documentation/open_api/tag.rb
|
282
335
|
- lib/rspec_api_documentation/rack_test_client.rb
|
283
336
|
- lib/rspec_api_documentation/railtie.rb
|
284
337
|
- lib/rspec_api_documentation/test_server.rb
|
338
|
+
- lib/rspec_api_documentation/views/api_blueprint_example.rb
|
339
|
+
- lib/rspec_api_documentation/views/api_blueprint_index.rb
|
285
340
|
- lib/rspec_api_documentation/views/html_example.rb
|
286
341
|
- lib/rspec_api_documentation/views/html_index.rb
|
287
342
|
- lib/rspec_api_documentation/views/markdown_example.rb
|
@@ -292,6 +347,7 @@ files:
|
|
292
347
|
- lib/rspec_api_documentation/views/slate_index.rb
|
293
348
|
- lib/rspec_api_documentation/views/textile_example.rb
|
294
349
|
- lib/rspec_api_documentation/views/textile_index.rb
|
350
|
+
- lib/rspec_api_documentation/writers/api_blueprint_writer.rb
|
295
351
|
- lib/rspec_api_documentation/writers/append_json_writer.rb
|
296
352
|
- lib/rspec_api_documentation/writers/combined_json_writer.rb
|
297
353
|
- lib/rspec_api_documentation/writers/combined_text_writer.rb
|
@@ -302,15 +358,18 @@ files:
|
|
302
358
|
- lib/rspec_api_documentation/writers/json_iodocs_writer.rb
|
303
359
|
- lib/rspec_api_documentation/writers/json_writer.rb
|
304
360
|
- lib/rspec_api_documentation/writers/markdown_writer.rb
|
361
|
+
- lib/rspec_api_documentation/writers/open_api_writer.rb
|
305
362
|
- lib/rspec_api_documentation/writers/slate_writer.rb
|
306
363
|
- lib/rspec_api_documentation/writers/textile_writer.rb
|
307
364
|
- lib/rspec_api_documentation/writers/writer.rb
|
308
365
|
- lib/tasks/docs.rake
|
366
|
+
- templates/rspec_api_documentation/api_blueprint_index.mustache
|
309
367
|
- templates/rspec_api_documentation/html_example.mustache
|
310
368
|
- templates/rspec_api_documentation/html_index.mustache
|
311
369
|
- templates/rspec_api_documentation/markdown_example.mustache
|
312
370
|
- templates/rspec_api_documentation/markdown_index.mustache
|
313
371
|
- templates/rspec_api_documentation/slate_example.mustache
|
372
|
+
- templates/rspec_api_documentation/slate_index.mustache
|
314
373
|
- templates/rspec_api_documentation/textile_example.mustache
|
315
374
|
- templates/rspec_api_documentation/textile_index.mustache
|
316
375
|
homepage: http://smartlogicsolutions.com
|
@@ -338,4 +397,3 @@ signing_key:
|
|
338
397
|
specification_version: 4
|
339
398
|
summary: A double black belt for your docs
|
340
399
|
test_files: []
|
341
|
-
has_rdoc:
|