From 75be02aed7fcd0fc4f8a94eb1162d1f7ccdd79c0 Mon Sep 17 00:00:00 2001 From: Asai Neko Date: Fri, 27 Mar 2026 20:46:33 +0800 Subject: [PATCH] Fix agenda list swagger doc error Signed-off-by: Asai Neko --- api/agenda/list.go | 2 +- docs/docs.go | 35 +++++++++++++++++++++++++++++++++-- docs/swagger.json | 35 +++++++++++++++++++++++++++++++++-- docs/swagger.yaml | 24 ++++++++++++++++++++++-- 4 files changed, 89 insertions(+), 7 deletions(-) diff --git a/api/agenda/list.go b/api/agenda/list.go index 65b4e1f..37779a3 100644 --- a/api/agenda/list.go +++ b/api/agenda/list.go @@ -20,7 +20,7 @@ import ( // @Produce json // @Security Bearer // @Param event_id query string true "Event ID" -// @Success 200 {object} utils.RespStatus{data=[]data.AgendaDoc} +// @Success 200 {object} utils.RespStatus{data=[]service_agenda.AgendaListItem} // @Failure 400 {object} utils.RespStatus{data=nil} "Invalid Input" // @Failure 403 {object} utils.RespStatus{data=nil} "Unauthorized" // @Failure 404 {object} utils.RespStatus{data=nil} "Event Not Found" diff --git a/docs/docs.go b/docs/docs.go index 512b64f..8cc1620 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -65,7 +65,7 @@ const docTemplate = `{ "data": { "type": "array", "items": { - "$ref": "#/definitions/data.AgendaDoc" + "$ref": "#/definitions/service_agenda.AgendaListItem" } } } @@ -3718,6 +3718,38 @@ const docTemplate = `{ } } }, + "service_agenda.AgendaListItem": { + "type": "object", + "properties": { + "agenda_id": { + "type": "string" + }, + "attendance_id": { + "type": "string" + }, + "description": { + "type": "string" + }, + "end_time": { + "type": "string" + }, + "name": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "start_time": { + "type": "string" + }, + "status": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, "service_agenda.AgendaReviewData": { "type": "object", "required": [ @@ -3834,7 +3866,6 @@ const docTemplate = `{ "type": "object", "required": [ "client_id", - "client_ip", "email", "redirect_uri", "turnstile_token" diff --git a/docs/swagger.json b/docs/swagger.json index a93d222..020ccc3 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -63,7 +63,7 @@ "data": { "type": "array", "items": { - "$ref": "#/definitions/data.AgendaDoc" + "$ref": "#/definitions/service_agenda.AgendaListItem" } } } @@ -3716,6 +3716,38 @@ } } }, + "service_agenda.AgendaListItem": { + "type": "object", + "properties": { + "agenda_id": { + "type": "string" + }, + "attendance_id": { + "type": "string" + }, + "description": { + "type": "string" + }, + "end_time": { + "type": "string" + }, + "name": { + "type": "string" + }, + "nickname": { + "type": "string" + }, + "start_time": { + "type": "string" + }, + "status": { + "type": "string" + }, + "username": { + "type": "string" + } + } + }, "service_agenda.AgendaReviewData": { "type": "object", "required": [ @@ -3832,7 +3864,6 @@ "type": "object", "required": [ "client_id", - "client_ip", "email", "redirect_uri", "turnstile_token" diff --git a/docs/swagger.yaml b/docs/swagger.yaml index ac54719..b1bc498 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -58,6 +58,27 @@ definitions: permission_level: type: integer type: object + service_agenda.AgendaListItem: + properties: + agenda_id: + type: string + attendance_id: + type: string + description: + type: string + end_time: + type: string + name: + type: string + nickname: + type: string + start_time: + type: string + status: + type: string + username: + type: string + type: object service_agenda.AgendaReviewData: properties: agenda_id: @@ -149,7 +170,6 @@ definitions: type: string required: - client_id - - client_ip - email - redirect_uri - turnstile_token @@ -588,7 +608,7 @@ paths: - properties: data: items: - $ref: '#/definitions/data.AgendaDoc' + $ref: '#/definitions/service_agenda.AgendaListItem' type: array type: object "400":