openapi-core/openapi_core/validation/processors.py

15 lines
466 B
Python
Raw Normal View History

2020-01-13 15:37:12 +00:00
"""OpenAPI core validation processors module"""
class OpenAPIProcessor(object):
def __init__(self, request_validator, response_validator):
self.request_validator = request_validator
self.response_validator = response_validator
def process_request(self, request):
2020-01-27 11:10:54 +00:00
return self.request_validator.validate(request)
2020-01-13 15:37:12 +00:00
def process_response(self, request, response):
2020-01-27 11:10:54 +00:00
return self.response_validator.validate(request, response)