Sha256: 96c45d581b35ab8552ef7e5eda2689f91ff058421b6bb7045a80450ca3375fa0

Contents?: true

Size: 465 Bytes

Versions: 26

Compression:

Stored size: 465 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe '#605 root route documentation' do
  let(:app) do
    Class.new(Grape::API) do
      get do
        { message: 'hello world' }
      end

      add_swagger_documentation format: :json
    end
  end

  subject do
    get '/swagger_doc'
    JSON.parse(last_response.body)['paths']
  end

  specify { expect(app.combined_routes.keys).to include '/' }
  specify { expect(subject.keys).to include '/' }
end

Version data entries

26 entries across 26 versions & 2 rubygems

Version Path
grape-swagger-1.6.1 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-1.6.0 spec/issues/605_root_route_documentation_spec.rb
gitlab-grape-swagger-1.5.0 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-1.5.0 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-1.4.2 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-1.4.1 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-1.4.0 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-1.3.1 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-1.3.0 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-1.2.1 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-1.2.0 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-1.1.0 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-1.0.0 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-0.34.2 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-0.34.1 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-0.34.0 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-0.33.0 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-0.32.1 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-0.32.0 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-0.31.1 spec/issues/605_root_route_documentation_spec.rb