CodeForPhilly / CodeForPhilly/codeforphilly-ng
Remove or guard /_test/* stub routes in production
- 主要语言
- TypeScript
- 星标
- 1
- 派生
- 1
- 平均合并
- 5 天 3 小时
- 30 天内合并 PR
- 9
描述
The api-skeleton plan added three stub routes used only by integration tests:
- `POST /api/_test/validation-error` — throws `ApiValidationError` for testing the error mapper
- `POST /api/_test/internal-error` — throws a generic Error for testing 500 behavior
- `POST /api/_test/idempotency` — tests idempotency key replay
These have `{ schema: { hide: true } }` so they don't appear in the OpenAPI doc, but they're live in production. They should either be removed before cutover or guarded behind `NODE_ENV !== 'production'`.
Came out of api-skeleton (PR #17), Follow-up item.
贡献指南
这个仓库没有索引到贡献指南
调研方向
Start at the three /api/_test/* route definitions added by the api-skeleton work in PR #17, then inspect the integration tests that exercise validation errors, internal errors, and idempotency replay. Decide whether removal or an environment guard fits the cutover plan; done means the test behavior remains available while production no longer exposes these routes.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- typescript
- 领域
- api, backend
- Issue 类型
- 重构
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 活跃度
- 冷清
- 描述清晰度
- 基本清楚
- 新手友好度
- 58/100