@@ -171,24 +171,6 @@ def get_request_body_api():
171171 }
172172 )
173173
174- @staticmethod
175- def get_response_body_api ():
176- return openapi .Schema (
177- type = openapi .TYPE_OBJECT ,
178- properties = {
179- 'id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ('user id' ), description = _ ('user id' )),
180- 'username' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ('Username' ), description = _ ('Username' )),
181- 'email' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ('Email' ), description = _ ('Email' )),
182- 'role' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ('Role' ), description = _ ('Role' )),
183- 'is_active' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ('Is active' ),
184- description = _ ('Is active' )),
185- 'team_id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ('team id' ), description = _ ('team id' )),
186- 'user_id' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ('user id' ), description = _ ('user id' )),
187- 'type' : openapi .Schema (type = openapi .TYPE_STRING , title = _ ('member type' ),
188- description = _ ('member type manage|member' )),
189- }
190- )
191-
192174 @transaction .atomic
193175 def batch_add_member (self , user_id_list : List [str ], with_valid = True ):
194176 """
@@ -261,7 +243,8 @@ def list_member(self, with_valid=True):
261243 'team_id' : self .data .get ("team_id" ), 'user_id' : manage_member .id , 'type' : 'manage'
262244 }, * member_list ]
263245
264- def get_response_body_api (self ):
246+ @staticmethod
247+ def get_response_body_api ():
265248 return get_api_response (openapi .Schema (
266249 type = openapi .TYPE_ARRAY , title = _ ('member list' ), description = _ ('member list' ),
267250 items = UserSerializer ().get_response_body_api ()
0 commit comments