-
Notifications
You must be signed in to change notification settings - Fork 160
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
Ability to have the default parameter name in urls. #180
Comments
drf_yasg.generators.OpenAPISchemaGenerator must be overridden this method is {pk} Force translation of path arguments into model field names.
settings.py
But pk It is clearer to use the model field name instead. |
I ported this to drf-spectacular but still don't understand what to do with it...!? :-(
|
Just want to start off by saying, what a great library. I love it!
I was wondering if there is a way currently, or maybe implement here in the future, have the default parameter catchers in the URL. For example...
Here are some URLs that I generated using the django-extensions library.
and here is what my
urls.py
file looks like with the nested routing.Obviously I could change the
lookup
key to something else but I want it to be the same as the 'default' way that I think DRF/Django uses?I also use the library
drf_yasg
to generate a schema API page and my URLs look like so.Anyone have an idea how I could accomplish this?
Edit:
I want to elaborate more since I don't think I explained super well. I want to be able to put the default
pk
in the URL which then would make it{id}
in the API webpage that I generated withdrf_yasg
The text was updated successfully, but these errors were encountered: