UnisKB/apps/common/mixins/api_mixin.py

39 lines
775 B
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

# coding=utf-8
"""
@project: MaxKB
@Author虎虎
@file ApiMixin.py
@date2025/4/14 18:03
@desc:
"""
class APIMixin:
@staticmethod
def get_request():
return None
@staticmethod
def get_response():
return None
@staticmethod
def get_parameters():
"""
return OpenApiParameter(
# 参数的名称是done
name="done",
# 对参数的备注
description="是否完成",
# 指定参数的类型
type=OpenApiTypes.BOOL,
location=OpenApiParameter.QUERY,
# 指定必须给
required=True,
# 指定枚举项
enum=[True, False],
)
"""
return None