mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-14 10:49:07 +02:00
The account handler rejects a non-empty value unless url.Parse yields scheme https and a host, but the schema said only "string", so a schema-driven consumer saw an unconstrained field and learned the contract from a 422. Add a pattern that allows "" for the fallback and otherwise requires https with a host. Regenerating types.gen.go produces no diff: our oapi-codegen config emits types only, so the pattern documents the contract rather than enforcing it in Go. The handler stays the thing that rejects. Reported by CodeRabbit and cubic on #7514.