diff --git a/rest_framework/schemas/__init__.py b/rest_framework/schemas/__init__.py index 2e972ceb6..d69925bca 100644 --- a/rest_framework/schemas/__init__.py +++ b/rest_framework/schemas/__init__.py @@ -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 .inspectors import AutoSchema, ManualSchema # noqa diff --git a/rest_framework/schemas/generators.py b/rest_framework/schemas/generators.py index a5778f0f8..eeea9d709 100644 --- a/rest_framework/schemas/generators.py +++ b/rest_framework/schemas/generators.py @@ -79,7 +79,7 @@ def endpoint_ordering(endpoint): return (path, method_priority) -class EndpointInspector(object): +class EndpointEnumerator(object): """ A class to determine the available API endpoints that a project exposes. """ @@ -172,7 +172,7 @@ class SchemaGenerator(object): 'patch': 'partial_update', 'delete': 'destroy', } - endpoint_inspector_cls = EndpointInspector + endpoint_inspector_cls = EndpointEnumerator # 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.