@@ -10,8 +10,7 @@ from django.urls import resolve
import openapi_core
from openapi_core.contrib.django import DjangoOpenAPIRequestFactory
from openapi_core.contrib.django import DjangoOpenAPIResponseFactory
-from openapi_core.schema.media_types.exceptions import OpenAPIMediaTypeError
-from openapi_core.schema.parameters.exceptions import OpenAPIParameterError
+from openapi_core.exceptions import OpenAPIParameterError
from openapi_core.templating import util
from openapi_core.unmarshalling.schemas.formatters import Formatter
from openapi_core.validation.request.validators import RequestValidator
@@ -113,9 +112,6 @@ def validate_data(path, request, response, validate_request,
result = validator.validate(request)
try:
result.raise_for_errors()
- except OpenAPIMediaTypeError:
- if response.status_code != status.HTTP_400_BAD_REQUEST:
- raise
except OpenAPIParameterError:
# TODO(stephenfin): In API v2.0, this should be an error. As things
# stand, we silently ignore these issues.
@@ -1,6 +1,6 @@
mysqlclient~=2.0.0
-psycopg2-binary~=2.8.0
+psycopg2-binary~=2.9.0
sqlparse~=0.4.0
python-dateutil~=2.8.0
tblib~=1.7.0
-openapi-core~=0.13.4
+openapi-core~=0.14.2
Once again, openapi-core has moved stuff around internally. Nothing we can't fix though, as it seems the thing moved is no longer necessary. Signed-off-by: Stephen Finucane <stephen@that.guru> --- patchwork/tests/api/validator.py | 6 +----- requirements-test.txt | 4 ++-- 2 files changed, 3 insertions(+), 7 deletions(-)