fix: 统一业务响应状态码约定

This commit is contained in:
2026-08-09 01:16:53 +08:00
parent 20e92dc82f
commit 66bc98ca8a
7 changed files with 106 additions and 92 deletions
+2 -18
View File
@@ -108,10 +108,6 @@ paths:
data:
$ref: '#/definitions/middlewares.TokenPair'
type: object
"401":
description: Unauthorized
schema:
$ref: '#/definitions/utils.APIResponse'
summary: 用户登录
tags:
- auth
@@ -138,10 +134,6 @@ paths:
data:
$ref: '#/definitions/middlewares.TokenPair'
type: object
"401":
description: Unauthorized
schema:
$ref: '#/definitions/utils.APIResponse'
summary: 刷新并轮换 Token
tags:
- auth
@@ -159,8 +151,8 @@ paths:
produces:
- application/json
responses:
"201":
description: Created
"200":
description: OK
schema:
allOf:
- $ref: '#/definitions/utils.APIResponse'
@@ -168,14 +160,6 @@ paths:
data:
$ref: '#/definitions/auth.UserResponse'
type: object
"400":
description: Bad Request
schema:
$ref: '#/definitions/utils.APIResponse'
"409":
description: Conflict
schema:
$ref: '#/definitions/utils.APIResponse'
summary: 注册示例用户
tags:
- auth