Sha256: 721e92cb64314085191953474f58d1c22364792284dea490441d3be84d731378
Contents?: true
Size: 520 Bytes
Versions: 29
Compression:
Stored size: 520 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe 'a nicknamed mounted api' do def app Class.new(Grape::API) do desc 'Show this endpoint', nickname: 'simple' get '/simple' do { foo: 'bar' } end add_swagger_documentation format: :json end end subject do get '/swagger_doc.json' JSON.parse(last_response.body) end it 'uses the nickname as the operationId' do expect(subject['paths']['/simple']['get']['operationId']).to eql('simple') end end
Version data entries
29 entries across 29 versions & 2 rubygems