Skip to content

Commit

Permalink
Rename to EndpointEnumerator
Browse files Browse the repository at this point in the history
  • Loading branch information
carltongibson committed Sep 6, 2017
1 parent 1a2888a commit 21b4d78
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
11 changes: 11 additions & 0 deletions rest_framework/schemas/__init__.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions rest_framework/schemas/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
"""
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 21b4d78

Please sign in to comment.