Contributions
Re: swagger-codegen-maven-plugin ignores multiple occurences of a path (with different content types)
The same problem occurs, if you specify multiple content types to a path. Separate service methods will be generated but all of them will have all content types in their Consumes annotations instead of just the matching ones. This gets even worse, if you try to use content type versioning. For example you want to allow for two content type versions like: content: application/json;version=1.0.0: schema: $ref: '#/components/schemas/MyDataV1' application/json;version=2.0.0: schema: $ref: '#/components/schemas/MyDataV2' You will endup with two methods generated (one foreach content type) but both will have same consumes annotation like: @Consumes({ "application/json;version=1.0.0", "application/json;version=2.0.0" }) ... public void myOperation(MyDataV1 body); @Consumes({ "application/json;version=1.0.0", "application/json;version=2.0.0" }) ... public void myOperation(MyDataV2 body); While I would actually expect: @Consumes({ "application/json;version=1.0.0" }) ... public void myOperation(MyDataV1 body); @Consumes({ "application/json;version=2.0.0" }) ... public void myOperation(MyDataV2 body); PeterPDid you manage to solve this? My last resort would be mangling with the code generation templates. But to be honest I would like toavoid that.892Views0likes0Comments