Sha256: cdc325290ebb93566aa53a8060e88be265723c2241f1d6938662033a5ffb0546
Contents?: true
Size: 723 Bytes
Versions: 29
Compression:
Stored size: 723 Bytes
Contents
# frozen_string_literal: true require 'spec_helper' describe 'definitions/models' do include_context "#{MODEL_PARSER} swagger example" before :all do module TheApi class ModelApi < Grape::API format :json add_swagger_documentation models: [ ::Entities::UseResponse, ::Entities::ApiError, ::Entities::RecursiveModel, ::Entities::DocumentedHashAndArrayModel ] end end end def app TheApi::ModelApi end subject do get '/swagger_doc' JSON.parse(last_response.body) end specify do expect(subject).to include 'definitions' expect(subject['definitions']).to include(swagger_definitions_models) end end
Version data entries
29 entries across 29 versions & 2 rubygems