/v1/export rejects hoopSizeMm — undocumented rejection #24

Closed
opened 2026-09-08 19:08:12 +00:00 by Mark · 0 comments
Owner

/v1/export rejects hoopSizeMm — undocumented rejection

Repo: Mark/easystitch-service
Severity: Low — docs/code mismatch, not a regression
Found: 2026-09-08 full shakedown

Symptom

POST /v1/export with a body containing hoopSizeMm returns 422:

{"detail":[{"type":"extra_forbidden","loc":["body","hoopSizeMm"],
            "msg":"Extra inputs are not permitted","input":{"w":100,"h":100}}]}

The README's POST /v1/export section doesn't list hoopSizeMm as part of the request shape,
but it's a natural field to include (the same field exists on /v1/digitize's settings).

Two valid fixes

  1. Add hoopSizeMm: HoopSizeMm | None = None to ExportRequest (models.py) and pass it
    through, even if unused today
  2. Document explicitly in docs/api.md that hoopSizeMm is not part of the /v1/export shape

Acceptance

  • Either: POST /v1/export with hoopSizeMm returns 200 and the field is silently accepted
  • Or: README/docs/api.md explicitly note hoopSizeMm is not part of the request shape
  • No regression in test_export_pes_returns_valid_pes_bytes or other export tests
## /v1/export rejects hoopSizeMm — undocumented rejection **Repo:** Mark/easystitch-service **Severity:** Low — docs/code mismatch, not a regression **Found:** 2026-09-08 full shakedown ### Symptom `POST /v1/export` with a body containing `hoopSizeMm` returns 422: ```json {"detail":[{"type":"extra_forbidden","loc":["body","hoopSizeMm"], "msg":"Extra inputs are not permitted","input":{"w":100,"h":100}}]} ``` The README's POST /v1/export section doesn't list `hoopSizeMm` as part of the request shape, but it's a natural field to include (the same field exists on /v1/digitize's settings). ### Two valid fixes 1. Add `hoopSizeMm: HoopSizeMm | None = None` to `ExportRequest` (models.py) and pass it through, even if unused today 2. Document explicitly in docs/api.md that `hoopSizeMm` is not part of the /v1/export shape ### Acceptance - Either: POST /v1/export with `hoopSizeMm` returns 200 and the field is silently accepted - Or: README/docs/api.md explicitly note `hoopSizeMm` is not part of the request shape - No regression in test_export_pes_returns_valid_pes_bytes or other export tests
Mark 2026-09-08 19:08:12 +00:00
  • closed this issue
  • added the
    bug
    label
Sign in to join this conversation.
No milestone
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
Mark/easystitch-service#24
No description provided.