Bug
PATCH /items/:id accepts JSON with unknown fields, returns HTTP 200, and silently drops those fields. Callers believe the update persisted when it did not.
Steps to reproduce
- Create an item:
POST /items with {"name":"widget","qty":1} → note id.
- Patch with an unknown field that the API should reject or store:
curl -sS -i -X PATCH "http://127.0.0.1:5000/items/$ID" \
-H 'Content-Type: application/json' \
-d '{"qty":2,"warehouse_bin":"A-12"}'
GET /items/$ID — qty may update, but warehouse_bin is gone with no error.
Expected
Either:
- HTTP 400/422 with a clear validation error listing unknown fields, or
- Persist
warehouse_bin if the schema allows it.
Silent success on partial apply is incorrect for an HTTP API.
Actual
HTTP 200 with a body that omits warehouse_bin. No warning in logs. This is a correctness bug on the items HTTP API surface and risks data loss for clients integrating storage/warehouse metadata.
Environment
Python 3.12, Linux, main of this repo.
Why this matters for labeling
This is an API endpoint bug with high user impact (silent data loss). It is not a docs or storage-driver issue by itself — the failure is in request validation on the HTTP handler.
Bug
PATCH /items/:idaccepts JSON with unknown fields, returns HTTP 200, and silently drops those fields. Callers believe the update persisted when it did not.Steps to reproduce
POST /itemswith{"name":"widget","qty":1}→ noteid.GET /items/$ID—qtymay update, butwarehouse_binis gone with no error.Expected
Either:
warehouse_binif the schema allows it.Silent success on partial apply is incorrect for an HTTP API.
Actual
HTTP 200 with a body that omits
warehouse_bin. No warning in logs. This is a correctness bug on the items HTTP API surface and risks data loss for clients integrating storage/warehouse metadata.Environment
Python 3.12, Linux,
mainof this repo.Why this matters for labeling
This is an API endpoint bug with high user impact (silent data loss). It is not a docs or storage-driver issue by itself — the failure is in request validation on the HTTP handler.