Summary
The write endpoints accept their inputs as path variables rather than request bodies, which diverges from docs/MVP.md and docs/openapi/viron-api.json. No controller currently uses @RequestBody.
Spec vs. implementation
| Operation |
Spec (MVP.md / OpenAPI) |
Implemented |
| Create entity |
POST /api/v1/entities with body |
POST /api/v1/entities/{name} (path var) |
| Create environment |
body CreateEnvironmentRequest |
POST /api/v1/environments/{name}/{numGrids}/{gridSize} (path vars) |
| Rename environment |
body UpdateEnvironmentNameRequest |
PATCH /api/v1/environments/{id}/name/{name} (path var) |
As a consequence, the two request DTOs named in MVP.md — CreateEnvironmentRequest and UpdateEnvironmentNameRequest — were never created (dto/ holds only response DTOs).
Proposed work
- Add
CreateEnvironmentRequest and UpdateEnvironmentNameRequest DTOs with bean validation.
- Accept request bodies on the create/rename/create-entity endpoints (a
CreateEntityRequest may be warranted).
- Decide whether the path-variable forms are kept for backward compatibility or removed; update
docs/openapi/viron-api.json either way so spec and code agree.
Notes
A decision is needed on whether the spec or the current path-variable behaviour is authoritative; this issue assumes the spec is.
Filed by Claude on behalf of Daniel Stephenson.
Summary
The write endpoints accept their inputs as path variables rather than request bodies, which diverges from
docs/MVP.mdanddocs/openapi/viron-api.json. No controller currently uses@RequestBody.Spec vs. implementation
POST /api/v1/entitieswith bodyPOST /api/v1/entities/{name}(path var)CreateEnvironmentRequestPOST /api/v1/environments/{name}/{numGrids}/{gridSize}(path vars)UpdateEnvironmentNameRequestPATCH /api/v1/environments/{id}/name/{name}(path var)As a consequence, the two request DTOs named in MVP.md —
CreateEnvironmentRequestandUpdateEnvironmentNameRequest— were never created (dto/holds only response DTOs).Proposed work
CreateEnvironmentRequestandUpdateEnvironmentNameRequestDTOs with bean validation.CreateEntityRequestmay be warranted).docs/openapi/viron-api.jsoneither way so spec and code agree.Notes
A decision is needed on whether the spec or the current path-variable behaviour is authoritative; this issue assumes the spec is.
Filed by Claude on behalf of Daniel Stephenson.