Skip to content

DjangoQLSchemaSerializer in drf Viewsets #102

@joenatan

Description

@joenatan

Thanks for the awesome package!

How can I map the introspection endpoint in drf (Django Rest Framework)?

My idea would be like this:
/api/v1//introspect/

I have now implemented this with an endpoint action in my viewset:

    @action(detail=False, methods=['get'])
    def introspect(self, request):
        return Response(DjangoQLSchema(MyModel).as_dict())

But a deprecated warning appears that I should use DjangoQLSchemaSerializer. But how?

DjangoQLSchemaSerializer.serialize(MyModel)

Doesn't work.

Thanks for your help

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions