Parquery / swagger-to

Generate server and client code from Swagger (OpenAPI 2.0) specification.
MIT License
57 stars 14 forks source link

Propagated produces and consumes #123

Closed mristin closed 3 years ago

mristin commented 3 years ago

This patch provides a logic for propagating and overriding produces and consumes properties from the global (schema-wide) scope to local (method) scope.

Fixes #121.

mristin commented 3 years ago

@abingham could you please review the pull request and double-check that the implemented logic is correct? In particular, could you have a look at swagger.py and intermediate.py as well as the endpoints.json from the test cases?

abingham commented 3 years ago

@mristin Everything looks OK on review. The logic looks about like I'd expect, as do the test cases.