mirror of
https://github.com/ditkrg/rswag.git
synced 2026-01-25 07:16:40 +00:00
Adding yaml as option for generator
New installations will get :yaml as it's default with openapi 3 as the version. Old installations will have the key missing and will default to :json with an easy upgrade path.
This commit is contained in:
@@ -13,8 +13,8 @@ RSpec.configure do |config|
|
||||
# document below. You can override this behavior by adding a swagger_doc tag to the
|
||||
# the root example_group in your specs, e.g. describe '...', swagger_doc: 'v2/swagger.json'
|
||||
config.swagger_docs = {
|
||||
'v1/swagger.json' => {
|
||||
swagger: '2.0',
|
||||
'v1/swagger.yaml' => {
|
||||
openapi: '3.0.1',
|
||||
info: {
|
||||
title: 'API V1',
|
||||
version: 'v1'
|
||||
@@ -22,4 +22,10 @@ RSpec.configure do |config|
|
||||
paths: {}
|
||||
}
|
||||
}
|
||||
|
||||
# Specify the format of the output Swagger file when running 'rswag:specs:swaggerize'.
|
||||
# The swagger_docs configuration option has the filename including format in
|
||||
# the key, this may want to be changed to avoid putting yaml in json files.
|
||||
# Defaults to json. Accepts ':json' and ':yaml'.
|
||||
config.swagger_format = :yaml
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user