You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "AlinsRan (via GitHub)" <gi...@apache.org> on 2026/05/26 02:29:40 UTC
[PR] fix: omit uris field when HTTPRoute path type is RegularExpression [apisix-ingress-controller]
AlinsRan opened a new pull request, #2770:
URL: https://github.com/apache/apisix-ingress-controller/pull/2770
## Summary
When `path.type: RegularExpression` is used in an HTTPRoute, the controller correctly sets `vars` for regex matching but leaves `Uris` as nil. The `Uris` field in the `Route` struct was missing `omitempty`, causing it to serialize as `"uris": null` in the JSON payload.
APISIX Admin API v3 strictly requires `uris` to be an array type, not null. This causes the entire bulk ADC sync payload to be rejected with HTTP 400, breaking **all** routes in the cluster — not just the offending regex route.
## Changes
- Add `omitempty` to `Uris` JSON/YAML tag in `api/adc/types.go` so the field is omitted when nil (the RegularExpression case)
- Add unit test `TestTranslateGatewayHTTPRouteMatchRegexPath` to verify correct behavior
## Related
Fixes #2764
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: omit uris field when HTTPRoute path type is RegularExpression [apisix-ingress-controller]
Posted by "AlinsRan (via GitHub)" <gi...@apache.org>.
AlinsRan merged PR #2770:
URL: https://github.com/apache/apisix-ingress-controller/pull/2770
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org