Skip to content

Commit

Permalink
fix: doc
Browse files Browse the repository at this point in the history
  • Loading branch information
LumaAI-API committed Jun 17, 2024
1 parent 470a8c7 commit 973b84c
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 1 deletion.
22 changes: 22 additions & 0 deletions docs/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions docs/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down
14 changes: 14 additions & 0 deletions docs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 2 additions & 1 deletion router.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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")
Expand Down

0 comments on commit 973b84c

Please sign in to comment.