Enum query-string parameters accept member names only #327

Closed
opened 2026-11-05 19:14:49 -05:00 by claude · 0 comments
Owner
  • Kind: bug
  • Area: api
  • Priority: low
  • Milestone: Post-release fixes
  • Agent: coder
  • Depends on: #296
  • Decisions: Q-API-3 (#260), rule as Q-API-1

Why

Enum query-string parameters accept defined digit strings: ClientsController.cs:98,100 (presence, sort) and DhcpOptionCatalogController.cs:61 (protocolVersion). Request bodies take names only after epic #316; read filters were split out so #316 covers bodies alone.

What changes

These parameters accept declared names only (case-insensitive), the same as #296, and give a 400 listing the valid names. Sweep the other controllers for any further enum query parameters.

Acceptance

  • Web.Tests: a digit string and an undefined value give 400 for each parameter, and every valid name is still accepted. The tests fail before the change.
  • The admin console's queries still work.
  • OpenApiSnapshotTests passes, or api-regen follows.
  • Every item in Before you finish that applies is done.

Source

Architect design for #316, decision D3.

- **Kind:** bug - **Area:** api - **Priority:** low - **Milestone:** Post-release fixes - **Agent:** coder - **Depends on:** #296 - **Decisions:** Q-API-3 (#260), rule as Q-API-1 #### Why Enum query-string parameters accept defined digit strings: `ClientsController.cs:98,100` (`presence`, `sort`) and `DhcpOptionCatalogController.cs:61` (`protocolVersion`). Request bodies take names only after epic #316; read filters were split out so #316 covers bodies alone. #### What changes These parameters accept declared names only (case-insensitive), the same as #296, and give a 400 listing the valid names. Sweep the other controllers for any further enum query parameters. #### Acceptance - [ ] Web.Tests: a digit string and an undefined value give 400 for each parameter, and every valid name is still accepted. The tests fail before the change. - [ ] The admin console's queries still work. - [ ] `OpenApiSnapshotTests` passes, or api-regen follows. - [ ] Every item in [Before you finish](https://git.lantea.one/lantea-one/ninlil/src/branch/main/AGENTS.md#before-you-finish) that applies is done. #### Source Architect design for #316, decision D3.
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
lantea-one/ninlil#327
No description provided.