mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-22 22:06:43 +00:00
add options and trace
This commit is contained in:
parent
0246ff164f
commit
57da84d055
@ -7,7 +7,7 @@ module Rswag
|
||||
describe(template, metadata, &block)
|
||||
end
|
||||
|
||||
[ :get, :post, :patch, :put, :delete, :head ].each do |verb|
|
||||
[ :get, :post, :patch, :put, :delete, :head, :options, :trace ].each do |verb|
|
||||
define_method(verb) do |summary, &block|
|
||||
api_metadata = { operation: { verb: verb, summary: summary } }
|
||||
describe(verb, api_metadata, &block)
|
||||
|
||||
@ -24,7 +24,7 @@ module Rswag
|
||||
end
|
||||
end
|
||||
|
||||
describe '#get|post|patch|put|delete|head(verb, summary)' do
|
||||
describe '#get|post|patch|put|delete|head|options|trace(verb, summary)' do
|
||||
before { subject.post('Creates a blog') }
|
||||
|
||||
it "delegates to 'describe' with 'operation' metadata" do
|
||||
|
||||
Loading…
Reference in New Issue
Block a user