aboutsummaryrefslogtreecommitdiffstats
path: root/catalog/swagger/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'catalog/swagger/views.py')
-rw-r--r--catalog/swagger/views.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/catalog/swagger/views.py b/catalog/swagger/views.py
index 4739188..93be679 100644
--- a/catalog/swagger/views.py
+++ b/catalog/swagger/views.py
@@ -17,6 +17,7 @@ import os
from rest_framework.response import Response
from rest_framework.views import APIView
+from drf_yasg.inspectors import SwaggerAutoSchema
class SwaggerJsonView(APIView):
@@ -26,3 +27,9 @@ class SwaggerJsonView(APIView):
json_data = json.JSONDecoder().decode(f.read())
f.close()
return Response(json_data)
+
+
+class EtsiCatalogFileAutoSchema(SwaggerAutoSchema):
+ def get_produces(self):
+ super(EtsiCatalogFileAutoSchema, self).get_produces()
+ return ["application/octet-stream", "application/json"]