Class: OpenAPIParser::Schemas::OpenAPI
- Defined in:
- lib/openapi_parser/schemas/classes.rb,
lib/openapi_parser/schemas/openapi.rb
Instance Attribute Summary collapse
- #components ⇒ Components? readonly
- #openapi ⇒ String? readonly
- #paths ⇒ Paths? readonly
Attributes inherited from Base
#object_reference, #parent, #raw_schema, #root
Instance Method Summary collapse
-
#initialize(raw_schema, config) ⇒ OpenAPI
constructor
A new instance of OpenAPI.
- #request_operation(http_method, request_path) ⇒ OpenAPIParser::RequestOperation?
Methods inherited from Base
Methods included from Expandable
Methods included from Findable
#find_object, #purge_object_cache
Methods included from Parser
#_openapi_all_child_objects, #_update_child_object, included, #load_data
Constructor Details
#initialize(raw_schema, config) ⇒ OpenAPI
Returns a new instance of OpenAPI.
8 9 10 11 12 13 |
# File 'lib/openapi_parser/schemas/openapi.rb', line 8 def initialize(raw_schema, config) super('#', nil, self, raw_schema) @find_object_cache = {} @path_item_finder = OpenAPIParser::PathItemFinder.new(paths) if paths # invalid definition @config = config end |
Instance Attribute Details
#components ⇒ Components? (readonly)
25 |
# File 'lib/openapi_parser/schemas/openapi.rb', line 25 openapi_attr_object :components, Components, reference: false |
#openapi ⇒ String? (readonly)
17 |
# File 'lib/openapi_parser/schemas/openapi.rb', line 17 openapi_attr_values :openapi |
Instance Method Details
#request_operation(http_method, request_path) ⇒ OpenAPIParser::RequestOperation?
28 29 30 |
# File 'lib/openapi_parser/schemas/openapi.rb', line 28 def request_operation(http_method, request_path) OpenAPIParser::RequestOperation.create(http_method, request_path, @path_item_finder, @config) end |