manchenkoff / openapi3-parser

OpenAPI 3 parser to use a specification inside of the code in your projects
https://pypi.org/project/openapi3-parser/
MIT License
64 stars 33 forks source link

Support all IANA mime types #82

Open dkoston opened 10 months ago

dkoston commented 10 months ago

Overview

We have some content types in our schemas that were not supported. Instead of just adding the few we needed, I decided to grab all the IANA types as CSVs and build a tool to output the ContentType enum. I moved it out to mime_types.py as that's a generated file so, it should be kept separate.

NOTE: this should be merged after the switch to poetry PR as it is branched off that branch

Changes

build_mime_types: Add tool to create ContentType enum from all IANA mime type CSVS pyproject.toml: Run build_mime_types.py during poetry build src/tests: Add more tests around mime types and adjust to mime_types.ContentType from enumeration.ContentType