From 31b4af5fbbc0cf5dc0517b57248a107d96cb33d7 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Tue, 27 Feb 2024 09:20:27 +0800 Subject: [PATCH] =?UTF-8?q?doc:=20=E5=A2=9E=E5=8A=A0config=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/system/views.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/apps/system/views.py b/apps/system/views.py index dfd9c8be..7a6c86d8 100755 --- a/apps/system/views.py +++ b/apps/system/views.py @@ -2,6 +2,7 @@ import configparser import os import importlib import json +from drf_yasg import openapi from django.contrib.auth.hashers import check_password, make_password from django.db import transaction from django_celery_beat.models import (CrontabSchedule, IntervalSchedule, @@ -737,6 +738,10 @@ class SysBaseConfigView(APIView): permission_classes = [] read_keys = ['base', 'apk'] + @swagger_auto_schema(manual_parameters=[ + openapi.Parameter(name="project_code", in_=openapi.IN_QUERY, + type=openapi.TYPE_STRING, required=False) + ]) def get(self, request, format=None): """ 获取系统基本信息 @@ -761,6 +766,12 @@ class SysBaseConfigView(APIView): class SysConfigView(MyLoggingMixin, APIView): perms_map = {'get': 'sysconfig.view', 'put': 'sysconfig.update'} + @swagger_auto_schema(manual_parameters=[ + openapi.Parameter(name="project_code", in_=openapi.IN_QUERY, + type=openapi.TYPE_STRING, required=False), + openapi.Parameter(name="reload", in_=openapi.IN_QUERY, + type=openapi.TYPE_BOOLEAN, required=False), + ]) def get(self, request, format=None): """ 获取config json