openapi-core/openapi_core/schema/operations/exceptions.py

18 lines
403 B
Python
Raw Normal View History

import attr
2019-06-18 11:39:07 +00:00
from openapi_core.schema.exceptions import OpenAPIMappingError
2018-04-18 10:39:03 +00:00
class OpenAPIOperationError(OpenAPIMappingError):
pass
2019-06-18 11:39:07 +00:00
@attr.s(hash=True)
2018-04-18 10:39:03 +00:00
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)