Skip to content

refactor(go)!: short generated names; build the OpenAPI spec on the fly (XWING-2233) - #39

Merged
smith-xyz merged 1 commit into
traust-security:developmentfrom
smith-xyz:refactor/short-operation-names
Oct 29, 2026
Merged

smith-xyz merged 1 commit into
traust-security:developmentfrom
smith-xyz:refactor/short-operation-names

Conversation

@smith-xyz

Copy link
Copy Markdown
Contributor

What

  • Regenerate v1/api from core with short operation ids (refactor(rest): operation ids are the route names (XWING-2233) traust-core#288): OnboardV1OnboardingPostWithResponse → OnboardWithResponse, ListProductsV1ProductsGetParams → ListProductsParams. Call sites in v1/api/client.go, v1/ops/record.go, v1/ops/recording.go and go/README.md renamed.
  • make api-generate builds core's OpenAPI at a pinned CORE_REF (cached checkout, same pattern as CONTRACTS_REF), normalizes it in a temp dir, generates client.gen.go, deletes the spec.
  • Deleted: internal/generate/openapi/openapi.json, openapi-3.0.json (~400 KB, rewritten on every regen) and the snapshot-status README.md. check-drift diffs only the generated Go.

Stacked

CORE_REF pins traust-core#288's commit 1a6779a. Merge #288 first; re-pin to its merge commit if it changes.

Also picked up

Core development since the last snapshot adds PrecedentReason.basis, .hashes, .unavailable_reason (+ CodeHash, HashUnavailable, PrecedentBasis). Additive.

Breaking

Every generated method/params/response name. Consumers rename by deleting the V1…Get / V1…Post middle. #38 (onboarding regen) conflicts on the deleted spec files; after this lands it's a re-pin + make api-generate.

Changed tests

None.

Checks

  • make lint, make test, make security
  • make -C go check-drift clean

@smith-xyz
smith-xyz requested a review from a team as a code owner October 29, 2026 17:11
@openshift-ci

openshift-ci Bot commented Oct 29, 2026

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: smith-xyz

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci Bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Oct 29, 2026
@smith-xyz
smith-xyz merged commit 7372a73 into traust-security:development Oct 29, 2026
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant