@@ -85,7 +85,8 @@ RspecApiDocumentation.configure do |config|
85
85
86
86
# An array of output format(s).
87
87
# Possible values are :json, :html, :combined_text, :combined_json,
88
- # :json_iodocs, :textile, :markdown, :append_json, :slate
88
+ # :json_iodocs, :textile, :markdown, :append_json, :slate,
89
+ # :api_blueprint
89
90
config.format = [:html ]
90
91
91
92
# Location of templates
166
167
* ** json_iodocs** : Generates [ I/O Docs] ( http://www.mashery.com/product/io-docs ) style documentation.
167
168
* ** textile** : Generates an index file and example files in Textile.
168
169
* ** markdown** : Generates an index file and example files in Markdown.
170
+ * ** api_blueprint** : Generates an index file and example files in [ APIBlueprint] ( https://apiblueprint.org ) .
169
171
* ** append_json** : Lets you selectively run specs without destroying current documentation. See section below.
170
172
171
173
### append_json
@@ -200,7 +202,32 @@ rake docs:generate:append[spec/acceptance/orders_spec.rb]
200
202
201
203
This will update the current index's examples to include any in the ` orders_spec.rb ` file. Any examples inside will be rewritten.
202
204
205
+ ### api_blueprint
206
+
207
+ This [ format] ( https://apiblueprint.org ) (APIB) has additional functions:
208
+
209
+ * ` route ` : APIB groups URLs together and then below them are HTTP verbs.
210
+
211
+ ``` ruby
212
+ route " /orders" , " Orders Collection" do
213
+ get " Returns all orders" do
214
+ # ...
215
+ end
216
+
217
+ delete " Deletes all orders" do
218
+ # ...
219
+ end
220
+ end
221
+ ```
222
+
223
+ If you don't use ` route ` , then param in ` get(param) ` should be an URL as
224
+ states in the rest of this documentation.
225
+
226
+ * ` attribute ` : APIB has attributes besides parameters. Use attributes exactly
227
+ like you'd use ` parameter ` (see documentation below).
228
+
203
229
## Filtering and Exclusion
230
+
204
231
rspec_api_documentation lets you determine which examples get outputted into the final documentation.
205
232
All filtering is done via the ` :document ` metadata key.
206
233
You tag examples with either a single symbol or an array of symbols.
0 commit comments