The GitHub Actions job "CI" on 
rocketmq-dashboard.git/fix/datasource-delete-body has failed.
Run started by GitHub user unbridled-41 (triggered by unbridled-41).

Head commit for run:
e88609bfc9a5a6ac04cca09d4c65fab568011c07 / unbridled-41 
<[email protected]>
fix(settings): accept the documented body of the data-source deletion

`docs/api-spec.md` ยง14.7 declares a required request body `{"key": ...}` for
`POST /api/settings/datasources/delete`, but the handler binds only a query
parameter:

    public Result<Void> deleteDataSource(@RequestParam(required = false) String 
key)

A client written against the published contract therefore posted a valid body, 
the
parameter bound to null, and the service answered 400 "Data source key is 
required"
without deleting anything - the documented request could not succeed at all.

Accept both: keep the parameter (the console sends it) and bind the documented 
body,
using whichever carries the key.

Tests (server/): mvn -o -B -ntp test -Dtest='SettingsControllerTest' -> Tests 
run: 24,
Failures: 0, Errors: 0; the new case fails before this change (the request is a 
400)
and passes after it, asserting the service receives the key; checkstyle passes.

Report URL: 
https://github.com/apache/rocketmq-dashboard/actions/runs/37998460949

With regards,
GitHub Actions via GitBox

Reply via email to