Class: Committee::Drivers::OpenAPI3::Schema
- Defined in:
- lib/committee/drivers/open_api_3.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.
52 53 54 55 |
# File 'lib/committee/drivers/open_api_3.rb', line 52 def initialize(driver, open_api) @open_api = open_api @driver = driver end |
Instance Attribute Details
#open_api ⇒ OpenAPIParser::Schemas::OpenAPI (readonly)
52 53 54 |
# File 'lib/committee/drivers/open_api_3.rb', line 52 def open_api @open_api end |
#validator_option ⇒ Object (readonly)
Returns the value of attribute validator_option.
47 48 49 |
# File 'lib/committee/drivers/open_api_3.rb', line 47 def validator_option @validator_option end |
Instance Method Details
#build_router(options) ⇒ Object
65 66 67 68 |
# File 'lib/committee/drivers/open_api_3.rb', line 65 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
61 62 63 |
# File 'lib/committee/drivers/open_api_3.rb', line 61 def driver # we don't use attr_reader because this method override super class @driver end |
#operation_object(path, method) ⇒ Object
OpenAPI3 only
71 72 73 74 75 76 |
# File 'lib/committee/drivers/open_api_3.rb', line 71 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
57 58 59 |
# File 'lib/committee/drivers/open_api_3.rb', line 57 def supports_stub? false end |