fix: enable strict mode for swagger generation & upgrade swag (#21975)

Adds a Go wrapper (`scripts/apidocgen/swaginit/main.go`) that calls
swag's Go API with `Strict: true`. The `--strict` flag isn't available
in swag's CLI in any version, so the wrapper is the only way to enable
it.

Also upgrades swag from v1.16.2 to v1.16.6 (better generics support,
precise numeric formats, `x-enum-descriptions`, CVE-2024-45338 fix).
This commit is contained in:
Marcin Tojek
2026-02-06 13:04:35 +01:00
committed by GitHub
parent 193e4bd73b
commit 456c0bced9
7 changed files with 97 additions and 25 deletions
+1 -1
View File
@@ -176,7 +176,7 @@ require (
github.com/sqlc-dev/pqtype v0.3.0
github.com/stretchr/testify v1.11.1
github.com/swaggo/http-swagger/v2 v2.0.1
github.com/swaggo/swag v1.16.2
github.com/swaggo/swag v1.16.6
github.com/tidwall/gjson v1.18.0
github.com/u-root/u-root v0.14.0
github.com/unrolled/secure v1.17.0