Module: RailsOpenapiGen
- Defined in:
- lib/rails-openapi-gen.rb,
lib/rails-openapi-gen.rb,
lib/rails-openapi-gen/engine.rb,
lib/rails-openapi-gen/railtie.rb,
lib/rails-openapi-gen/version.rb,
lib/rails-openapi-gen/importer.rb,
lib/rails-openapi-gen/ast_nodes.rb,
lib/rails-openapi-gen/configuration.rb,
lib/rails-openapi-gen/debug_helpers.rb,
lib/rails-openapi-gen/ast_nodes/base_node.rb,
lib/rails-openapi-gen/parsers/routes_parser.rb,
lib/rails-openapi-gen/parsers/comment_parser.rb,
lib/rails-openapi-gen/ast_nodes/property_node.rb,
lib/rails-openapi-gen/generators/yaml_generator.rb,
lib/rails-openapi-gen/parsers/controller_parser.rb,
lib/rails-openapi-gen/parsers/comment_parsers/body_parser.rb,
lib/rails-openapi-gen/parsers/comment_parsers/param_parser.rb,
lib/rails-openapi-gen/parsers/comment_parsers/query_parser.rb,
lib/rails-openapi-gen/parsers/comment_parsers/attribute_parser.rb,
lib/rails-openapi-gen/parsers/comment_parsers/operation_parser.rb,
lib/rails-openapi-gen/parsers/comment_parsers/conditional_parser.rb,
lib/rails-openapi-gen/parsers/comment_parsers/base_attribute_parser.rb
Overview
Debug helpers for Rails OpenAPI Gen development
Defined Under Namespace
Modules: AstNodes, DebugHelpers, Generators, Parsers, Processors Classes: Checker, Configuration, Engine, Error, Generator, Importer, Railtie
Constant Summary collapse
- VERSION =
"0.0.4"
Class Attribute Summary collapse
-
.configuration ⇒ Configuration
Returns the configuration instance.
Class Method Summary collapse
-
.check ⇒ void
Checks for missing OpenAPI comments and uncommitted changes.
-
.configure {|Configuration| ... } ⇒ void
Configures the gem via block.
-
.generate ⇒ void
Generates OpenAPI specification from Rails application.
-
.import(openapi_file = nil) ⇒ void
Imports OpenAPI specification and generates @openapi comments in Jbuilder files.
-
.reset_configuration! ⇒ void
Resets configuration to defaults.
Class Attribute Details
.configuration ⇒ Configuration
Returns the configuration instance
272 273 274 |
# File 'lib/rails-openapi-gen/configuration.rb', line 272 def configuration @configuration ||= Configuration.new end |
Class Method Details
.check ⇒ void
This method returns an undefined value.
Checks for missing OpenAPI comments and uncommitted changes
37 38 39 |
# File 'lib/rails-openapi-gen.rb', line 37 def check Checker.new.run end |
.configure {|Configuration| ... } ⇒ void
This method returns an undefined value.
Configures the gem via block
279 280 281 |
# File 'lib/rails-openapi-gen/configuration.rb', line 279 def configure yield(configuration) end |
.generate ⇒ void
This method returns an undefined value.
Generates OpenAPI specification from Rails application
31 32 33 |
# File 'lib/rails-openapi-gen.rb', line 31 def generate Generator.new.run end |
.import(openapi_file = nil) ⇒ void
This method returns an undefined value.
Imports OpenAPI specification and generates @openapi comments in Jbuilder files
44 45 46 |
# File 'lib/rails-openapi-gen.rb', line 44 def import(openapi_file = nil) Importer.new(openapi_file).run end |
.reset_configuration! ⇒ void
This method returns an undefined value.
Resets configuration to defaults
285 286 287 |
# File 'lib/rails-openapi-gen/configuration.rb', line 285 def reset_configuration! @configuration = Configuration.new end |