MaxKB/apps/common/mixins/api_mixin.py
2025-04-14 20:11:23 +08:00

39 lines
775 B
Python
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 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