Class: OasGrape::Configuration
- Inherits:
-
OasCore::Configuration
- Object
- OasCore::Configuration
- OasGrape::Configuration
- Defined in:
- lib/oas_grape/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_grape/configuration.rb', line 8 def initialize super(info: generate_info_object) @include_mode = :all @rapidoc_theme = :rails @source_oas_path = nil end |
Instance Attribute Details
#include_mode ⇒ Object
Returns the value of attribute include_mode.
6 7 8 |
# File 'lib/oas_grape/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_grape/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_grape/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_grape/configuration.rb', line 39 def description " # Welcome to OasGrape\n\n OasGrape automatically generates interactive documentation for your Grape APIs using the OpenAPI Specification 3.1 (OAS 3.1) and displays it with a sleek UI.\n\n ## Getting Started\n\n You've successfully mounted the OasGrape engine. This default documentation is based on your routes and automatically gathered information.\n\n For more details, visit the official documentation: [OasCore Documentation](https://a-chacon.com/oas_core).\n\n ## Features\n\n - **Automatic OAS 3.1 Document Generation**: No manual specification required.\n - **[RapiDoc](https://github.com/rapi-doc/RapiDoc) Integration**: Interactive API exploration.\n - **Minimal Setup**: Basic documentation works out of the box.\n - **Extensible**: Customize through configuration and YARD tags.\n\n Explore your API documentation and enjoy the power of OasGrape!\n\n Any questions visit the [OasGrape GitHub Repository](https://github.com/a-chacon/oas_grape).\n DESC\nend\n" |
#generate_info_object ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/oas_grape/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_grape/configuration.rb', line 35 def summary "OasGrape: Automatic Interactive API Documentation for Grape" end |
#title ⇒ Object
31 32 33 |
# File 'lib/oas_grape/configuration.rb', line 31 def title "OasGrape" end |