Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 1 addition & 14 deletions api/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,6 @@ import (
//go:embed swagger/swagger-v1.yaml
var swaggerV1 []byte

//go:embed swagger/swagger-v1-full.yaml
var swaggerV1Full []byte

func RequestTimer() fiber.Handler {
return func(c *fiber.Ctx) error {
c.Locals("start", time.Now())
Expand Down Expand Up @@ -699,24 +696,14 @@ func NewApiServer(config config.Config) *ApiServer {
// Create Swagger middleware for v1
//
// Swagger will be available at: /v1
// Note: v1/full endpoints exist for backwards compatibility but are not documented or exposed via SDK.
app.Use(swagger.New(swagger.Config{
BasePath: "/",
Path: "v1",
// Only controls where the swagger.json is server from
FilePath: "v1/swagger.yaml",
FileContent: swaggerV1,
}))

// Create Swagger middleware for v1/full
//
// Swagger will be available at: /v1/full
app.Use(swagger.New(swagger.Config{
BasePath: "/",
Path: "v1/full",
// Only controls where the swagger.json is server from
FilePath: "v1/full/swagger.yaml",
FileContent: swaggerV1Full,
}))
}

// gracefully handle 404
Expand Down
Loading