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

drf-spectacular support #13

Open
jayvdb opened this issue May 1, 2020 · 0 comments
Open

drf-spectacular support #13

jayvdb opened this issue May 1, 2020 · 0 comments

Comments

@jayvdb
Copy link

jayvdb commented May 1, 2020

https://github.com/tfranzel/drf-spectacular does a good job of openapi schema generation, however it has a few errors and warnings for django-rest-invitations . They all relate to using APIView, and the DRF decorators for it like @api_view. These can be fixed by using the DRF GenericAPIView.

Error #5: Unable to guess serializer for accept_invitation. This is graceful fallback handling for APIViews. Consider using GenericAPIView as view base class, if view is under your control. ignoring view for now. 
Warning #10: could not derive type of path parameter "key" because <class 'rest_invitations.views.WrappedAPIView'> has no queryset. consider annotating the parameter type with @extend_schema. defaulting to "string".
Warning #11: could not resolve "None" for GET /email-invite/invitations/accept-invite/{key}/. Expected either a serializer or some supported override mechanism. defaulting to generic free-form object.
Warning #12: could not resolve request body for POST /email-invite/invitations/accept-invite/{key}/. defaulting to generic free-form object. (maybe annotate a Serializer class?)
Warning #13: could not resolve "None" for POST /email-invite/invitations/accept-invite/{key}/. Expected either a serializer or some supported override mechanism. defaulting to generic free-form object.
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