Class: OpenapiSdkGenerator::Parser
- Inherits:
-
Object
- Object
- OpenapiSdkGenerator::Parser
- Defined in:
- lib/openapi_sdk_generator/parser.rb
Instance Attribute Summary collapse
-
#api_info ⇒ Object
readonly
Returns the value of attribute api_info.
-
#base_url ⇒ Object
readonly
Returns the value of attribute base_url.
-
#endpoints ⇒ Object
readonly
Returns the value of attribute endpoints.
-
#models ⇒ Object
readonly
Returns the value of attribute models.
-
#spec ⇒ Object
readonly
Returns the value of attribute spec.
Instance Method Summary collapse
- #api_description ⇒ Object
- #api_title ⇒ Object
- #api_version ⇒ Object
-
#initialize(file_path) ⇒ Parser
constructor
A new instance of Parser.
Constructor Details
#initialize(file_path) ⇒ Parser
9 10 11 12 13 14 15 16 |
# File 'lib/openapi_sdk_generator/parser.rb', line 9 def initialize(file_path) @file_path = file_path @spec = load_spec @endpoints = [] @models = {} @api_info = {} parse_spec end |
Instance Attribute Details
#api_info ⇒ Object (readonly)
Returns the value of attribute api_info.
7 8 9 |
# File 'lib/openapi_sdk_generator/parser.rb', line 7 def api_info @api_info end |
#base_url ⇒ Object (readonly)
Returns the value of attribute base_url.
7 8 9 |
# File 'lib/openapi_sdk_generator/parser.rb', line 7 def base_url @base_url end |
#endpoints ⇒ Object (readonly)
Returns the value of attribute endpoints.
7 8 9 |
# File 'lib/openapi_sdk_generator/parser.rb', line 7 def endpoints @endpoints end |
#models ⇒ Object (readonly)
Returns the value of attribute models.
7 8 9 |
# File 'lib/openapi_sdk_generator/parser.rb', line 7 def models @models end |
#spec ⇒ Object (readonly)
Returns the value of attribute spec.
7 8 9 |
# File 'lib/openapi_sdk_generator/parser.rb', line 7 def spec @spec end |
Instance Method Details
#api_description ⇒ Object
26 27 28 |
# File 'lib/openapi_sdk_generator/parser.rb', line 26 def api_description @api_info[:description] end |
#api_title ⇒ Object
18 19 20 |
# File 'lib/openapi_sdk_generator/parser.rb', line 18 def api_title @api_info[:title] end |
#api_version ⇒ Object
22 23 24 |
# File 'lib/openapi_sdk_generator/parser.rb', line 22 def api_version @api_info[:version] end |