From 41251b64b7a487e9741d46defdc86aa6d61a1787 Mon Sep 17 00:00:00 2001 From: jedi Date: Wed, 25 Oct 2023 00:44:58 +0200 Subject: [PATCH] hide /media endpoint in openapi docs --- backend/files/media_urls.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/backend/files/media_urls.py b/backend/files/media_urls.py index e9b58c9..ffff8e5 100644 --- a/backend/files/media_urls.py +++ b/backend/files/media_urls.py @@ -1,4 +1,5 @@ from django.urls import path +from drf_yasg.utils import swagger_auto_schema from rest_framework import status from rest_framework.decorators import api_view from rest_framework.response import Response @@ -6,6 +7,8 @@ from rest_framework.response import Response from files.models import File +# TODO check file permissions here +@swagger_auto_schema(method='GET', auto_schema=None) @api_view(['GET']) def media_urls(request, id, format=None): try: