Skip to content

chore(api): use static version example in health endpoint OpenAPI spec#435

Merged
FSM1 merged 1 commit into
mainfrom
chore/static-openapi-version-example
Apr 1, 2026
Merged

chore(api): use static version example in health endpoint OpenAPI spec#435
FSM1 merged 1 commit into
mainfrom
chore/static-openapi-version-example

Conversation

@FSM1

@FSM1 FSM1 commented Apr 1, 2026

Copy link
Copy Markdown
Owner

Summary

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes
    • Updated the health endpoint response to use a fixed version value instead of a dynamically computed value.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 4f00e23f4e13
Copilot AI review requested due to automatic review settings April 1, 2026 04:46
@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b1f28534-1eea-47e6-94bf-71b11355b9bc

📥 Commits

Reviewing files that changed from the base of the PR and between 4471b1b and fc45447.

⛔ Files ignored due to path filters (1)
  • packages/api-client/openapi.json is excluded by !packages/api-client/**
📒 Files selected for processing (1)
  • apps/api/scripts/generate-openapi.ts

Walkthrough

The /health endpoint response schema in the OpenAPI generation script has its version field example value changed from a dynamically computed reference to a fixed hardcoded string '1.0.0'.

Changes

Cohort / File(s) Summary
OpenAPI Health Endpoint Schema
apps/api/scripts/generate-openapi.ts
Modified the /health endpoint response schema's version field example from dynamic openApiVersion to fixed value '1.0.0'

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related PRs

Suggested labels

release:api:feat

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'chore(api): use static version example in health endpoint OpenAPI spec' clearly and specifically describes the main change: replacing dynamic version with a static example in the health endpoint's OpenAPI specification.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch chore/static-openapi-version-example

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions

github-actions Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Release Preview

No version bumps detected. All changes are in unversioned paths or use exempt commit types.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 openApiVersion with a static '1.0.0' example for the /health response version field 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' },

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
version: { type: 'string', example: '1.0.0' },
version: { type: 'string', example: 'x.y.z' },

Copilot uses AI. Check for mistakes.
"version": {
"type": "string",
"example": "0.35.0"
"example": "1.0.0"

Copilot AI Apr 1, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
"example": "1.0.0"
"example": "x.y.z"

Copilot uses AI. Check for mistakes.
@FSM1 FSM1 merged commit 11f981f into main Apr 1, 2026
31 checks passed
@FSM1 FSM1 deleted the chore/static-openapi-version-example branch April 14, 2026 00:04
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.

2 participants