Class: OasHanami::Configuration
- Inherits:
-
OasCore::Configuration
- Object
- OasCore::Configuration
- OasHanami::Configuration
- Defined in:
- lib/oas_hanami/configuration.rb
Instance Attribute Summary collapse
-
#include_mode ⇒ Object
Returns the value of attribute include_mode.
-
#rapidoc_theme ⇒ Object
Returns the value of attribute rapidoc_theme.
-
#source_oas_path ⇒ Object
Returns the value of attribute source_oas_path.
Instance Method Summary collapse
- #description ⇒ Object
- #generate_info_object ⇒ Object
-
#initialize ⇒ Configuration
constructor
A new instance of Configuration.
- #summary ⇒ Object
- #title ⇒ Object
Constructor Details
#initialize ⇒ Configuration
Returns a new instance of Configuration.
8 9 10 11 12 13 14 |
# File 'lib/oas_hanami/configuration.rb', line 8 def initialize super(info: generate_info_object) @include_mode = :all @rapidoc_theme = :hanami @source_oas_path = nil end |
Instance Attribute Details
#include_mode ⇒ Object
Returns the value of attribute include_mode.
6 7 8 |
# File 'lib/oas_hanami/configuration.rb', line 6 def include_mode @include_mode end |
#rapidoc_theme ⇒ Object
Returns the value of attribute rapidoc_theme.
5 6 7 |
# File 'lib/oas_hanami/configuration.rb', line 5 def rapidoc_theme @rapidoc_theme end |
#source_oas_path ⇒ Object
Returns the value of attribute source_oas_path.
5 6 7 |
# File 'lib/oas_hanami/configuration.rb', line 5 def source_oas_path @source_oas_path end |
Instance Method Details
#description ⇒ Object
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oas_hanami/configuration.rb', line 39 def description <<~DESC # Welcome to OasHanami OasHanami automatically generates interactive documentation for your Hanami APIs using the OpenAPI Specification 3.1 (OAS 3.1) and displays it with a sleek UI. ## Getting Started You've successfully mounted the OasHanami engine. This default documentation is based on your routes and automatically gathered information. For more details, visit the official documentation: [OasCore Documentation](https://a-chacon.com/oas_core). ## Features - **Automatic OAS 3.1 Document Generation**: No manual specification required. - **[RapiDoc](https://github.com/rapi-doc/RapiDoc) Integration**: Interactive API exploration. - **Minimal Setup**: Basic documentation works out of the box. - **Extensible**: Customize through configuration and YARD tags. Explore your API documentation and enjoy the power of OasHanami! Any questions visit the [OasHanami GitHub Repository](https://github.com/a-chacon/oas_hanami). DESC end |
#generate_info_object ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/oas_hanami/configuration.rb', line 23 def generate_info_object OasCore::Spec::Info.new( title: title, summary: summary, description: description ) end |
#summary ⇒ Object
35 36 37 |
# File 'lib/oas_hanami/configuration.rb', line 35 def summary "OasHanami: Automatic Interactive API Documentation for Hanami" end |
#title ⇒ Object
31 32 33 |
# File 'lib/oas_hanami/configuration.rb', line 31 def title "OasHanami" end |