add conversion oauth flow to flows

This commit is contained in:
Greg Myers
2020-03-24 15:10:12 +00:00
parent 231a2d135c
commit 5060697761
2 changed files with 37 additions and 1 deletions

View File

@@ -73,7 +73,14 @@ module Rswag
openapi: '3.0.1',
basePath: '/foo',
schemes: ['http', 'https'],
host: 'api.example.com'
host: 'api.example.com',
components: {
securitySchemes: {
my_oauth: {
flow: :anything
}
}
}
} }
let(:document) { nil }
@@ -104,6 +111,18 @@ module Rswag
}
)
end
it 'upgrades oauth flow to flows' do
expect(swagger_doc.slice(:components)).to match(
components: {
securitySchemes: {
my_oauth: {
flows: [:anything]
}
}
}
)
end
end
end