sihyeonn commented on PR #12895: URL: https://github.com/apache/apisix/pull/12895#issuecomment-4264118943
Hi @moonming, apologies for the late response — I missed this review until now! **1. Naming: `defaults` vs `fallback`** I'd like to keep the name `defaults`. `fallback` tends to connote error-recovery semantics, whereas `defaults` is the established term for "values that apply when not explicitly provided" (e.g., function default parameters, HTTP default headers). Since that's exactly the intent here, I think `defaults` is the clearer choice — and as you noted in the review, if these are values used when the request doesn't specify them, `defaults` is the right name. **2. Priority order** I believe the correct precedence is **`options` > client request > `defaults`**, not `request values > options` as written in the review. `options` is an enforcement/override mechanism — it always wins regardless of what the client sends (admin enforces). `defaults` is the opposite: it only kicks in when the client omits the field (admin suggests). So the full priority chain is: | Priority | Source | Behavior | |----------|--------|----------| | 1 (highest) | `options` | Always overrides — admin enforcement | | 2 | client request | What the client actually sent | | 3 (lowest) | `defaults` | Applied only when client omitted the field | **3. Schema documentation** Good catch — I've added an explicit `model` property to the `defaults` schema (consistent with `options`) and improved the description to clarify the fallback semantics. See the latest commit. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
