mirror of
https://github.com/correl/openapi-core.git
synced 2024-11-25 03:00:11 +00:00
25 lines
538 B
Python
25 lines
538 B
Python
import attr
|
|
|
|
from openapi_core.schema.exceptions import OpenAPIMappingError
|
|
|
|
|
|
class OpenAPIResponseError(OpenAPIMappingError):
|
|
pass
|
|
|
|
|
|
@attr.s(hash=True)
|
|
class InvalidResponse(OpenAPIResponseError):
|
|
http_status = attr.ib()
|
|
responses = attr.ib()
|
|
|
|
def __str__(self):
|
|
return "Unknown response http status: {0}".format(
|
|
str(self.http_status))
|
|
|
|
|
|
@attr.s(hash=True)
|
|
class MissingResponseContent(OpenAPIResponseError):
|
|
response = attr.ib()
|
|
|
|
def __str__(self):
|
|
return "Missing response content"
|