Skip to content

feat(api): Report the dweOS version in the API - #581

Merged
brandonhs merged 1 commit into
mainfrom
517-include-api-version-information
Oct 27, 2026
Merged

brandonhs merged 1 commit into
mainfrom
517-include-api-version-information

Conversation

@brandonhs

Copy link
Copy Markdown
Member

Summary

The API reported a hard-coded version: 0.1.0 in the OpenAPI spec and 1.0.0 in the BlueOS extension registration. Now the backend reports the real dweOS version.

  • backend_py/src/version.py reads the version from frontend/package.json, which bump_version.sh and the preview workflow already set. Preview builds therefore report vX.Y.Z-prN.<sha>. If the file can't be read, the backend logs a warning and the version is unknown.
  • The OpenAPI spec (info.version) and BlueOS /register_service report this version. The openapi.json attached to each GitHub release now carries the real version.
  • The new GET /api/system/version returns {"version": "v0.7.7"}, so the SDK and other clients can check which dweOS they are talking to.
  • Release builds ship only the frontend build, so create_release.sh now writes a release/frontend/package.json that contains only the version.

frontend/src/schemas/dwe_os_2.d.ts is not regenerated, because the frontend doesn't use the new endpoint and #579 also regenerates that file.

Fixes #517

Type of change

  • Bug fix
  • Feature / Refactor
  • Breaking change
  • Misc.

Quick Checklist

  • I have reviewed my own code.
  • I have tested these changes locally.
  • I have tested these changes on the following platforms (optional):
    • SVC
    • microSVC (optional)
    • SVC Pro

Tested

  • ruff, ruff format and ty pass.
  • Built a release with create_release.sh from a clean checkout. release.tar.gz contains frontend/package.json with only {"version": "v0.7.7"}. From the extracted release, the backend, /api/system/version, the OpenAPI spec and /register_service all report v0.7.7.
  • With package.json missing, the version falls back to unknown.

Not yet tested

  • Running the release on a device.

The backend reads the dweOS version from frontend/package.json, which
bump_version.sh and the preview workflow already set. The OpenAPI spec
and the BlueOS extension registration report it in place of the
hard-coded 0.1.0 and 1.0.0, and the new GET /api/system/version returns
it so clients can check which dweOS they are talking to.

Release builds ship only the frontend build, so create_release.sh now
writes a package.json with just the version into release/frontend. If
the file is missing, the version is "unknown".
@brandonhs brandonhs linked an issue Oct 27, 2026 that may be closed by this pull request
@github-actions

github-actions Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Preview build preview-pr-581 deleted.

@brandonhs

Copy link
Copy Markdown
Member Author

This could be used to possibly ensure that the frontend state is not out of date after an update

@brandonhs
brandonhs merged commit 177e7b0 into main Oct 27, 2026
5 checks passed
@brandonhs
brandonhs deleted the 517-include-api-version-information branch October 27, 2026 22:29
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.

Include API version information

1 participant