Add upgrades for consumes and produces in content with schemas

This commit is contained in:
Greg Myers
2020-03-26 23:37:00 +00:00
parent c739228c89
commit 405ccca494
5 changed files with 43 additions and 30 deletions

View File

@@ -154,16 +154,8 @@ module Rswag
before { subject.schema(type: 'object') }
let(:api_metadata) { { response: {} } }
context 'swagger 2.0' do
it "adds to the 'response' metadata" do
expect(api_metadata[:response][:schema]).to match(type: 'object')
end
end
context 'openapi 3.0' do
it "adds to the 'response' metadata" do
expect(api_metadata[:response][:content]['application/json'][:schema]).to match(type: 'object')
end
it "adds to the 'response' metadata" do
expect(api_metadata[:response][:schema]).to match(type: 'object')
end
end