Add swag-generate to justfile and include in build

This commit is contained in:
2026-05-18 21:44:58 +02:00
parent 1d77ae491c
commit f03e001bdd
2 changed files with 26 additions and 14 deletions
+6 -12
View File
@@ -87,12 +87,12 @@ type swaggerInfo struct {
// SwaggerInfo holds exported Swagger Info so clients can modify it
var SwaggerInfo = swaggerInfo{
Version: "1.0",
Host: "localhost:8080",
BasePath: "/",
Schemes: []string{"http", "https"},
Title: "MusicServer API",
Description: "API for the MusicServer application",
Version: "",
Host: "",
BasePath: "",
Schemes: []string{},
Title: "",
Description: "",
}
type s struct{}
@@ -129,9 +129,3 @@ func (s *s) ReadDoc() string {
func init() {
swag.Register("swagger", &s{})
}
// GetSwaggerJSON returns the swagger JSON
func GetSwaggerJSON() string {
s := &s{}
return s.ReadDoc()
}