openapi-core/openapi_core/schema/operations/exceptions.py
2019-06-18 14:54:02 +01:00

17 lines
403 B
Python

import attr
from openapi_core.schema.exceptions import OpenAPIMappingError
class OpenAPIOperationError(OpenAPIMappingError):
pass
@attr.s(hash=True)
class InvalidOperation(OpenAPIOperationError):
path_pattern = attr.ib()
http_method = attr.ib()
def __str__(self):
return "Unknown operation path {0} with method {1}".format(
self.path_pattern, self.http_method)