Skip to content

Commit d10405b

Browse files
authored
Merge pull request #77 from lucasvenez/master
Add support for application/problem+json content type
2 parents 23b109c + 9a3c714 commit d10405b

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,3 +128,6 @@ dmypy.json
128128
# Cython debug symbols
129129
cython_debug/
130130

131+
# VS Code
132+
.history
133+
.vscode

src/openapi_parser/enumeration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ class ContentType(Enum):
9999
JSON = 'application/json'
100100
JSON_TEXT = 'text/json'
101101
JSON_ANY = 'application/*+json'
102+
JSON_PROBLEM = 'application/problem+json'
102103
XML = 'application/xml'
103104
FORM = 'application/x-www-form-urlencoded'
104105
MULTIPART_FORM = 'multipart/form-data'

tests/test_enumeration.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ def test_parameter_location_error() -> None:
140140
media_type_provider = (
141141
("application/json", ContentType.JSON),
142142
("application/*+json", ContentType.JSON_ANY),
143+
("application/problem+json", ContentType.JSON_PROBLEM),
143144
("text/json", ContentType.JSON_TEXT),
144145
("application/xml", ContentType.XML),
145146
("application/x-www-form-urlencoded", ContentType.FORM),

0 commit comments

Comments
 (0)