class documentation

Default inspector for APIView Responsible for per-view introspection and schema generation.

Static Method update_fields Update list of coreapi.Field instances, overwriting on `Field.name`.
Method __init__ Parameters:
Method get_encoding Return the 'encoding' parameter to use for a given endpoint.
Method get_filter_fields Undocumented
Method get_link Generate `coreapi.Link` for self.view, path and method.
Method get_manual_fields Undocumented
Method get_pagination_fields Undocumented
Method get_path_fields Return a list of `coreapi.Field` instances corresponding to any templated path variables.
Method get_serializer_fields Return a list of `coreapi.Field` instances corresponding to any request body input, as determined by the serializer class.
Method _allows_filters Determine whether to include filter Fields in schema.
Instance Variable _manual_fields Undocumented

Inherited from ViewInspector:

Method __get__ Enables `ViewInspector` as a Python _Descriptor_.
Method __set__ Undocumented
Method get_description Determine a path description.
Method view.deleter Undocumented
Method view.setter Undocumented
Class Variable header_regex Undocumented
Instance Variable instance_schemas Undocumented
Property view View property.
Method _get_description_section Undocumented
Instance Variable _view Undocumented
@staticmethod
def update_fields(fields, update_with): (source)

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.

def __init__(self, manual_fields=None): (source)

Parameters: * `manual_fields`: list of `coreapi.Field` instances that will be added to auto-generated fields, overwriting on `Field.name`

def get_encoding(self, path, method): (source)

Return the 'encoding' parameter to use for a given endpoint.

def get_filter_fields(self, path, method): (source)

Undocumented

def get_link(self, path, method, base_url): (source)

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

def get_manual_fields(self, path, method): (source)

Undocumented

def get_pagination_fields(self, path, method): (source)

Undocumented

def get_path_fields(self, path, method): (source)

Return a list of `coreapi.Field` instances corresponding to any templated path variables.

def get_serializer_fields(self, path, method): (source)

Return a list of `coreapi.Field` instances corresponding to any request body input, as determined by the serializer class.

def _allows_filters(self, path, method): (source)

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.

_manual_fields = (source)

Undocumented