Clarify get_schema_fields signature

I had to look for the signature of `get_schema_fields()`in source code.
This commit is contained in:
Azim Khakulov 2017-04-12 12:25:27 +02:00
parent f884814b89
commit 613aa61ada
2 changed files with 10 additions and 4 deletions

View File

@ -432,8 +432,11 @@ The method should return a rendered HTML string.
## Pagination & schemas ## Pagination & schemas
You can also make the filter controls available to the schema autogeneration You can also make the filter controls available to the schema autogeneration
that REST framework provides, by implementing a `get_schema_fields()` method, that REST framework provides, by implementing a `get_schema_fields()` method. This method should have the following signature:
which should return a list of `coreapi.Field` instances.
`get_schema_fields(self, view)`
The method should return a list of `coreapi.Field` instances.
# Third party packages # Third party packages

View File

@ -279,8 +279,11 @@ API responses for list endpoints will now include a `Link` header, instead of in
## Pagination & schemas ## Pagination & schemas
You can also make the pagination controls available to the schema autogeneration You can also make the pagination controls available to the schema autogeneration
that REST framework provides, by implementing a `get_schema_fields()` method, that REST framework provides, by implementing a `get_schema_fields()` method. This method should have the following signature:
which should return a list of `coreapi.Field` instances.
`get_schema_fields(self, view)`
The method should return a list of `coreapi.Field` instances.
--- ---