HYPERFLEET-1202 - feat: add Go module support for downstream consumption#10
HYPERFLEET-1202 - feat: add Go module support for downstream consumption#10rafabene wants to merge 1 commit into
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Central YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📝 WalkthroughSummary by CodeRabbit
Walkthroughgo.mod toolchain version updated to go 1.25.0. New package schemas/schemas.go added, embedding template/openapi.yaml into an exported embed.FS variable named FS via a //go:embed directive. Estimated code review effort: 1 (Trivial) | ~5 minutes Security Notes
Suggested reviewers: platform-api-maintainers 🚥 Pre-merge checks | ✅ 11✅ Passed checks (11 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
Expose the generated template OpenAPI schema as an embedded filesystem so Go services can import this module and read schemas/template/openapi.yaml without vendoring local copies. Mirrors the pattern used by hyperfleet-api-spec.
bbc5c0e to
6e207b4
Compare
|
Closing in favor of downloading openapi.yaml directly from releases. Spec repos should remain language-agnostic — consumers generate their own clients. |
Summary
go.moddeclaringgithub.com/openshift-hyperfleet/hyperfleet-api-spec-templateas a Go moduleschemas/schemas.goexposingtemplate/openapi.yamlviaembed.FShyperfleet-api-specfor downstream Go consumersThis enables the E2E repo to import the template spec as a Go dependency and generate a typed HTTP client from the partner contract (Clusters, NodePools, Channels, Versions, WifConfigs).
Test plan
go build ./schemas/compiles successfullytemplate/openapi.yaml