You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Change the filter to only include :public examples
136
136
config.filter =:public
137
137
end
@@ -199,33 +199,33 @@ You tag examples with either a single symbol or an array of symbols.
199
199
resource "Account"do
200
200
get "/accounts"do
201
201
parameter :page, "Page to view"
202
-
202
+
203
203
# default :document is :all
204
204
example "Get a list of all accounts"do
205
205
do_request
206
206
status.should ==200
207
207
end
208
-
208
+
209
209
# Don't actually document this example, purely for testing purposes
210
210
example "Get a list on page 2", :document => falsedo
211
211
do_request(:page => 2)
212
212
status.should ==404
213
213
end
214
-
214
+
215
215
# With example_request, you can't change the :document
216
216
example_request "Get a list on page 3", :page => 3do
217
217
status.should ==404
218
218
end
219
219
end
220
-
220
+
221
221
post "/accounts"do
222
222
parameter :email, "User email"
223
-
223
+
224
224
example "Creating an account", :document => :privatedo
225
225
do_request(:email => "eric@example.com")
226
226
status.should ==201
227
227
end
228
-
228
+
229
229
example "Creating an account - errors", :document => [:private, :developers] do
230
230
do_request
231
231
status.should ==422
@@ -242,12 +242,12 @@ RspecApiDocumentation.configure do |config|
242
242
config.define_group :non_privatedo |config|
243
243
config.exclusion_filter =:private
244
244
end
245
-
245
+
246
246
# Only document examples marked as 'public'
247
247
config.define_group :publicdo |config|
248
248
config.filter =:public
249
249
end
250
-
250
+
251
251
# Only document examples marked as 'developer'
252
252
config.define_group :developersdo |config|
253
253
config.filter =:developers
@@ -363,7 +363,7 @@ end
363
363
364
364
#### parameter
365
365
366
-
This method takes the parameter name, a description, and an optional hash of extra metadata that can be displayed in Raddocs as extra columns. If a method with the parameter name exists, e.g. a `let`, it will send the returned value up to the server as URL encoded data.
366
+
This method takes the parameter name, a description, and an optional hash of extra metadata that can be displayed in Raddocs as extra columns. If a method with the parameter name exists, e.g. a `let`, it will send the returned value up to the server as URL encoded data.
0 commit comments