diff options
| author | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-11-17 11:25:20 +0000 |
|---|---|---|
| committer | Pjotr Prins <pjotr.public01@thebird.nl> | 2026-11-17 11:25:20 +0000 |
| commit | ab710df0a1502b851292b61a1052585374c40ea3 (patch) | |
| tree | 70c1b9695065f9d1438813b1f560d6bf0ed26ee3 /src/error.rs | |
| parent | 2df90559ca597c0d35daf68e8648f8a46c823787 (diff) | |
| download | genenetwork4-ab710df0a1502b851292b61a1052585374c40ea3.tar.gz | |
groups: limit_to / ids_only / names_only, with the old shape as the default
The first of the six listings, and the pattern for the other five: the answer type becomes `Rows` (untagged -- `Objects` or `Plain`), and *no listing parameters means the old answer*, so this cannot break a client that already exists. Untagged matters: the wire shape is a plain array either way, so a wrapper object would have been a breaking change dressed as a feature. Verified on the deployed build: GET /groups?species=mouse 59 objects, keys as before GET /groups?species=mouse&names_only=true 59 strings, first "AKXD" GET /groups?ids_only=true&limit_to=BXD,NOPE ["1"], note names "nope" GET /groups?ids_only=true&names_only=true 422 invalid_listing The note for a limit_to value that matched nothing is the point of that parameter's error path: "my group is missing" is what a silent empty answer makes impossible to diagnose. `listing.shape` keeps the full rows as objects for the default path, so no client sees a serialisation round-trip; `Rows::Plain` takes the field that was matched. The other five handlers get the same three edits plus their utoipa body type, which is the mechanical part that needs care.
Diffstat (limited to 'src/error.rs')
0 files changed, 0 insertions, 0 deletions
