cvat-ai / cvat

Annotate better with CVAT, the industry-leading data engine for machine learning. Used and trusted by teams at any scale, for data of any scale.
https://cvat.ai
MIT License
12.47k stars 2.99k forks source link

Migrate from drf-yasg to drf-spectacular #3015

Closed ActiveChooN closed 2 years ago

ActiveChooN commented 3 years ago

My actions before raising this issue

Proposal

Now we are using default drf-yasg schema generator which is based on OpenAPI 2.0. But it has some restrictions that can limit us in creating the correct documentation for the API. For example, such as the absence of write_only fields and the absence of the read_only flag for nested objects using $ref. It can limit us in creating exact one-to-one DRF schema <-> OpenAPI doc. Also drf-yags maintainer told that he would not implement OpenAPI 3.0 specs in the lib. So better way is to moving forward to the OpenAPI 3.0 or OpenAPI 3.1 standards and use drf-spectacular as a lib for creating API schema. It can helps us to use OpenAPI 3.0 standard for API schema, but it requires to rewrite documentation for all django views in the app.

g-kartik commented 3 years ago

@ActiveChooN Hi, may I task this up as my first issue?