Class: Committee::Drivers::OpenAPI3::Schema
- Defined in:
- lib/committee/drivers/open_api_3/schema.rb
Instance Attribute Summary collapse
- #open_api ⇒ OpenAPIParser::Schemas::OpenAPI readonly
-
#validator_option ⇒ Object
readonly
Returns the value of attribute validator_option.
Instance Method Summary collapse
- #build_router(options) ⇒ Object
-
#driver ⇒ Object
we don’t use attr_reader because this method override super class.
-
#initialize(driver, open_api) ⇒ Schema
constructor
A new instance of Schema.
-
#operation_object(path, method) ⇒ Object
OpenAPI3 only.
- #supports_stub? ⇒ Boolean
Constructor Details
#initialize(driver, open_api) ⇒ Schema
Returns a new instance of Schema.
13 14 15 16 |
# File 'lib/committee/drivers/open_api_3/schema.rb', line 13 def initialize(driver, open_api) @open_api = open_api @driver = driver end |
Instance Attribute Details
#open_api ⇒ OpenAPIParser::Schemas::OpenAPI (readonly)
13 14 15 |
# File 'lib/committee/drivers/open_api_3/schema.rb', line 13 def open_api @open_api end |
#validator_option ⇒ Object (readonly)
Returns the value of attribute validator_option.
8 9 10 |
# File 'lib/committee/drivers/open_api_3/schema.rb', line 8 def validator_option @validator_option end |
Instance Method Details
#build_router(options) ⇒ Object
26 27 28 29 |
# File 'lib/committee/drivers/open_api_3/schema.rb', line 26 def build_router() @validator_option = Committee::SchemaValidator::Option.new(, self, :open_api_3) Committee::SchemaValidator::OpenAPI3::Router.new(self, @validator_option) end |
#driver ⇒ Object
we don’t use attr_reader because this method override super class
22 23 24 |
# File 'lib/committee/drivers/open_api_3/schema.rb', line 22 def driver # we don't use attr_reader because this method override super class @driver end |
#operation_object(path, method) ⇒ Object
OpenAPI3 only
32 33 34 35 36 37 |
# File 'lib/committee/drivers/open_api_3/schema.rb', line 32 def operation_object(path, method) request_operation = open_api.request_operation(method, path) return nil unless request_operation Committee::SchemaValidator::OpenAPI3::OperationWrapper.new(request_operation) end |
#supports_stub? ⇒ Boolean
18 19 20 |
# File 'lib/committee/drivers/open_api_3/schema.rb', line 18 def supports_stub? false end |