mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 23:32:58 +00:00
Remove all commented code. Add "nullable"
This commit is contained in:
@@ -62,40 +62,6 @@ module Rswag
|
||||
end
|
||||
end
|
||||
|
||||
## OA3
|
||||
# describe '#request_body_json(schema)' do
|
||||
# let(:api_metadata) { { path_item: {}, operation: {} } } # i.e. operation defined
|
||||
# context 'when required is not supplied' do
|
||||
# before { subject.request_body_json(schema: { type: 'object' }) }
|
||||
|
||||
# it 'adds required true by default' do
|
||||
# expect(api_metadata[:operation][:requestBody]).to match(
|
||||
# required: true, content: { 'application/json' => { schema: { type: 'object' } } }
|
||||
# )
|
||||
# end
|
||||
# end
|
||||
|
||||
# context 'when required is supplied' do
|
||||
# before { subject.request_body_json(schema: { type: 'object' }, required: false) }
|
||||
|
||||
# it 'adds required false' do
|
||||
# expect(api_metadata[:operation][:requestBody]).to match(
|
||||
# required: false, content: { 'application/json' => { schema: { type: 'object' } } }
|
||||
# )
|
||||
# end
|
||||
# end
|
||||
|
||||
# context 'when required is supplied' do
|
||||
# before { subject.request_body_json(schema: { type: 'object' }, description: 'my description') }
|
||||
|
||||
# it 'adds description' do
|
||||
# expect(api_metadata[:operation][:requestBody]).to match(
|
||||
# description: 'my description', required: true, content: { 'application/json' => { schema: { type: 'object' } } }
|
||||
# )
|
||||
# end
|
||||
# end
|
||||
# end
|
||||
|
||||
describe '#parameter(attributes)' do
|
||||
context "when called at the 'path' level" do
|
||||
before { subject.parameter(name: :blog, in: :body, schema: { type: 'object' }) }
|
||||
|
||||
Reference in New Issue
Block a user