swagger-blocks
swagger-blocks copied to clipboard
Specifying headers for OPTIONS method (CORS)
Any hints on how to translate something like this to Swagger-Blocks?
200:
description: Returns the CORS response headers
headers:
Access-Control-Allow-Origin:
type: string
Access-Control-Allow-Credentials:
type: boolean
Access-Control-Allow-Headers:
type: array
collectionFormat: csv
Access-Control-Allow-Methods:
type: array
collectionFormat: csv
Access-Control-Max-Age:
type: integer
I think this will work
response 200 do
key :description, 'Success'
header 'Access-Control-Allow-Methods' do
key :type, :array
key :collectionFormat, :csv
items do
key :type, :string
end
end
header :another do
key :type, :string
end