Getting TypeError from AutoSchema.get_operation() #9490
-
Added APItally to a working DRF back-end. FWIW, it also uses
This is with:
Any suggestions appreciated. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This typically happens when the generating the open API schema using DRF methods on endpoints where DRF-spectacular AutoSchema is set. The stack trace points at this line: They use DRF SchemaGenerator, but spectacular has its own one https://github.com/tfranzel/drf-spectacular/blob/cc916372a0e3fafc3af48f94dd1a985f5fc466e9/drf_spectacular/generators.py#L102 IMO this is more an issue for APItally than DRF, they could detect whether spectacular is installed and use the appropriate generator if needed. |
Beta Was this translation helpful? Give feedback.
-
its better to use https://drf-yasg.readthedocs.io/en/stable/readme.html |
Beta Was this translation helpful? Give feedback.
This typically happens when the generating the open API schema using DRF methods on endpoints where DRF-spectacular AutoSchema is set. The stack trace points at this line:
https://github.com/apitally/apitally-py/blob/4fe5298e7cd7892f5368e29acb1a86e0593dcacd/apitally/django.py#L260
They use DRF SchemaGenerator, but spectacular has its own one https://github.com/tfranzel/drf-spectacular/blob/cc916372a0e3fafc3af48f94dd1a985f5fc466e9/drf_spectacular/generators.py#L102
IMO this is more an issue for APItally than DRF, they could detect whether spectacular is installed and use the appropriate generator if needed.