Skip to content

HYPERFLEET-1024: automate OpenAPI pipeline + Go module#1

Closed
mliptak0 wants to merge 14 commits into
mainfrom
HYPERFLEET-1024
Closed

HYPERFLEET-1024: automate OpenAPI pipeline + Go module#1
mliptak0 wants to merge 14 commits into
mainfrom
HYPERFLEET-1024

Conversation

@mliptak0
Copy link
Copy Markdown
Owner

@mliptak0 mliptak0 commented May 7, 2026

No description provided.

tirthct and others added 14 commits April 27, 2026 22:13
HYPERFLEET-853 - feat: Add Reconciled to OpenAPI spec
HYPERFLEET-978 - feat: (1/2) Add PUT command for internal status endpoints …
… schema linting

- Add CI workflow (ci.yml): builds all 4 schemas, checks consistency
  against committed files, lints with Spectral, and enforces version
  bump on every PR and push to main
- Replace release.yml: triggers on push to main instead of manual tag;
  auto-creates annotated tag from main.tsp version; uploads all 4
  schema artifacts (core+gcp openapi+swagger); idempotent on re-runs
- Add go.mod + schemas/schemas.go: exposes all 4 generated schemas via
  //go:embed as embed.FS, enabling downstream Go consumers to import
  versioned schemas as a module dependency without local copies
- Add .spectral.yaml with spectral:oas ruleset for OpenAPI 3.0 linting
- Add @stoplight/spectral-cli ^6.15.1 as devDependency

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…-action

Replace manual npx spectral invocation with stoplightio/spectral-action@v0.8.13.
The action bundles its own Spectral binary, avoiding Node.js version
compatibility issues with npx. Remove @stoplight/spectral-cli devDependency
as it is no longer needed. Update TypeSpec compiler to @1.11 in both workflows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…versions

Add checks:write to CI job so stoplightio/spectral-action can post inline
PR annotations via GitHub API. Without this permission, the action fails
with "Resource not accessible by integration" even when linting passes.

Note: fork PRs cannot receive checks:write (GitHub security restriction)
so annotation posting will still fail there, but branch PRs on the real
repo will work correctly.

Bump actions/checkout and actions/setup-node from v4 to v6 (Node.js 24
runtime) ahead of the June 2nd, 2026 Node.js 20 forced deprecation.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ons format

Replace stoplightio/spectral-action (Docker, hides output behind GitHub API
annotations) with a direct npx spectral lint invocation using --format
github-actions. This format emits ::error and ::warning workflow commands
to stdout, which GitHub Actions renders as inline PR annotations natively
without requiring checks:write or any API call. Output is fully visible in
step logs. Remove checks:write permission as it is no longer needed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…k file conflict

The lock file (generated on Node.js 25) pins a nested AJV build inside
@stoplight/spectral-core that fails in CI. Installing spectral-cli globally
with npm install -g resolves a fresh compatible dependency tree, bypassing
the lock file. Call spectral directly (not via npx) and keep it out of
devDependencies since it is a CI-only tool installed separately.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…eference

Per RFC 7807, the instance field identifies a specific occurrence of a
problem and may be a relative URI reference. The example /api/hyperfleet/v1/clusters
is a valid relative URI reference but not a valid URI (missing scheme),
which caused Spectral's oas3-valid-schema-example rule to error. Changing
the format annotation to uri-reference is semantically correct and fixes
the lint error. Rebuild all four schema artifacts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@mliptak0 mliptak0 closed this May 7, 2026
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.

3 participants