class AutoSchema(ViewInspector): (source)
Default inspector for APIView Responsible for per-view introspection and schema generation.
Static Method | update |
Update list of coreapi.Field instances, overwriting on `Field.name`. |
Method | __init__ |
Parameters: |
Method | get |
Return the 'encoding' parameter to use for a given endpoint. |
Method | get |
Undocumented |
Method | get |
Generate `coreapi.Link` for self.view, path and method. |
Method | get |
Undocumented |
Method | get |
Undocumented |
Method | get |
Return a list of `coreapi.Field` instances corresponding to any templated path variables. |
Method | get |
Return a list of `coreapi.Field` instances corresponding to any request body input, as determined by the serializer class. |
Method | _allows |
Determine whether to include filter Fields in schema. |
Instance Variable | _manual |
Undocumented |
Inherited from ViewInspector
:
Method | __get__ |
Enables `ViewInspector` as a Python _Descriptor_. |
Method | __set__ |
Undocumented |
Method | get |
Determine a path description. |
Method | view |
Undocumented |
Method | view |
Undocumented |
Class Variable | header |
Undocumented |
Instance Variable | instance |
Undocumented |
Property | view |
View property. |
Method | _get |
Undocumented |
Instance Variable | _view |
Undocumented |
Update list of coreapi.Field instances, overwriting on `Field.name`. Utility function to handle replacing coreapi.Field fields from a list by name. Used to handle `manual_fields`. Parameters: * `fields`: list of `coreapi.Field` instances to update * `update_with: list of `coreapi.Field` instances to add or replace.
Parameters: * `manual_fields`: list of `coreapi.Field` instances that will be added to auto-generated fields, overwriting on `Field.name`
Generate `coreapi.Link` for self.view, path and method. This is the main _public_ access point. Parameters: * path: Route path for view from URLConf. * method: The HTTP request method. * base_url: The project "mount point" as given to SchemaGenerator
Return a list of `coreapi.Field` instances corresponding to any request body input, as determined by the serializer class.
Determine whether to include filter Fields in schema. Default implementation looks for ModelViewSet or GenericAPIView actions/methods that cause filtering on the default implementation. Override to adjust behaviour for your view. Note: Introduced in v3.7: Initially "private" (i.e. with leading underscore) to allow changes based on user experience.