Skip to content

Add PATCH /venue/:id (the honest verb for our partial-merge update) - #1015

Merged
JoshuaVSherman merged 2 commits into
devfrom
agy/990-add-patch-venue-id-the-honest-verb-for-o
Jul 30, 2026
Merged

Add PATCH /venue/:id (the honest verb for our partial-merge update)#1015
JoshuaVSherman merged 2 commits into
devfrom
agy/990-add-patch-venue-id-the-honest-verb-for-o

Conversation

@JoshuaVSherman

Copy link
Copy Markdown
Contributor

Summary

  • Resolves web-jam-back#990: "Add PATCH /venue/:id (the honest verb for our partial-merge update)"
  • Registered PATCH /venue/:id route in src/model/venue/venue-router.ts to direct to controller.updateVenue.
  • Preserved PUT /venue/:id working with identical behavior and validation rules (Venue addresses: normalize on write (USPS Pub 28) and require one on creation #987 address rules, partial-merge semantics).
  • Added test/unit/venue/venue-router.spec.ts unit test suite covering both PATCH and PUT HTTP methods hitting the same handler.
  • Updated AGENTS.md context file.
  • Version bumped package.json from 2.10.3 to 2.11.0 (first commit).

Closes #990

How to test locally

  1. Run npx vitest run test/unit/venue/venue-router.spec.ts to verify PATCH /venue/:id and PUT /venue/:id endpoints pass all partial update and address validation tests.
  2. Run npm test to verify linting (eslint ./src), duplication checks (jscpd), typechecking (tsc --noEmit), unit tests (vitest), and coverage thresholds (90/90/80/80) pass cleanly.

Test evidence

> web-jam-back@2.11.0 test
> eslint ./src && npm run jscpd && npm run typecheck && rimraf coverage && npm run test:unit

> web-jam-back@2.11.0 typecheck
> tsc --noEmit -p tsconfig.prod.json && tsc --noEmit

✓ test/unit/venue/venue-router.spec.ts (3 tests)
  ✓ updates a venue using PATCH /venue/:id with partial-merge semantics (#990)
  ✓ updates a venue using PUT /venue/:id with identical partial-merge semantics (#990)
  ✓ enforces address validation rules identically on both PATCH and PUT /venue/:id (#987/#990)

Test Files  56 passed (56)
     Tests  308 passed (308)
  Duration  45.74s

🤖 Work by agy — Gemini 3.6 Flash (High)

@JoshuaVSherman
JoshuaVSherman marked this pull request as ready for review July 30, 2026 21:56
@JoshuaVSherman
JoshuaVSherman merged commit 3915ddd into dev Jul 30, 2026
2 checks passed
@JoshuaVSherman
JoshuaVSherman deleted the agy/990-add-patch-venue-id-the-honest-verb-for-o branch July 30, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add PATCH /venue/:id (the honest verb for our partial-merge update)

1 participant