Here it is the UI i can get from drf-spectacular redoc: screenshot As you can see the only way to know the apps is from the names: v1_foo_foodcourtrests_des v1_ord_customer_basket_li Here foo and ord are app names.
But I want to have a separator or something to separate these by the app names
Here is what I got so far and still no luck: https://drf-spectacular.readthedocs.io/en/latest/settings.html#settings
take a look at the answers to this question
one of the possible solutions is to use tags and operation_id in the extend_schema decorator to achieve the desired outcome.
for example:
from drf_spectacular.utils import extend_schema
@extend_schema(tags=['Users App'])
class UserView(APIView):
@extend_schema(operation_id='Get the user Details')
def get(self, request, *args, **kwargs):
# response
will result in:

another more streamlined solution if all of the urls have the same starting part like /v1/ is to change the drf spectacular settings:
SPECTACULAR_SETTINGS = {
'SCHEMA_PATH_PREFIX': r'/v1/',
}
this will generate new sections based on each app initial url part, like foo, ord, etc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With