From drf-yasg to OpenAPI 3ΒΆ
drf-yasg is an excellent library and the most popular choice for generating OpenAPI 2.0 / Swagger schemas with DRF. Unfortunately, it currently does not provide OpenAPI 3 support. Migration from drf-yasg to drf-spectacular requires only minor modifications.
@swagger_auto_schemais largely equivalent to@extend_schema.manual_parametersis calledparametersopenapi.Parameteris roughly equivalent toOpenApiParameter.@swagger_serializer_methodis equivalent to@extend_schema_field.ref_nameon SerializerMetaclasses is supported (excluding inlining withref_name=None)