1
0
Fork 0
mirror of https://github.com/correl/openapi-core.git synced 2025-04-05 17:00:11 -09:00
openapi-core/openapi_core/schema/content/exceptions.py
2020-01-17 14:43:18 +00:00

17 lines
408 B
Python

import attr
from openapi_core.schema.exceptions import OpenAPIMappingError
class OpenAPIContentError(OpenAPIMappingError):
pass
@attr.s(hash=True)
class MimeTypeNotFound(OpenAPIContentError):
mimetype = attr.ib()
availableMimetypes = attr.ib()
def __str__(self):
return "Mimetype not found: {0}. Valid mimetypes: {1}".format(
self.mimetype, self.availableMimetypes)