yonaskolb / SwagGen

OpenAPI/Swagger 3.0 Parser and Swift code generator
MIT License
625 stars 146 forks source link

SwagGen doesn't process the media type application/json;charset=UTF8 #306

Open knellr opened 2 years ago

knellr commented 2 years ago

We have an OpenAPI v3 JSON that has media types of application/json;charset=UTF8. These are ignored by SwagGen when processing request bodies as it's explicitly looking for application/json or variations thereof with *.

I don't know how valid it is that this additional charset is being specified, the RFC for media types (https://datatracker.ietf.org/doc/html/rfc6838) talks about it in relation to text types only, but it's what we're working with in our automatically generated spec.