Remove all commented code. Add "nullable"

This commit is contained in:
Greg Myers
2020-04-04 23:37:38 +01:00
parent b158f1e164
commit d644a91da5
11 changed files with 26 additions and 353 deletions

View File

@@ -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' }) }