Sha256: 588de420a5140ca188aca13ea12140fd648f4494858650ed9d56de36ec06c69c

Contents?: true

Size: 1.27 KB

Versions: 6

Compression:

Stored size: 1.27 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 = {
      "<%= app_name %>.yml" => YAML.load_file(File.join(__dir__, "support/<%= app_name %>.yml")).with_indifferent_access,
  }

  # 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

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
care-0.1.6 lib/generators/care/install/templates/swagger_helper.rb
care-0.1.5 lib/generators/care/install/templates/swagger_helper.rb
care-0.1.4 lib/generators/care/install/templates/swagger_helper.rb
care-0.1.3 lib/generators/care/install/templates/swagger_helper.rb
care-0.1.1 lib/generators/care/install/templates/swagger_helper.rb
care-0.1.0 lib/generators/care/install/templates/swagger_helper.rb