Fix schema endpoint example

Endpoint `schema` collides with `schema` class variable `schema` which is use for specification generation
This commit is contained in:
Sardorbek Imomaliev 2020-02-04 15:44:52 +07:00 committed by GitHub
parent 4137ef41ef
commit 3643c05b27
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -71,7 +71,7 @@ If you have specific requirements for creating schema endpoints that are accesse
For example, the following additional route could be used on a viewset to provide a linkable schema endpoint.
@action(methods=['GET'], detail=False)
def schema(self, request):
def _schema(self, request):
meta = self.metadata_class()
data = meta.determine_metadata(request, self)
return Response(data)