mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 07:16:40 +00:00
Merge remote-tracking branch 'olegkyz/bugfix/examples-content' into jamie
This commit is contained in:
@@ -137,9 +137,10 @@ module Rswag
|
||||
end
|
||||
|
||||
describe '#examples(example)' do
|
||||
let(:mime) { 'application/json' }
|
||||
let(:json_example) do
|
||||
{
|
||||
'application/json' => {
|
||||
mime => {
|
||||
foo: 'bar'
|
||||
}
|
||||
}
|
||||
@@ -151,7 +152,11 @@ module Rswag
|
||||
end
|
||||
|
||||
it "adds to the 'response examples' metadata" do
|
||||
expect(api_metadata[:response][:examples]).to eq(json_example)
|
||||
expect(api_metadata[:response][:content]).to match(
|
||||
mime => {
|
||||
example: json_example[mime]
|
||||
}
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user