summaryrefslogtreecommitdiffstats
path: root/catalog/swagger
diff options
context:
space:
mode:
authorhongyuzhao <zhao.hongyu@zte.com.cn>2019-11-29 16:58:52 +0800
committerhongyuzhao <zhao.hongyu@zte.com.cn>2019-11-30 11:21:02 +0800
commit06bfcce3f57176e6b428e43e8e411e245a5fa75e (patch)
tree68e15b2e0948251b6955e5e95ba6fab57c2bb4b7 /catalog/swagger
parent24ea7e1390912ba99304085c249e17dce46b047a (diff)
Swagger issue fixes from the Ericsson team:content-type extends the "application / octet-stream"
Change-Id: Ib516dadf8430e5b4230ac1d51d936517e9cec8ba Issue-ID: MODELING-288 Signed-off-by: hongyuzhao <zhao.hongyu@zte.com.cn>
Diffstat (limited to 'catalog/swagger')
-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"]