Skip to content

Commit 7d7912b

Browse files
n2ygkcarltongibson
authored andcommitted
Retain ordering of paths as provided in urlconf in OpenAPI schemas.
1 parent c975a1b commit 7d7912b

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

docs/community/release-notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ You can determine your currently installed version using `pip show`:
4444

4545
**Date**: [Unreleased][3.10.0-milestone]
4646

47+
* Updated PyYaml dependency for OpenAPI schema generation to `pyyaml>=5.1` [#6680][gh6680]
4748
* Resolve DeprecationWarning with markdown. [#6317][gh6317]
4849

4950

@@ -2137,4 +2138,5 @@ For older release notes, [please see the version 2.x documentation][old-release-
21372138
[gh6613]: https://github.com/encode/django-rest-framework/issues/6613
21382139

21392140
<!-- 3.10.0 -->
2141+
[gh6680]: https://github.com/encode/django-rest-framework/issues/6680
21402142
[gh6317]: https://github.com/encode/django-rest-framework/issues/6317

rest_framework/schemas/generators.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def endpoint_ordering(endpoint):
5454
'PATCH': 3,
5555
'DELETE': 4
5656
}.get(method, 5)
57-
return (path, method_priority)
57+
return (method_priority,)
5858

5959

6060
_PATH_PARAMETER_COMPONENT_RE = re.compile(

0 commit comments

Comments
 (0)