Sha256: d88c2ef6c28eb4eadf52512a806a0163dcf189b3cd327d0c8b1d2dadd3f754eb

Contents?: true

Size: 489 Bytes

Versions: 24

Compression:

Stored size: 489 Bytes

Contents

# frozen_string_literal: true

require 'spec_helper'

describe 'deprecated endpoint' do
  def app
    Class.new(Grape::API) do
      desc 'Deprecated endpoint', deprecated: true
      get '/foobar' do
        { foo: 'bar' }
      end

      add_swagger_documentation
    end
  end

  subject do
    get '/swagger_doc.json'
    JSON.parse(last_response.body)
  end

  it 'includes the deprecated field' do
    expect(subject['paths']['/foobar']['get']['deprecated']).to eql(true)
  end
end

Version data entries

24 entries across 24 versions & 2 rubygems

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