Skip to content
This repository was archived by the owner on Apr 22, 2020. It is now read-only.
This repository was archived by the owner on Apr 22, 2020. It is now read-only.

Custom schema's on APIView classes are not picked up by the schema generation. #116

@joeribekker

Description

@joeribekker
  • DRF OpenAPI version: 1.3
  • Python version: 3.6

Description

Custom schema's on APIView classes are not picked up by the schema generation.

What I Did

class UserViewSet(viewsets.ModelViewSet):
    queryset = User.objects.all()
    serializer_class = UserSerializer

    schema = AutoSchema(
        manual_fields=[
            coreapi.Field('fields', description='Which field(s) to show.'),
        ]
    )

The UserViewSet.schema is not picked up by the documentation. You would expect to have it show the "fields" parameter.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions