mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 07:16:40 +00:00
add conversion oauth flow to flows
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user