Skip to content

Commit

Permalink
Merge pull request #841 from terencehonles/keep-path-parameter-ordering
Browse files Browse the repository at this point in the history
keep path parameters in their given order
  • Loading branch information
JoelLefkowitz authored Mar 8, 2023
2 parents 065b4f1 + 87187b1 commit 5530022
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/drf_yasg/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ def get_path_parameters(self, path, view_cls):
parameters = []
queryset = get_queryset_from_view(view_cls)

for variable in sorted(uritemplate.variables(path)):
for variable in uritemplate.variables(path):
model, model_field = get_queryset_field(queryset, variable)
attrs = get_basic_type_info(model_field) or {'type': openapi.TYPE_STRING}
if getattr(view_cls, 'lookup_field', None) == variable and attrs['type'] == openapi.TYPE_STRING:
Expand Down

0 comments on commit 5530022

Please sign in to comment.