Beta
How CodeForge assigns and bumps your SDK's npm version when your OpenAPI document's info.version isn't usable.
This page covers the hosted CodeForge engine only — how the platform decides the npm version of the SDK it publishes for you, not the OSS The Codegen Project CLI.
OpenAPI requires every document to declare info.version, but does not require that value to
be semver. CodeForge classifies your declared version and picks one of two modes accordingly.
Your info.version is trimmed and checked:
1.2.3, v1.2.3, 1.2.3-beta.1), or when it
is version-shaped (1, 1.2, v1.2) and coerces cleanly to one. Your declared version drives
the SDK's release type, as you'd expect.2025-12-08), a word (beta), a git sha, or anything else that isn't version-shaped. CodeForge
assigns and bumps the SDK version itself. This is not an error — the check log carries a
warning saying the version isn't usable and the platform is managing it for this document.A document that doesn't parse at all — invalid YAML or JSON — still fails; the fallback covers unusable versions, not broken documents.
The first run for a document in this mode publishes 0.1.0, with the document version left
unset. Every run detail page shows this as Unversioned rather than a blank field.
After that first run, each check compares a content hash of your spec against the hash stored on the last run:
When more than one of these applies at once, the highest release type wins.
If you later add a real semver info.version, your document switches to document-versioned
mode from that run onward. If you remove or degrade it, the same content-hash rule switches you
back. Either way, your SDK's npm version only ever moves forward — it always continues from the
last published version, so a document version that looks "lower" than a past one can never move
the published SDK version backward.
This is the mode most documents are already in, and it works as you'd expect: a semver diff between your document's current and previous version decides the release type (patch, minor, major), on top of the same generation-parameter and generator-upgrade rules described above.
One addition: if your declared version is unchanged between two runs but your spec's content changed anyway, and a content hash was recorded on the last run, CodeForge still issues a patch release. A run with no stored hash from before this behavior shipped keeps the old rule exactly — publishing your first hash-covered run does not trigger a one-time republish across every existing SDK.
0.1.0, then patch-per-change.