You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project with a large number of API endpoints (40 viewsets - approximately 120 endpoints). I am using spectacular for the docs, I fixed all the warnings but still the schema generation takes quite a lot. By running:
14257450 function calls (13330353 primitive calls) in 12.067
The use of extend_schema and extend_schema_view is just for specifying tags and operation_id. Everything else is autogenerated.
So, I understand that spectacular needs to inspect all the code but are there any best practices which I am missing and that may help reduce the generation time?
I have a project with a large number of API endpoints (40 viewsets - approximately 120 endpoints). I am using spectacular for the docs, I fixed all the warnings but still the schema generation takes quite a lot. By running:
python -m cProfile ./manage.py spectacular --format openapi-json --file schema.json
I get this:
14257450 function calls (13330353 primitive calls) in 12.067
The use of
extend_schema
andextend_schema_view
is just for specifyingtags
andoperation_id
. Everything else is autogenerated.So, I understand that spectacular needs to inspect all the code but are there any best practices which I am missing and that may help reduce the generation time?
Is this ticket going to have any impact #1371?
The text was updated successfully, but these errors were encountered: