From 93b912b76467fefbb261a1b38fc1649141d385c9 Mon Sep 17 00:00:00 2001 From: Jaap Versteegh Date: Wed, 20 Jan 2021 00:35:30 +0100 Subject: [PATCH 1/2] Add "application/vnd.api+json" content type. --- openapi_python_client/parser/responses.py | 1 + 1 file changed, 1 insertion(+) diff --git a/openapi_python_client/parser/responses.py b/openapi_python_client/parser/responses.py index c6c6a49a1..3d01a0eab 100644 --- a/openapi_python_client/parser/responses.py +++ b/openapi_python_client/parser/responses.py @@ -20,6 +20,7 @@ class Response: _SOURCE_BY_CONTENT_TYPE = { "application/json": "response.json()", + "application/vnd.api+json": "response.json()", "application/octet-stream": "response.content", "text/html": "response.text", } From aa15a6c207fa29cbf6269c3b97955c35374becf3 Mon Sep 17 00:00:00 2001 From: Jaap Versteegh Date: Sat, 23 Jan 2021 13:04:52 +0100 Subject: [PATCH 2/2] Add changelog entry for new media type. --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b2372aca..8f14f85c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `none` will not create a project folder at all, only the inner package folder (which won't be inner anymore) - Attempt to detect and alert users if they are using an unsupported version of OpenAPI (#281). - Fixes `Enum` deserialization when the value is `UNSET`. +- Add handling of application/vnd.api+json media type. ### Changes