Module: GrapeOpenapi3
- Defined in:
- lib/grape_openapi3.rb,
lib/grape_openapi3/config.rb,
lib/grape_openapi3/railtie.rb,
lib/grape_openapi3/version.rb,
lib/grape_openapi3/document.rb,
lib/grape_openapi3/type_mapper.rb,
lib/grape_openapi3/path_normalizer.rb,
lib/grape_openapi3/readers/route_reader.rb,
lib/grape_openapi3/readers/entity_reader.rb,
lib/grape_openapi3/builders/operation_builder.rb,
lib/grape_openapi3/builders/parameter_builder.rb,
lib/generators/grape_openapi3/install_generator.rb,
lib/grape_openapi3/builders/operation_id_builder.rb
Defined Under Namespace
Modules: Builders, Readers Classes: Config, Document, Error, InstallGenerator, PathNormalizer, Railtie, TypeMapper
Constant Summary collapse
- VERSION =
"0.1.1"
Class Method Summary collapse
-
.generate(app, info:, servers: [], security_schemes: {}, security: [], tags: []) ⇒ Hash
Generate an OpenAPI 3.0 document from a Grape API class.
Class Method Details
.generate(app, info:, servers: [], security_schemes: {}, security: [], tags: []) ⇒ Hash
Generate an OpenAPI 3.0 document from a Grape API class.
Reads routes, params, and Grape::Entity response classes directly —no grape-swagger, no Swagger 2.0 conversion step.
47 48 49 50 51 52 53 54 55 56 |
# File 'lib/grape_openapi3.rb', line 47 def generate(app, info:, servers: [], security_schemes: {}, security: [], tags: []) config = Config.new( info: info, servers: servers, security_schemes: security_schemes, security: security, tags: , ) Document.build(app, config) end |