Fix swagger data struct error
Some checks failed
Backend Check Build (NixCN CMS) TeamCity build failed
Client CMS Check Build (NixCN CMS) TeamCity build finished

Signed-off-by: Asai Neko <sugar@sne.moe>
This commit is contained in:
2026-01-29 01:25:12 +08:00
parent f7bde8ef2e
commit 654b196bfd
15 changed files with 136 additions and 316 deletions

View File

@@ -56,7 +56,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_auth.ExchangeResult"
"$ref": "#/definitions/service_auth.ExchangeResponse"
}
}
}
@@ -156,7 +156,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_auth.MagicResult"
"$ref": "#/definitions/service_auth.MagicResponse"
}
}
}
@@ -561,7 +561,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_event.CheckinResult"
"$ref": "#/definitions/service_event.CheckinResponse"
}
}
}
@@ -641,7 +641,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_event.CheckinQueryResult"
"$ref": "#/definitions/service_event.CheckinQueryResponse"
}
}
}
@@ -785,7 +785,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_event.InfoResult"
"$ref": "#/definitions/service_event.InfoResponse"
}
}
}
@@ -879,7 +879,7 @@ const docTemplate = `{
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_user.UserTableResult"
"$ref": "#/definitions/service_user.UserTableResponse"
}
}
}
@@ -1261,30 +1261,6 @@ const docTemplate = `{
}
}
},
"exception.Builder": {
"type": "object",
"properties": {
"endpoint": {
"type": "string"
},
"error": {},
"errorCode": {
"type": "string"
},
"original": {
"type": "string"
},
"service": {
"type": "string"
},
"status": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"service_auth.ExchangeData": {
"type": "object",
"properties": {
@@ -1299,19 +1275,11 @@ const docTemplate = `{
}
}
},
"service_auth.ExchangeResult": {
"service_auth.ExchangeResponse": {
"type": "object",
"properties": {
"common": {
"$ref": "#/definitions/shared.CommonResult"
},
"data": {
"type": "object",
"properties": {
"redirect_uri": {
"type": "string"
}
}
"redirect_uri": {
"type": "string"
}
}
},
@@ -1338,13 +1306,12 @@ const docTemplate = `{
}
}
},
"service_auth.MagicResult": {
"service_auth.MagicResponse": {
"type": "object",
"properties": {
"common": {
"$ref": "#/definitions/shared.CommonResult"
},
"data": {}
"uri": {
"type": "string"
}
}
},
"service_auth.RefreshData": {
@@ -1374,35 +1341,19 @@ const docTemplate = `{
}
}
},
"service_event.CheckinQueryResult": {
"service_event.CheckinQueryResponse": {
"type": "object",
"properties": {
"common": {
"$ref": "#/definitions/shared.CommonResult"
},
"data": {
"type": "object",
"properties": {
"checkin_at": {
"type": "string"
}
}
"checkin_at": {
"type": "string"
}
}
},
"service_event.CheckinResult": {
"service_event.CheckinResponse": {
"type": "object",
"properties": {
"common": {
"$ref": "#/definitions/shared.CommonResult"
},
"data": {
"type": "object",
"properties": {
"checkin_code": {
"type": "string"
}
}
"checkin_code": {
"type": "string"
}
}
},
@@ -1414,25 +1365,17 @@ const docTemplate = `{
}
}
},
"service_event.InfoResult": {
"service_event.InfoResponse": {
"type": "object",
"properties": {
"common": {
"$ref": "#/definitions/shared.CommonResult"
"end_time": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"end_time": {
"type": "string"
},
"name": {
"type": "string"
},
"start_time": {
"type": "string"
}
}
"name": {
"type": "string"
},
"start_time": {
"type": "string"
}
}
},
@@ -1468,12 +1411,9 @@ const docTemplate = `{
}
}
},
"service_user.UserTableResult": {
"service_user.UserTableResponse": {
"type": "object",
"properties": {
"common": {
"$ref": "#/definitions/shared.CommonResult"
},
"user_table": {
"type": "array",
"items": {
@@ -1482,17 +1422,6 @@ const docTemplate = `{
}
}
},
"shared.CommonResult": {
"type": "object",
"properties": {
"exception": {
"$ref": "#/definitions/exception.Builder"
},
"httpCode": {
"type": "integer"
}
}
},
"utils.RespStatus": {
"type": "object",
"properties": {

View File

@@ -45,7 +45,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_auth.ExchangeResult"
"$ref": "#/definitions/service_auth.ExchangeResponse"
}
}
}
@@ -145,7 +145,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_auth.MagicResult"
"$ref": "#/definitions/service_auth.MagicResponse"
}
}
}
@@ -550,7 +550,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_event.CheckinResult"
"$ref": "#/definitions/service_event.CheckinResponse"
}
}
}
@@ -630,7 +630,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_event.CheckinQueryResult"
"$ref": "#/definitions/service_event.CheckinQueryResponse"
}
}
}
@@ -774,7 +774,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_event.InfoResult"
"$ref": "#/definitions/service_event.InfoResponse"
}
}
}
@@ -868,7 +868,7 @@
"type": "object",
"properties": {
"data": {
"$ref": "#/definitions/service_user.UserTableResult"
"$ref": "#/definitions/service_user.UserTableResponse"
}
}
}
@@ -1250,30 +1250,6 @@
}
}
},
"exception.Builder": {
"type": "object",
"properties": {
"endpoint": {
"type": "string"
},
"error": {},
"errorCode": {
"type": "string"
},
"original": {
"type": "string"
},
"service": {
"type": "string"
},
"status": {
"type": "string"
},
"type": {
"type": "string"
}
}
},
"service_auth.ExchangeData": {
"type": "object",
"properties": {
@@ -1288,19 +1264,11 @@
}
}
},
"service_auth.ExchangeResult": {
"service_auth.ExchangeResponse": {
"type": "object",
"properties": {
"common": {
"$ref": "#/definitions/shared.CommonResult"
},
"data": {
"type": "object",
"properties": {
"redirect_uri": {
"type": "string"
}
}
"redirect_uri": {
"type": "string"
}
}
},
@@ -1327,13 +1295,12 @@
}
}
},
"service_auth.MagicResult": {
"service_auth.MagicResponse": {
"type": "object",
"properties": {
"common": {
"$ref": "#/definitions/shared.CommonResult"
},
"data": {}
"uri": {
"type": "string"
}
}
},
"service_auth.RefreshData": {
@@ -1363,35 +1330,19 @@
}
}
},
"service_event.CheckinQueryResult": {
"service_event.CheckinQueryResponse": {
"type": "object",
"properties": {
"common": {
"$ref": "#/definitions/shared.CommonResult"
},
"data": {
"type": "object",
"properties": {
"checkin_at": {
"type": "string"
}
}
"checkin_at": {
"type": "string"
}
}
},
"service_event.CheckinResult": {
"service_event.CheckinResponse": {
"type": "object",
"properties": {
"common": {
"$ref": "#/definitions/shared.CommonResult"
},
"data": {
"type": "object",
"properties": {
"checkin_code": {
"type": "string"
}
}
"checkin_code": {
"type": "string"
}
}
},
@@ -1403,25 +1354,17 @@
}
}
},
"service_event.InfoResult": {
"service_event.InfoResponse": {
"type": "object",
"properties": {
"common": {
"$ref": "#/definitions/shared.CommonResult"
"end_time": {
"type": "string"
},
"data": {
"type": "object",
"properties": {
"end_time": {
"type": "string"
},
"name": {
"type": "string"
},
"start_time": {
"type": "string"
}
}
"name": {
"type": "string"
},
"start_time": {
"type": "string"
}
}
},
@@ -1457,12 +1400,9 @@
}
}
},
"service_user.UserTableResult": {
"service_user.UserTableResponse": {
"type": "object",
"properties": {
"common": {
"$ref": "#/definitions/shared.CommonResult"
},
"user_table": {
"type": "array",
"items": {
@@ -1471,17 +1411,6 @@
}
}
},
"shared.CommonResult": {
"type": "object",
"properties": {
"exception": {
"$ref": "#/definitions/exception.Builder"
},
"httpCode": {
"type": "integer"
}
}
},
"utils.RespStatus": {
"type": "object",
"properties": {

View File

@@ -41,22 +41,6 @@ definitions:
username:
type: string
type: object
exception.Builder:
properties:
endpoint:
type: string
error: {}
errorCode:
type: string
original:
type: string
service:
type: string
status:
type: string
type:
type: string
type: object
service_auth.ExchangeData:
properties:
client_id:
@@ -66,15 +50,10 @@ definitions:
state:
type: string
type: object
service_auth.ExchangeResult:
service_auth.ExchangeResponse:
properties:
common:
$ref: '#/definitions/shared.CommonResult'
data:
properties:
redirect_uri:
type: string
type: object
redirect_uri:
type: string
type: object
service_auth.MagicData:
properties:
@@ -91,11 +70,10 @@ definitions:
turnstile_token:
type: string
type: object
service_auth.MagicResult:
service_auth.MagicResponse:
properties:
common:
$ref: '#/definitions/shared.CommonResult'
data: {}
uri:
type: string
type: object
service_auth.RefreshData:
properties:
@@ -114,44 +92,29 @@ definitions:
refresh_token:
type: string
type: object
service_event.CheckinQueryResult:
service_event.CheckinQueryResponse:
properties:
common:
$ref: '#/definitions/shared.CommonResult'
data:
properties:
checkin_at:
type: string
type: object
checkin_at:
type: string
type: object
service_event.CheckinResult:
service_event.CheckinResponse:
properties:
common:
$ref: '#/definitions/shared.CommonResult'
data:
properties:
checkin_code:
type: string
type: object
checkin_code:
type: string
type: object
service_event.CheckinSubmitData:
properties:
checkin_code:
type: string
type: object
service_event.InfoResult:
service_event.InfoResponse:
properties:
common:
$ref: '#/definitions/shared.CommonResult'
data:
properties:
end_time:
type: string
name:
type: string
start_time:
type: string
type: object
end_time:
type: string
name:
type: string
start_time:
type: string
type: object
service_user.UserInfoData:
properties:
@@ -174,22 +137,13 @@ definitions:
username:
type: string
type: object
service_user.UserTableResult:
service_user.UserTableResponse:
properties:
common:
$ref: '#/definitions/shared.CommonResult'
user_table:
items:
$ref: '#/definitions/data.User'
type: array
type: object
shared.CommonResult:
properties:
exception:
$ref: '#/definitions/exception.Builder'
httpCode:
type: integer
type: object
utils.RespStatus:
properties:
code:
@@ -226,7 +180,7 @@ paths:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
$ref: '#/definitions/service_auth.ExchangeResult'
$ref: '#/definitions/service_auth.ExchangeResponse'
type: object
"400":
description: Invalid Input
@@ -283,7 +237,7 @@ paths:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
$ref: '#/definitions/service_auth.MagicResult'
$ref: '#/definitions/service_auth.MagicResponse'
type: object
"400":
description: Invalid Input
@@ -512,7 +466,7 @@ paths:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
$ref: '#/definitions/service_event.CheckinResult'
$ref: '#/definitions/service_event.CheckinResponse'
type: object
"400":
description: Invalid Input
@@ -557,7 +511,7 @@ paths:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
$ref: '#/definitions/service_event.CheckinQueryResult'
$ref: '#/definitions/service_event.CheckinQueryResponse'
type: object
"400":
description: Invalid Input
@@ -638,7 +592,7 @@ paths:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
$ref: '#/definitions/service_event.InfoResult'
$ref: '#/definitions/service_event.InfoResponse'
type: object
"400":
description: Invalid Input
@@ -686,7 +640,7 @@ paths:
- $ref: '#/definitions/utils.RespStatus'
- properties:
data:
$ref: '#/definitions/service_user.UserTableResult'
$ref: '#/definitions/service_user.UserTableResponse'
type: object
"500":
description: Internal Server Error (Database Error)