Skip to content

Commit

Permalink
keep path parameters in their given order
Browse files Browse the repository at this point in the history
  • Loading branch information
terencehonles committed Mar 2, 2023
1 parent 065b4f1 commit 87187b1
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 87187b1

Please sign in to comment.