feat(tasks): add operationId fields for Redoc deep-linking + API doc generators#3764
Conversation
…eep-linking Promotes operationId fields from trawl_node to devkit. Every operation in modules/tasks/doc/tasks.yml now has a unique camelCase operationId (getTaskStats, listTasks, createTask, getTask, updateTask, deleteTask), enabling stable per-operation deep links in Redoc and compatibility with API doc generators. Purely additive — no behavior change. Adds tasks.openapi-operationid.unit.tests.js to assert every operation has a defined, unique operationId. Part of infra plan 2026-06-01-trawl-promote-up-followups.md Task 3.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #3764 +/- ##
===========================================
+ Coverage 59.43% 90.14% +30.70%
===========================================
Files 151 151
Lines 4970 4970
Branches 1577 1577
===========================================
+ Hits 2954 4480 +1526
+ Misses 1491 385 -1106
+ Partials 525 105 -420
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR adds OpenAPI operationId fields to the Tasks module’s documented endpoints to support stable Redoc deep links and consistent method naming for OpenAPI tooling/code generators. It also introduces a unit test to ensure operationId presence and uniqueness within modules/tasks/doc/tasks.yml.
Changes:
- Add
operationIdto all 6/api/tasks*operations inmodules/tasks/doc/tasks.yml. - Add a unit test that parses
tasks.ymland asserts every HTTP operation has a stringoperationIdand that all are unique.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| modules/tasks/doc/tasks.yml | Adds operationId to each tasks operation for stable deep-linking/codegen identifiers. |
| modules/tasks/tests/tasks.openapi-operationid.unit.tests.js | Adds a unit test to enforce presence + uniqueness of operationId values in tasks.yml. |
Summary
Promote-up from trawl_node: add
operationIdfields to all 6 operations inmodules/tasks/doc/tasks.yml. Closes #3763.GET /api/tasks/stats→getTaskStatsGET /api/tasks→listTasksPOST /api/tasks→createTaskGET /api/tasks/{taskId}→getTaskPUT /api/tasks/{taskId}→updateTaskDELETE /api/tasks/{taskId}→deleteTaskPurely additive — no JS behavior change, no route change, no schema change.
Why
operationIdis required by Redoc for stable per-operation deep links and by API doc generators (SDK codegen, OpenAPI client tools) for stable method names. Every devkit downstream with a tasks module + Redoc docs benefits.PRF Phase 0
/critical-review --via deepseek→ OK with nits (2 cosmetic nits, 0 blocking findings). Gate passed.Test plan
NODE_ENV=test npm run test:unit -- modules/tasks/tests/tasks.openapi-operationidpasses (asserts every operation has a uniqueoperationId)npm run lintcleanReferences
2026-06-01-trawl-promote-up-followups.mdTask 3