Drf-spectacular hide Schemas from components in Swagger UI

In my Swagger UI, I'm trying to hide the Schemas section from components:

enter image description here

I'm using drf-spectacular and I didn't find anything relating to Schemas in the Swagger Configuration.

I tried removing schemas from the JSON response:

from drf_spectacular.views import SpectacularJSONAPIView

class CustomJSONAPIView(SpectacularJSONAPIView):
    def get(self, request, *args, **kwargs):
        response = super().get(request, *args, **kwargs)
        del response.data["components"]["schemas"]
        return response

Which works, but corrupts rest of the Swagger functionality. Is it possible to simply hide this Schemas component without breaking rest of Swagger?

Back to Top