Skip to content
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

Invalid prefix in Swagger. #4605

Closed
PraveshKoirala opened this issue Oct 21, 2016 · 6 comments
Closed

Invalid prefix in Swagger. #4605

PraveshKoirala opened this issue Oct 21, 2016 · 6 comments
Labels
Milestone

Comments

@PraveshKoirala
Copy link

PraveshKoirala commented Oct 21, 2016

I am using python 2.7 and rest framework 3.5.
As the title suggests, the prefix is invalid in swagger. It's best shown by this image.
image

Expected behavior

The prefixes should have been "api" and "auth" instead of "pi" and "uth".

I suspect that it is due to the behavior of "os.path.commonprefix" in python 2.7

@tomchristie tomchristie added this to the 3.5.1 Release milestone Oct 21, 2016
@tomchristie
Copy link
Member

tomchristie commented Oct 21, 2016

Okay, thanks - can you include a minimal example that demonstrates reproducing the issue?

@tomchristie
Copy link
Member

tomchristie commented Oct 21, 2016

Confirmed. Register two API views with the URLs given above, and seeing the same issue.

@tomchristie
Copy link
Member

tomchristie commented Oct 21, 2016

@PraveshKoirala
Copy link
Author

PraveshKoirala commented Oct 21, 2016

This function is in the wrong place, and has nothing to do with paths, don't use it if you are interested in file paths!

Thanks for the link Tom :D :D

@tomchristie
Copy link
Member

tomchristie commented Oct 21, 2016

That usage bug was reported 14 years ago.

If anyone fancies making their first contribution to Python (2.7 docs), it'd be a good one to deal with! 😄

https://docs.python.org/2/library/os.path.html#os.path.commonprefix

@xordoquy
Copy link
Collaborator

xordoquy commented Oct 21, 2016

Don't bother, Python 2.7 doc update patches are rejected.

Forget about that, there's a confusion with earlier 3.x releases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants