Rename to EndpointEnumerator

This commit is contained in:
Carlton Gibson 2017-09-06 17:42:53 +02:00
parent e7f3219fee
commit 35e058cdb1
2 changed files with 13 additions and 2 deletions

View File

@ -1,3 +1,14 @@
# We expose a minimal "public" API directly from `schemas`. This covers the
# basic use-cases:
#
# from rest_framework.schemas import (
# AutoSchema,
# ManualSchema,
# get_schema_view,
# SchemaGenerator,
# )
#
# Other access should target the submodules directly
from .generators import SchemaGenerator from .generators import SchemaGenerator
from .inspectors import AutoSchema, ManualSchema # noqa from .inspectors import AutoSchema, ManualSchema # noqa

View File

@ -79,7 +79,7 @@ def endpoint_ordering(endpoint):
return (path, method_priority) return (path, method_priority)
class EndpointInspector(object): class EndpointEnumerator(object):
""" """
A class to determine the available API endpoints that a project exposes. A class to determine the available API endpoints that a project exposes.
""" """
@ -172,7 +172,7 @@ class SchemaGenerator(object):
'patch': 'partial_update', 'patch': 'partial_update',
'delete': 'destroy', 'delete': 'destroy',
} }
endpoint_inspector_cls = EndpointInspector endpoint_inspector_cls = EndpointEnumerator
# Map the method names we use for viewset actions onto external schema names. # Map the method names we use for viewset actions onto external schema names.
# These give us names that are more suitable for the external representation. # These give us names that are more suitable for the external representation.