Skip to content

Commit a1dc43d

Browse files
committed
added support for wildcard and common image mime types
1 parent 9bfc0fe commit a1dc43d

2 files changed

Lines changed: 14 additions & 0 deletions

File tree

src/openapi_parser/enumeration.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,13 @@ class ContentType(Enum):
107107
HTML = 'text/html'
108108
PDF = 'application/pdf'
109109
PNG = 'image/png'
110+
JPEG = 'image/jpeg'
111+
GIF = 'image/gif'
112+
SVG = 'image/svg+xml'
113+
AVIF = 'image/avif'
114+
BMP = 'image/bmp'
115+
WEBP = 'image/webp'
116+
Image = 'image/*'
110117
BINARY = 'application/octet-stream'
111118

112119

tests/test_enumeration.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,13 @@ def test_parameter_location_error() -> None:
149149
("text/html", ContentType.HTML),
150150
("application/pdf", ContentType.PDF),
151151
("image/png", ContentType.PNG),
152+
("image/jpeg", ContentType.JPEG),
153+
("image/gif", ContentType.GIF),
154+
("image/svg+xml", ContentType.SVG),
155+
("image/avif", ContentType.AVIF),
156+
("image/bmp", ContentType.BMP),
157+
("image/webp", ContentType.WEBP),
158+
("image/*", ContentType.Image),
152159
("application/octet-stream", ContentType.BINARY),
153160
)
154161

0 commit comments

Comments
 (0)