turner-townsend / flask-pydantic-spec

An Flask OpenAPI library using Pydantic
Apache License 2.0
99 stars 19 forks source link

Add ability to generate parameters as references in OpenAPI document #43

Open cgearing opened 1 year ago

cgearing commented 1 year ago

At the moment, query, header and cookie parameters are generated inline in the OpenAPI document rather than referencing the Parameters object in the OpenAPI schema.

This PR adds a config flag INLINE_DEFINITIONS which controls this behaviour, defaulting to True which is the current behaviour.

I also took the opportunity to refactor the tests to use Pytest fixtures, and did some tidying.