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
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