django-rest-invitations icon indicating copy to clipboard operation
django-rest-invitations copied to clipboard

drf-spectacular support

Open jayvdb opened this issue 4 years ago • 0 comments

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.

jayvdb avatar May 01 '20 14:05 jayvdb