-
Notifications
You must be signed in to change notification settings - Fork 461
Open
Description
Trying to generate an OpenAPI client from current schema results in errors:
This is due to drf-yasg usage, which does not support OAS 3.0. We need OAS 3.0 to properly express union types via anyOf.
In order to support OAS 3.0, we need to migrate our OpenAPI/Swagger generation to drf-spectacular.
- Replace drf-yasg dependency with drf-spectacular.
- Adapt
api.openapi.PydanticResponseCapableSwaggerAutoSchema. - Remove custom
Metaand other means that produce the bespoke"type"union schema fields. - Make sure the
/api/v1/docs/?format=openapiprovides the same output, but the union types are correctly expressed withanyOf. - Make sure that the new schema is consumable by an OpenAPI code generator, e.g.,
@rtk-query/codegen-openapi.
matthewelwell
Metadata
Metadata
Assignees
Labels
No labels