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 a41d712 commit c2e6a5aCopy full SHA for c2e6a5a
spec/openapi_3/operation_id_api_spec.rb
@@ -0,0 +1,27 @@
1
+# frozen_string_literal: true
2
+
3
+require 'spec_helper'
4
5
+describe 'an operation id api' do
6
+ def app
7
+ Class.new(Grape::API) do
8
+ version '0.1'
9
10
+ desc 'Show this endpoint'
11
+ get '/simple_opp' do
12
+ { foo: 'bar' }
13
+ end
14
15
+ add_swagger_documentation openapi_version: '3.0', format: :json
16
17
18
19
+ subject do
20
+ get '/0.1/swagger_doc.json'
21
+ JSON.parse(last_response.body)
22
23
24
+ it 'uses build name as operationId' do
25
+ expect(subject['paths']['/0.1/simple_opp']['get']['operationId']).to eql('get01SimpleOpp')
26
27
+end
0 commit comments