Skip to content

fix: set correct cog version in OpenAPI schema#3075

Merged
anish-sahoo merged 4 commits into
mainfrom
issue-446
Jun 24, 2026
Merged

fix: set correct cog version in OpenAPI schema#3075
anish-sahoo merged 4 commits into
mainfrom
issue-446

Conversation

@anish-sahoo

Copy link
Copy Markdown
Collaborator

Fixes #446.

Replaces the hard-coded "0.1.0" in generated OpenAPI schemas with the CLI/build-time version from pkg/global.Version.

Changes

  • pkg/schema/openapi.go: use global.Version for info.version
  • pkg/schema/openapi_test.go: assert info.version == global.Version
  • pkg/model/image_test.go: use global.Version in OpenAPI parser fixtures and add openapiSchemaFixture helper
  • integration-tests/tests/build_openapi_schema.txtar: verify info.version exists and matches cog --version

Verification

  • go test ./pkg/schema/... ./pkg/model/... passes
  • mise run lint:go passes
  • mise run test:integration build_openapi_schema passes
  • Manual cog serve on examples/hello-world returns info.version matching cog --version

@ask-bonk

ask-bonk Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@ask-bonk

ask-bonk Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@ask-bonk

ask-bonk Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@ask-bonk

ask-bonk Bot commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

LGTM

github run

@anish-sahoo anish-sahoo marked this pull request as ready for review June 23, 2026 21:55
@anish-sahoo anish-sahoo requested a review from a team as a code owner June 23, 2026 21:55
@anish-sahoo anish-sahoo added this pull request to the merge queue Jun 24, 2026
Merged via the queue into main with commit e485252 Jun 24, 2026
43 checks passed
@anish-sahoo anish-sahoo deleted the issue-446 branch June 24, 2026 15:45
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.

Set correct cog version in OpenAPI schema

2 participants