chore(api): use static version example in health endpoint OpenAPI spec#435
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> Entire-Checkpoint: 4f00e23f4e13
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
WalkthroughThe Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Release PreviewNo version bumps detected. All changes are in unversioned paths or use exempt commit types. |
There was a problem hiding this comment.
Pull request overview
Updates the generated OpenAPI specification to keep the /health response version example stable across release bumps, avoiding spec drift caused by dynamic package version injection (follow-up to #434).
Changes:
- Replace dynamic
openApiVersionwith a static'1.0.0'example for the/healthresponseversionfield in the OpenAPI generation script. - Regenerate/commit the corresponding change in
packages/api-client/openapi.json.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| apps/api/scripts/generate-openapi.ts | Pins the /health response version schema example to a static string instead of openApiVersion. |
| packages/api-client/openapi.json | Updates the committed OpenAPI spec to reflect the new static example value for /health.version. |
| }, | ||
| }, | ||
| version: { type: 'string', example: openApiVersion }, | ||
| version: { type: 'string', example: '1.0.0' }, |
There was a problem hiding this comment.
The /health response version reflects the running service version (API_VERSION from package.json/env). Using a fixed example of 1.0.0 is likely to mislead readers since it won’t match the real value and also differs from info.version in the same OpenAPI document. Consider using an obvious placeholder (e.g. 0.0.0 / x.y.z) or adding clarifying wording so consumers don’t interpret it as the current API version.
| version: { type: 'string', example: '1.0.0' }, | |
| version: { type: 'string', example: 'x.y.z' }, |
| "version": { | ||
| "type": "string", | ||
| "example": "0.35.0" | ||
| "example": "1.0.0" |
There was a problem hiding this comment.
This fixed example (1.0.0) for the /health version field is inconsistent with the OpenAPI document’s info.version and with the endpoint’s actual runtime behavior (it returns the service/package version). Consider switching to an obvious placeholder (e.g. 0.0.0 / x.y.z) or clarifying that the example is not meant to track the deployed version.
| "example": "1.0.0" | |
| "example": "x.y.z" |
Summary
openApiVersionwith static1.0.0in the health endpoint's version example field🤖 Generated with Claude Code
Summary by CodeRabbit