Sha256: fd7d175160125c8de2988bf1336007f5f18aabd50b32a9d94aff6a9f7783e60b
Contents?: true
Size: 1.39 KB
Versions: 112
Compression:
Stored size: 1.39 KB
Contents
RSpec.describe :build_schema do link :build_schema, from: :ree_swagger it { schema = build_schema( title: 'Sample API', description: 'Sample API description', version: '0.0.1', api_url: 'https://some-api.com/api/v1', endpoints: [ReeSwagger::EndpointDto.new( method: :get, authenticate: true, path: '/version', respond_to: :json, caster: nil, serializer: nil, response_status: 200, description: nil, summary: nil, errors: [] )] ) expect(schema).to eq( { openapi: '3.0.0', info: { title: 'Sample API', description: 'Sample API description', version: '0.0.1' }, components: { securitySchemes: { ApiKeyAuth: { in: "header", name: "Authorization", type: "apiKey", } } }, servers: [ { url: 'https://some-api.com/api/v1' } ], paths: { '/version' => { get: { security: [ {ApiKeyAuth: []} ], responses: { 200 => { description: '' } } } } } } ) } end
Version data entries
112 entries across 112 versions & 1 rubygems