diff --git a/docs/docs.go b/docs/docs.go index ee1a6b9..34a9c6e 100644 --- a/docs/docs.go +++ b/docs/docs.go @@ -49,6 +49,28 @@ const docTemplate = `{ } } }, + "/luma/generations/": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "summary": "Submit luma generate video task", + "responses": { + "200": { + "description": "video tasks", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/main.VideoTask" + } + } + } + } + } + }, "/luma/generations/{id}": { "get": { "consumes": [ diff --git a/docs/swagger.json b/docs/swagger.json index 209a0e4..ec5110a 100644 --- a/docs/swagger.json +++ b/docs/swagger.json @@ -37,6 +37,28 @@ } } }, + "/luma/generations/": { + "get": { + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "summary": "Submit luma generate video task", + "responses": { + "200": { + "description": "video tasks", + "schema": { + "type": "array", + "items": { + "$ref": "#/definitions/main.VideoTask" + } + } + } + } + } + }, "/luma/generations/{id}": { "get": { "consumes": [ diff --git a/docs/swagger.yaml b/docs/swagger.yaml index 8064163..4537306 100644 --- a/docs/swagger.yaml +++ b/docs/swagger.yaml @@ -64,6 +64,20 @@ paths: $ref: '#/definitions/main.VideoTask' type: array summary: Submit luma generate video task + /luma/generations/: + get: + consumes: + - application/json + produces: + - application/json + responses: + "200": + description: video tasks + schema: + items: + $ref: '#/definitions/main.VideoTask' + type: array + summary: Submit luma generate video task /luma/generations/{id}: get: consumes: diff --git a/router.go b/router.go index 0b93fdf..534cac4 100644 --- a/router.go +++ b/router.go @@ -4,6 +4,7 @@ import ( "github.com/gin-gonic/gin" swaggerfiles "github.com/swaggo/files" ginSwagger "github.com/swaggo/gin-swagger" + "luma-api/docs" ) func RegisterRouter(r *gin.Engine) { @@ -12,7 +13,7 @@ func RegisterRouter(r *gin.Engine) { "message": "pong", }) }) - + docs.SwaggerInfo.BasePath = "/" r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerfiles.Handler)) apiRouter := r.Group("/luma")