Class: FaradayMiddleware::OpenAPI::RequestValidator
- Inherits:
-
Faraday::Middleware
- Object
- Faraday::Middleware
- FaradayMiddleware::OpenAPI::RequestValidator
- Defined in:
- lib/faraday_middleware/openapi/request_validator.rb
Defined Under Namespace
Classes: RequestOperation
Instance Method Summary collapse
-
#initialize(app, options = {}) ⇒ RequestValidator
constructor
A new instance of RequestValidator.
- #on_request(env) ⇒ Object
Constructor Details
#initialize(app, options = {}) ⇒ RequestValidator
Returns a new instance of RequestValidator.
10 11 12 13 14 |
# File 'lib/faraday_middleware/openapi/request_validator.rb', line 10 def initialize(app, = {}) super(app) schema_path = .fetch(:schema_path) @schema_path = schema_path end |
Instance Method Details
#on_request(env) ⇒ Object
6 7 8 |
# File 'lib/faraday_middleware/openapi/request_validator.rb', line 6 def on_request(env) validate(env) end |