[add] Room OK
This commit is contained in:
		| @@ -5,15 +5,18 @@ | ||||
|     "version": "1.0.0" | ||||
|   }, | ||||
|   "paths": { | ||||
|     "/Send": { | ||||
|     "/account/Login": { | ||||
|       "post": { | ||||
|         "operationId": "Send", | ||||
|         "tags": [ | ||||
|           "account" | ||||
|         ], | ||||
|         "operationId": "account/Login", | ||||
|         "requestBody": { | ||||
|           "description": "Req<Send>", | ||||
|           "description": "Req<Login>", | ||||
|           "content": { | ||||
|             "application/json": { | ||||
|               "schema": { | ||||
|                 "$ref": "#/components/schemas/PtlSend_ReqSend" | ||||
|                 "$ref": "#/components/schemas/account_PtlLogin_ReqLogin" | ||||
|               } | ||||
|             } | ||||
|           } | ||||
| @@ -25,7 +28,7 @@ | ||||
|               "application/json": { | ||||
|                 "schema": { | ||||
|                   "type": "object", | ||||
|                   "description": "ApiReturn<ResSend>", | ||||
|                   "description": "ApiReturn<ResLogin>", | ||||
|                   "properties": { | ||||
|                     "isSucc": { | ||||
|                       "type": "boolean", | ||||
| @@ -35,7 +38,242 @@ | ||||
|                       "default": true | ||||
|                     }, | ||||
|                     "res": { | ||||
|                       "$ref": "#/components/schemas/PtlSend_ResSend" | ||||
|                       "$ref": "#/components/schemas/account_PtlLogin_ResLogin" | ||||
|                     } | ||||
|                   } | ||||
|                 } | ||||
|               } | ||||
|             } | ||||
|           }, | ||||
|           "default": { | ||||
|             "description": "Error", | ||||
|             "$ref": "#/components/responses/error" | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     "/room/ChangeState": { | ||||
|       "post": { | ||||
|         "tags": [ | ||||
|           "room" | ||||
|         ], | ||||
|         "operationId": "room/ChangeState", | ||||
|         "requestBody": { | ||||
|           "description": "Req<ChangeState>", | ||||
|           "content": { | ||||
|             "application/json": { | ||||
|               "schema": { | ||||
|                 "$ref": "#/components/schemas/room_PtlChangeState_ReqChangeState" | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         "responses": { | ||||
|           "200": { | ||||
|             "description": "Success", | ||||
|             "content": { | ||||
|               "application/json": { | ||||
|                 "schema": { | ||||
|                   "type": "object", | ||||
|                   "description": "ApiReturn<ResChangeState>", | ||||
|                   "properties": { | ||||
|                     "isSucc": { | ||||
|                       "type": "boolean", | ||||
|                       "enum": [ | ||||
|                         true | ||||
|                       ], | ||||
|                       "default": true | ||||
|                     }, | ||||
|                     "res": { | ||||
|                       "$ref": "#/components/schemas/room_PtlChangeState_ResChangeState" | ||||
|                     } | ||||
|                   } | ||||
|                 } | ||||
|               } | ||||
|             } | ||||
|           }, | ||||
|           "default": { | ||||
|             "description": "Error", | ||||
|             "$ref": "#/components/responses/error" | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     "/room/Create": { | ||||
|       "post": { | ||||
|         "tags": [ | ||||
|           "room" | ||||
|         ], | ||||
|         "operationId": "room/Create", | ||||
|         "requestBody": { | ||||
|           "description": "Req<Create>", | ||||
|           "content": { | ||||
|             "application/json": { | ||||
|               "schema": { | ||||
|                 "$ref": "#/components/schemas/room_PtlCreate_ReqCreate" | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         "responses": { | ||||
|           "200": { | ||||
|             "description": "Success", | ||||
|             "content": { | ||||
|               "application/json": { | ||||
|                 "schema": { | ||||
|                   "type": "object", | ||||
|                   "description": "ApiReturn<ResCreate>", | ||||
|                   "properties": { | ||||
|                     "isSucc": { | ||||
|                       "type": "boolean", | ||||
|                       "enum": [ | ||||
|                         true | ||||
|                       ], | ||||
|                       "default": true | ||||
|                     }, | ||||
|                     "res": { | ||||
|                       "$ref": "#/components/schemas/room_PtlCreate_ResCreate" | ||||
|                     } | ||||
|                   } | ||||
|                 } | ||||
|               } | ||||
|             } | ||||
|           }, | ||||
|           "default": { | ||||
|             "description": "Error", | ||||
|             "$ref": "#/components/responses/error" | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     "/room/Exit": { | ||||
|       "post": { | ||||
|         "tags": [ | ||||
|           "room" | ||||
|         ], | ||||
|         "operationId": "room/Exit", | ||||
|         "requestBody": { | ||||
|           "description": "Req<Exit>", | ||||
|           "content": { | ||||
|             "application/json": { | ||||
|               "schema": { | ||||
|                 "$ref": "#/components/schemas/room_PtlExit_ReqExit" | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         "responses": { | ||||
|           "200": { | ||||
|             "description": "Success", | ||||
|             "content": { | ||||
|               "application/json": { | ||||
|                 "schema": { | ||||
|                   "type": "object", | ||||
|                   "description": "ApiReturn<ResExit>", | ||||
|                   "properties": { | ||||
|                     "isSucc": { | ||||
|                       "type": "boolean", | ||||
|                       "enum": [ | ||||
|                         true | ||||
|                       ], | ||||
|                       "default": true | ||||
|                     }, | ||||
|                     "res": { | ||||
|                       "$ref": "#/components/schemas/room_PtlExit_ResExit" | ||||
|                     } | ||||
|                   } | ||||
|                 } | ||||
|               } | ||||
|             } | ||||
|           }, | ||||
|           "default": { | ||||
|             "description": "Error", | ||||
|             "$ref": "#/components/responses/error" | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     "/room/Join": { | ||||
|       "post": { | ||||
|         "tags": [ | ||||
|           "room" | ||||
|         ], | ||||
|         "operationId": "room/Join", | ||||
|         "requestBody": { | ||||
|           "description": "Req<Join>", | ||||
|           "content": { | ||||
|             "application/json": { | ||||
|               "schema": { | ||||
|                 "$ref": "#/components/schemas/room_PtlJoin_ReqJoin" | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         "responses": { | ||||
|           "200": { | ||||
|             "description": "Success", | ||||
|             "content": { | ||||
|               "application/json": { | ||||
|                 "schema": { | ||||
|                   "type": "object", | ||||
|                   "description": "ApiReturn<ResJoin>", | ||||
|                   "properties": { | ||||
|                     "isSucc": { | ||||
|                       "type": "boolean", | ||||
|                       "enum": [ | ||||
|                         true | ||||
|                       ], | ||||
|                       "default": true | ||||
|                     }, | ||||
|                     "res": { | ||||
|                       "$ref": "#/components/schemas/room_PtlJoin_ResJoin" | ||||
|                     } | ||||
|                   } | ||||
|                 } | ||||
|               } | ||||
|             } | ||||
|           }, | ||||
|           "default": { | ||||
|             "description": "Error", | ||||
|             "$ref": "#/components/responses/error" | ||||
|           } | ||||
|         } | ||||
|       } | ||||
|     }, | ||||
|     "/room/List": { | ||||
|       "post": { | ||||
|         "tags": [ | ||||
|           "room" | ||||
|         ], | ||||
|         "operationId": "room/List", | ||||
|         "requestBody": { | ||||
|           "description": "Req<List>", | ||||
|           "content": { | ||||
|             "application/json": { | ||||
|               "schema": { | ||||
|                 "$ref": "#/components/schemas/room_PtlList_ReqList" | ||||
|               } | ||||
|             } | ||||
|           } | ||||
|         }, | ||||
|         "responses": { | ||||
|           "200": { | ||||
|             "description": "Success", | ||||
|             "content": { | ||||
|               "application/json": { | ||||
|                 "schema": { | ||||
|                   "type": "object", | ||||
|                   "description": "ApiReturn<ResList>", | ||||
|                   "properties": { | ||||
|                     "isSucc": { | ||||
|                       "type": "boolean", | ||||
|                       "enum": [ | ||||
|                         true | ||||
|                       ], | ||||
|                       "default": true | ||||
|                     }, | ||||
|                     "res": { | ||||
|                       "$ref": "#/components/schemas/room_PtlList_ResList" | ||||
|                     } | ||||
|                   } | ||||
|                 } | ||||
| @@ -52,6 +290,20 @@ | ||||
|   }, | ||||
|   "components": { | ||||
|     "schemas": { | ||||
|       "account_PtlLogin_ReqLogin": { | ||||
|         "type": "object", | ||||
|         "properties": { | ||||
|           "name": { | ||||
|             "type": "string" | ||||
|           } | ||||
|         }, | ||||
|         "required": [ | ||||
|           "name" | ||||
|         ] | ||||
|       }, | ||||
|       "account_PtlLogin_ResLogin": { | ||||
|         "type": "number" | ||||
|       }, | ||||
|       "MsgChat_MsgChat": { | ||||
|         "type": "object", | ||||
|         "properties": { | ||||
| @@ -68,29 +320,88 @@ | ||||
|           "time" | ||||
|         ] | ||||
|       }, | ||||
|       "PtlSend_ReqSend": { | ||||
|       "room_MsgChangeState_MsgChangeState": { | ||||
|         "type": "number" | ||||
|       }, | ||||
|       "room_MsgExit_MsgExit": { | ||||
|         "type": "number" | ||||
|       }, | ||||
|       "room_MsgGoToGame_MsgGoToGame": { | ||||
|         "type": "number" | ||||
|       }, | ||||
|       "room_PtlChangeState_ReqChangeState": { | ||||
|         "type": "object", | ||||
|         "properties": { | ||||
|           "content": { | ||||
|           "state": { | ||||
|             "type": "number" | ||||
|           } | ||||
|         }, | ||||
|         "required": [ | ||||
|           "state" | ||||
|         ] | ||||
|       }, | ||||
|       "room_PtlChangeState_ResChangeState": { | ||||
|         "type": "number" | ||||
|       }, | ||||
|       "room_PtlCreate_ReqCreate": { | ||||
|         "type": "object", | ||||
|         "properties": { | ||||
|           "null": { | ||||
|             "type": "string" | ||||
|           } | ||||
|         }, | ||||
|         "required": [ | ||||
|           "content" | ||||
|           "null" | ||||
|         ] | ||||
|       }, | ||||
|       "PtlSend_ResSend": { | ||||
|       "room_PtlCreate_ResCreate": { | ||||
|         "type": "number" | ||||
|       }, | ||||
|       "room_PtlExit_ReqExit": { | ||||
|         "type": "object", | ||||
|         "properties": { | ||||
|           "time": { | ||||
|             "type": "string", | ||||
|             "format": "date-time" | ||||
|           "null": { | ||||
|             "type": "string" | ||||
|           } | ||||
|         }, | ||||
|         "required": [ | ||||
|           "time" | ||||
|           "null" | ||||
|         ] | ||||
|       }, | ||||
|       "room_PtlExit_ResExit": { | ||||
|         "type": "number" | ||||
|       }, | ||||
|       "room_PtlJoin_ReqJoin": { | ||||
|         "type": "object", | ||||
|         "properties": { | ||||
|           "roomId": { | ||||
|             "type": "number" | ||||
|           } | ||||
|         }, | ||||
|         "required": [ | ||||
|           "roomId" | ||||
|         ] | ||||
|       }, | ||||
|       "room_PtlJoin_ResJoin": { | ||||
|         "type": "number" | ||||
|       }, | ||||
|       "room_PtlList_ReqList": { | ||||
|         "type": "object", | ||||
|         "properties": { | ||||
|           "null": { | ||||
|             "type": "string" | ||||
|           } | ||||
|         }, | ||||
|         "required": [ | ||||
|           "null" | ||||
|         ] | ||||
|       }, | ||||
|       "room_PtlList_ResList": { | ||||
|         "type": "array", | ||||
|         "items": { | ||||
|           "type": "object" | ||||
|         } | ||||
|       }, | ||||
|       "?bson_ObjectID": { | ||||
|         "type": "string" | ||||
|       }, | ||||
|   | ||||
							
								
								
									
										118
									
								
								docs/tsapi.md
									
									
									
									
									
								
							
							
						
						
									
										118
									
								
								docs/tsapi.md
									
									
									
									
									
								
							| @@ -9,26 +9,130 @@ | ||||
|  | ||||
| ## 目录 | ||||
|  | ||||
| - [Send](#/Send) | ||||
| - account | ||||
|     - [Login](#/account/Login) | ||||
| - room | ||||
|     - [ChangeState](#/room/ChangeState) | ||||
|     - [Create](#/room/Create) | ||||
|     - [Exit](#/room/Exit) | ||||
|     - [Join](#/room/Join) | ||||
|     - [List](#/room/List) | ||||
|  | ||||
| --- | ||||
|  | ||||
| ## Send <a id="/Send"></a> | ||||
| ## account | ||||
|  | ||||
| ### Login <a id="/account/Login"></a> | ||||
|  | ||||
| **路径** | ||||
| - POST `/Send` | ||||
| - POST `/account/Login` | ||||
|  | ||||
| **请求** | ||||
| ```ts | ||||
| interface ReqSend { | ||||
|     content: string | ||||
| interface ReqLogin { | ||||
|     name: string | ||||
| } | ||||
| ``` | ||||
|  | ||||
| **响应** | ||||
| ```ts | ||||
| interface ResSend { | ||||
|     time: /*datetime*/ string | ||||
| type ResLogin = number | ||||
| ``` | ||||
|  | ||||
| --- | ||||
|  | ||||
| ## room | ||||
|  | ||||
| ### ChangeState <a id="/room/ChangeState"></a> | ||||
|  | ||||
| **路径** | ||||
| - POST `/room/ChangeState` | ||||
|  | ||||
| **请求** | ||||
| ```ts | ||||
| interface ReqChangeState { | ||||
|     state: number | ||||
| } | ||||
| ``` | ||||
|  | ||||
| **响应** | ||||
| ```ts | ||||
| type ResChangeState = number | ||||
| ``` | ||||
|  | ||||
| --- | ||||
|  | ||||
| ### Create <a id="/room/Create"></a> | ||||
|  | ||||
| **路径** | ||||
| - POST `/room/Create` | ||||
|  | ||||
| **请求** | ||||
| ```ts | ||||
| interface ReqCreate { | ||||
|     null: string | ||||
| } | ||||
| ``` | ||||
|  | ||||
| **响应** | ||||
| ```ts | ||||
| type ResCreate = number | ||||
| ``` | ||||
|  | ||||
| --- | ||||
|  | ||||
| ### Exit <a id="/room/Exit"></a> | ||||
|  | ||||
| **路径** | ||||
| - POST `/room/Exit` | ||||
|  | ||||
| **请求** | ||||
| ```ts | ||||
| interface ReqExit { | ||||
|     null: string | ||||
| } | ||||
| ``` | ||||
|  | ||||
| **响应** | ||||
| ```ts | ||||
| type ResExit = number | ||||
| ``` | ||||
|  | ||||
| --- | ||||
|  | ||||
| ### Join <a id="/room/Join"></a> | ||||
|  | ||||
| **路径** | ||||
| - POST `/room/Join` | ||||
|  | ||||
| **请求** | ||||
| ```ts | ||||
| interface ReqJoin { | ||||
|     roomId: number | ||||
| } | ||||
| ``` | ||||
|  | ||||
| **响应** | ||||
| ```ts | ||||
| type ResJoin = number | ||||
| ``` | ||||
|  | ||||
| --- | ||||
|  | ||||
| ### List <a id="/room/List"></a> | ||||
|  | ||||
| **路径** | ||||
| - POST `/room/List` | ||||
|  | ||||
| **请求** | ||||
| ```ts | ||||
| interface ReqList { | ||||
|     null: string | ||||
| } | ||||
| ``` | ||||
|  | ||||
| **响应** | ||||
| ```ts | ||||
| type ResList = any[] | ||||
| ``` | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user