fatmanverse commented on PR #12922:
URL: https://github.com/apache/seatunnel/pull/12922#issuecomment-6332029887
Thanks @DanielLeens for the re-review. I took both optional Low items in
c573c0c:
- **Issue 1 (nested values):** `RestUtil.toStringParams` now rejects a `Map`
or `Collection` value inside `params` with `IllegalArgumentException`, so it
returns HTTP 400 instead of using `{a=1}` as the value. The message is
`'params.<key>' must be a string, number or boolean, but was a JSON object` (or
`array`).
- **Issue 2 (echoed value):** the non-object message no longer appends the
value. It names the JSON type only, for example `'params' must be a JSON
object, but was a JSON string`. The nested-value message names the key, because
that is what the user needs to find the entry, but never the value.
- **Tests:** `RestUtilSubmitJobsParamsTest` adds
`testNestedParamValuesAreRejected` (object and array), and
`testParamsMustBeAnObject` now covers string, array and number with the exact
message. The cases include a `do-not-echo` marker value, so the assertions also
show that the value is not in the message.
- **Docs:** rest-api v1 and v2 (en/zh) now say that the values must be
strings, numbers or booleans and that a `null` value is skipped. The
incompatible-changes entry (en/zh) also mentions the 400 for nested values.
Verified on JDK 17 on top of c7a0742: `spotless:apply` made no changes, and
`RestUtilSubmitJobsParamsTest` (7) and `JobInfoServiceSubmitJobsTest` (3) pass,
10/10.
The `Build` check is still expected to be red in `unit-test` because of
`LLMBooleanOutputTest` (#12929, fix in #12938). I will re-run it once that
lands on `dev`.
--
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]