Sha256: 881a46ecf45d664746607d51e6a2a3f455588640595d4e366beb3397e78e2ee1

Contents?: true

Size: 1.17 KB

Versions: 4

Compression:

Stored size: 1.17 KB

Contents

require 'rails_helper'

RSpec.configure do |config|
  # Specify a root folder where Swagger JSON files are generated
  # NOTE: If you're using the rswag-api to serve API descriptions, you'll need
  # to ensure that it's configured to serve Swagger from the same folder
  config.swagger_root = Rails.root.join('swagger').to_s

  # Define one or more Swagger documents and provide global metadata for each one
  # When you run the 'rswag:specs:swaggerize' rake task, the complete Swagger will
  # be generated at the provided relative path under swagger_root
  # By default, the operations defined in spec files are added to the first
  # 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' => {
      openapi: '3.0.0',
      info: {
        title: 'API V1',
        version: 'v1'
      },
      paths: {},
      servers: [
        {
          url: 'https://{defaultHost}',
          variables: {
            defaultHost: {
                default: 'www.example.com'
            }
          }
        }
      ]
    }
  }
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
open_api-rswag-specs-0.1.0 lib/generators/rswag/specs/install/templates/swagger_helper.rb
open_api-rswag-specs-0.0.6 lib/generators/rswag/specs/install/templates/swagger_helper.rb
open_api-rswag-specs-0.0.5 lib/generators/rswag/specs/install/templates/swagger_helper.rb
open_api-rswag-specs-0.0.4 lib/generators/rswag/specs/install/templates/swagger_helper.rb