Skip to content

Commit

Permalink
djapy url fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
Bishwas-py committed Feb 26, 2024
1 parent d00e658 commit 2228c90
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion djapy/core/openapi/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ def get_parameters(self, view_func):
pattern = '[<](?:(?P<type>\w+?):)?(?P<name>\w+)[>]'
match = re.search(pattern, str(url_pattern.pattern))
if match:
name, _type = match.groups()
_type, name = match.groups()
print(_type, name)
schema = {"type": _type}
parameter = self.make_parameters(name, False, schema, True) # Assuming url params are not optional
self.parameters_keys.append(name)
Expand Down
Binary file modified djapy/core/openapi/__pycache__/__init__.cpython-311.pyc
Binary file not shown.

0 comments on commit 2228c90

Please sign in to comment.