We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c85b58 commit ce8c852Copy full SHA for ce8c852
spec/openapi_3/nicknamed_openapi_3_spec.rb
@@ -0,0 +1,25 @@
1
+# frozen_string_literal: true
2
+
3
+require 'spec_helper'
4
5
+describe 'a nicknamed mounted api' do
6
+ def app
7
+ Class.new(Grape::API) do
8
+ desc 'Show this endpoint', nickname: 'simple'
9
+ get '/simple' do
10
+ { foo: 'bar' }
11
+ end
12
13
+ add_swagger_documentation openapi_version: '3.0', format: :json
14
15
16
17
+ subject do
18
+ get '/swagger_doc.json'
19
+ JSON.parse(last_response.body)
20
21
22
+ it 'uses the nickname as the operationId' do
23
+ expect(subject['paths']['/simple']['get']['operationId']).to eql('simple')
24
25
+end
0 commit comments