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

Warnings while generating OpenAPI Spec with drf-spectacular #214

Open
tiholic opened this issue Mar 6, 2021 · 0 comments
Open

Warnings while generating OpenAPI Spec with drf-spectacular #214

tiholic opened this issue Mar 6, 2021 · 0 comments

Comments

@tiholic
Copy link

tiholic commented Mar 6, 2021

I'm using https://github.com/tfranzel/drf-spectacular for OpenAPI documentation.

Warning #6: could not derive type of path parameter "ballot_pk" because because it is untyped and obtaining queryset from <class 'polls_app.views.BallotPolls'> failed. consider adding a type to the path (e.g. <int:ballot_pk>) or annotating the parameter type with @extend_schema. defaulting to "string".

The same warning repeats to all nested viewsets. I could extend schema for each nested view, but if we have ability to configure the pk type for parent routes, it'd save so much of boilerplate configuration w.r.t @extend_schema!

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

No branches or pull requests

1 participant