-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Incorrect regex in URLPathVersioning documentation #3638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Correct and correct.
It's not mandatory (either would be valid) but I would like to leave the style as it is. |
Both options seem to work fine. Can anyone explain the difference between |
[] is for set of characters which means [abc] will match 'a', 'b', or 'c'. |
Fix for Incorrect regex in URLPathVersioning documentation #3638
Closed by #3675 |
Version: 3.3.1
The documentation for
versioning.URLPathVersioning
(both the docstring and the API guide) provides the following example for the URL regex:r'^(?P<version>[v1|v2]+)/bookings/$'
. Unless I am misunderstanding, I think that[v1|v2]
is supposed to be(v1|v2)
, and that the+
should be removed. Also, I am not sure whether it is customary to add a mandatory trailing slash or not.(From git blame I see the regex was changed to the above in pull request #3037).
The text was updated successfully, but these errors were encountered: