membphis commented on PR #13956:
URL: https://github.com/apache/apisix/pull/13956#issuecomment-5710814619
P2 (non-blocking): please double-check the empty-array default path.
The new recursive `clone()` in `server.lua` copies tables into plain `{}`
values without preserving `core.json.array_mt`. For an OpenAPI default such as
`default: []` (including nested empty arrays), applying the default before
validation can lose array identity; the value may then fail array validation or
be serialized as an object. The previous query-default path assigned
`param.schema.default` directly and preserved that marker.
This does not block merging this PR, but please consider preserving
`core.json.array_mt` during cloning and adding query/body regression coverage
for an omitted `default: []`.
--
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]