mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-22 09:36:49 +03:00
Fix schema endpoint example (#7178)
* Fix schema endpoint example Endpoint `schema` collides with `schema` class variable `schema` which is use for specification generation * Update metadata.md Co-authored-by: Tom Christie <tom@tomchristie.com>
This commit is contained in:
parent
5b388e8f83
commit
46be2ffd34
|
@ -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.
|
For example, the following additional route could be used on a viewset to provide a linkable schema endpoint.
|
||||||
|
|
||||||
@action(methods=['GET'], detail=False)
|
@action(methods=['GET'], detail=False)
|
||||||
def schema(self, request):
|
def api_schema(self, request):
|
||||||
meta = self.metadata_class()
|
meta = self.metadata_class()
|
||||||
data = meta.determine_metadata(request, self)
|
data = meta.determine_metadata(request, self)
|
||||||
return Response(data)
|
return Response(data)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user