Skip to content

Commit 9f3d22a

Browse files
author
mehara-rothila
committed
Address CodeRabbit review feedback on PR wso2#2012
- OperationUpstream schema now requires at least one of main or sandbox via anyOf, rejecting empty {} at the schema layer as defense in depth alongside the validator. - Policy builder per-op sandbox check is now content-based (trims and checks Url/Ref non-empty) matching the apiSandboxHasContent pattern used elsewhere. Fixes asymmetric pointer-only check that would emit sandbox policy chains for empty sandbox wrappers. - TestResolvePerOpUpstream_DedupSameURL now uses two distinct URLs with identical apiID|METHOD|path|env, asserting cluster name independence from URL. Pins the EDS-stable design contract.
1 parent b2426a7 commit 9f3d22a

4 files changed

Lines changed: 389 additions & 264 deletions

File tree

gateway/gateway-controller/api/management-openapi.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4138,7 +4138,10 @@ components:
41384138

41394139
OperationUpstream:
41404140
type: object
4141-
description: Per-operation upstream override. Missing sub-fields fall back to API-level upstream.
4141+
description: Per-operation upstream override. Missing sub-fields fall back to API-level upstream. At least one of main or sandbox must be set.
4142+
anyOf:
4143+
- required: [main]
4144+
- required: [sandbox]
41424145
properties:
41434146
main:
41444147
$ref: "#/components/schemas/Upstream"

0 commit comments

Comments
 (0)