Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit840a29a

Browse files
carltongibsonPierre Chiquet
authored and
Pierre Chiquet
committed
Note AutoSchema limitations on bare APIView (encode#5649)
AutoSchema uses GenericAPIView hooks to introspect. If these are not present it’s results will be limited. Note this.Closesencode#5121
1 parente4ce07f commit840a29a

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

‎docs/api-guide/schemas.md‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,18 @@ appropriate Core API `Link` object for the view, request method and path:
167167
(In compiling the schema,`SchemaGenerator` calls`view.schema.get_link()` for
168168
each view, allowed method and path.)
169169

170+
---
171+
172+
**Note**: For basic`APIView` subclasses, default introspection is essentially
173+
limited to the URL kwarg path parameters. For`GenericAPIView`
174+
subclasses, which includes all the provided class based views,`AutoSchema` will
175+
attempt to introspect serialiser, pagination and filter fields, as well as
176+
provide richer path field descriptions. (The key hooks here are the relevant
177+
`GenericAPIView` attributes and methods:`get_serializer`,`pagination_class`,
178+
`filter_backends` and so on.)
179+
180+
---
181+
170182
To customise the`Link` generation you may:
171183

172184
* Instantiate`AutoSchema` on your view with the`manual_fields` kwarg:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp