Arguments passed to an @exposed
method as positional and keyword are not refused
#1160
Labels
bug(fix)
Something isn't working or address a specific issue or vulnerability
discussion
These topics must be discussed before completion
Priority: Medium
This issue may be useful, and needs some attention.
I just found out you can provide the same argument twice; as positional and keyword. But the positional takes always(?) precedence over the keyword.
I mean this behavior is kind of okay, if it's well documented, but it isn't. And this could cause confisions.
I would rather raise an error if you provide the argument twice -- like the python interpreter would do it.
Here a small example:
/demo
{'arg1': 1, 'arg2': 2}
/demo/7
{'arg1': 7, 'arg2': 2}
/demo?arg1=8
{'arg1': 8, 'arg2': 2}
/demo/7?arg1=8
{'arg1': 7, 'arg2': 2}
The text was updated successfully, but these errors were encountered: