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-0.31.0 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-0.30.1 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-0.30.0 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-0.29.0 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-0.28.0 spec/issues/605_root_route_documentation_spec.rb
grape-swagger-0.27.3 spec/issues/605_root_route_documentation_spec.rb