Summary
The WebBrokerApi branch in DeployAPIConfiguration (gateway/gateway-controller/pkg/utils/api_deployment.go) currently bypasses schema validation. Malformed configs (e.g., invalid policy version patterns) can be persisted and only fail later during snapshot or runtime translation.
Required work
- Extend the
config.Validator to support api.WebBrokerApi.
- Uncomment and enable the
s.validator.Validate(&c) call in the api.WebBrokerApi case of the post-render validation switch.
- Ensure invalid payloads are rejected at the REST API layer with a structured
ValidationErrorListError response.
Context
Summary
The
WebBrokerApibranch inDeployAPIConfiguration(gateway/gateway-controller/pkg/utils/api_deployment.go) currently bypasses schema validation. Malformed configs (e.g., invalid policyversionpatterns) can be persisted and only fail later during snapshot or runtime translation.Required work
config.Validatorto supportapi.WebBrokerApi.s.validator.Validate(&c)call in theapi.WebBrokerApicase of the post-render validation switch.ValidationErrorListErrorresponse.Context