webapp
Some checks failed
Docker Build and Publish / publish (push) Failing after 1m33s

This commit is contained in:
Eugene Howe
2026-02-17 09:47:30 -05:00
parent af09672ee3
commit b0957bfa49
102 changed files with 4213 additions and 378 deletions

View File

@@ -0,0 +1,35 @@
package main
import (
"os"
"clintonambulance.com/calculate_negative_points/internal/config"
"clintonambulance.com/calculate_negative_points/internal/server"
"go.uber.org/zap"
)
func main() {
version := config.NewVersion()
logger, flushLogs := config.NewLogger(version, os.Stdout, []string{"cmd", "-e", "testEnvironment", "-c", "internal/config/testdata/settings.test.yml"})
defer flushLogs()
configuration, err := config.Load(version, os.Exit, os.Args, logger)
if err != nil {
panic(err)
}
srv, reflector := server.NewHttpServer(logger, version)
server.MountAllEndpoints(srv, version, configuration, logger)
//schema, err := srv.OpenAPI.MarshalYAML()
schema, err := reflector.Spec.MarshalYAML()
if err != nil {
panic(err)
}
outputFile := "docs/openapi/api.yaml"
if err := os.WriteFile(outputFile, schema, 0644); err != nil {
panic(err)
}
logger.Info("Generated OpenAPI docs", zap.String("output", outputFile))
}