MaxKB/apps/users/api/user.py
2025-04-17 10:35:02 +08:00

43 lines
1.0 KiB
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 user.py
@date2025/4/14 19:23
@desc:
"""
from drf_spectacular.types import OpenApiTypes
from drf_spectacular.utils import OpenApiParameter
from common.mixins.api_mixin import APIMixin
from common.result import ResultSerializer
from users.serializers.user import UserProfileResponse
class ApiUserProfileResponse(ResultSerializer):
def get_data(self):
return UserProfileResponse()
class UserProfileAPI(APIMixin):
@staticmethod
def get_response():
return ApiUserProfileResponse
class TestWorkspacePermissionUserApi(APIMixin):
@staticmethod
def get_parameters():
return [OpenApiParameter(
# 参数的名称是done
name="workspace_id",
# 对参数的备注
description="工作空间id",
# 指定参数的类型
type=OpenApiTypes.STR,
location=OpenApiParameter.PATH,
# 指定必须给
required=True,
)]