Refresh Core API OpenAPI spec#1512
Conversation
Fetched latest us.console.entire.io/api/v1/openapi.json and ran
`go generate ./internal/coreapi/...`. New surface: /clusters,
/orgs/{orgId}, /projects/{projectId}, repo grant routes, and the
UpdateMe/RepoGrant/ListRepoGrants/Cluster schemas.
Adapted call sites for upstream drift: grant roles are now typed enums
(GrantProjectAccessInputBodyRole / GrantRepoAccessInputBodyRole) and
ListOrgs gained a params arg.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Entire-Checkpoint: 69107861b7c5
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 592bbac. Configure here.
There was a problem hiding this comment.
Pull request overview
Refreshes the committed Core API OpenAPI spec and regenerates the ogen-based Go client to match upstream control-plane changes, then updates CLI call sites to compile against the new generated surface.
Changes:
- Updated
internal/coreapi/spec/core.gen.jsonfrom the upstream Core API and regeneratedogenclient code (schemas, operations, params, validators, security, encoders/decoders). - Added support in the generated client for new/updated endpoints and shapes (e.g., clusters/orgs/projects/repo-grants, paging tokens,
UpdateMe). - Adapted CLI call sites for upstream drift (
ListOrgsnow takes params; grant role fields are now typed enums).
Reviewed changes
Copilot reviewed 3 out of 13 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| internal/coreapi/spec/core.gen.json | Refreshed committed OpenAPI spec snapshot. |
| internal/coreapi/oas_validators_gen.go | Regenerated validators for new/changed request/response shapes and enums. |
| internal/coreapi/oas_security_gen.go | Regenerated operation→security-role maps for newly added operations. |
| internal/coreapi/oas_schemas_gen.go | Regenerated schemas (new types/enums/optionals, paging fields, new resources). |
| internal/coreapi/oas_response_decoders_gen.go | Regenerated HTTP response decoders for expanded API surface. |
| internal/coreapi/oas_request_encoders_gen.go | Regenerated request encoders (incl. UpdateMe). |
| internal/coreapi/oas_parameters_gen.go | Regenerated operation parameter structs (incl. paging params). |
| internal/coreapi/oas_operations_gen.go | Regenerated operation name constants (new endpoints). |
| cmd/entire/cli/org.go | Updated org list to pass empty ListOrgsParams{}. |
| cmd/entire/cli/grant.go | Updated grant request bodies to use the new typed role enums. |
Files not reviewed (7)
- internal/coreapi/oas_operations_gen.go: Generated file
- internal/coreapi/oas_parameters_gen.go: Generated file
- internal/coreapi/oas_request_encoders_gen.go: Generated file
- internal/coreapi/oas_response_decoders_gen.go: Generated file
- internal/coreapi/oas_schemas_gen.go: Generated file
- internal/coreapi/oas_security_gen.go: Generated file
- internal/coreapi/oas_validators_gen.go: Generated file
Comments suppressed due to low confidence (2)
cmd/entire/cli/grant.go:179
--role/--grantee-typeare now backed by generated enum types, but the command still casts arbitrary strings and sends them without any local validation. This also leaves the flag help text out of sync with the allowed enum values (only reader/writer/admin; and grantee-type appears to only allow account in the refreshed spec). Consider validating via the generatedValidate()methods before sending the request and updating the flag descriptions so users get a clear CLI error instead of a server-side failure.
Role: coreapi.GrantProjectAccessInputBodyRole(role),
}
if granteeType != "" {
body.GranteeType = coreapi.NewOptGrantProjectAccessInputBodyGranteeType(coreapi.GrantProjectAccessInputBodyGranteeType(granteeType))
}
cmd/entire/cli/grant.go:260
- Same issue as the project grant path:
--role/--grantee-typeare cast straight into generated enum types without validation, so invalid values can be sent to the API and the flag help text can drift from the actual allowed values. Validate using the generatedValidate()methods and update the flag descriptions to match the current enum surface.
Role: coreapi.GrantRepoAccessInputBodyRole(role),
}
if granteeType != "" {
body.GranteeType = coreapi.NewOptGrantRepoAccessInputBodyGranteeType(coreapi.GrantRepoAccessInputBodyGranteeType(granteeType))
}

https://entire.io/gh/entireio/cli/trails/651
Refreshes the committed Core API spec from
us.console.entire.io/api/v1/openapi.jsonand regenerates the ogen client.New surface:
/clusters,/orgs/{orgId},/projects/{projectId}, repo grant routes, plusUpdateMe/RepoGrant/ListRepoGrants/Clusterschemas.Call-site adaptations for upstream drift:
GrantProjectAccessInputBodyRole/GrantRepoAccessInputBodyRole) — cast at the twogrant addsites.ListOrgsgained a params arg — pass emptyListOrgsParams{}fromorg list.🤖 Generated with Claude Code
Note
Medium Risk
Large generated client churn touches access-control and destructive delete routes; CLI changes are small but grant role typing could surface invalid roles at the API instead of locally validated.
Overview
Regenerates the committed Core API ogen client from an updated OpenAPI spec, expanding the typed HTTP surface and changing several method signatures.
New client operations include org/project get and delete, list clusters, list repo grants, repo grant revoke (by grantee id or provider identity), and
UpdateMe(PATCH /me). Many list calls now accept query params (pagination viapageSize/pageToken, and optional name filters on org/project/repo listings).CLI call-site fixes for upstream drift:
entire grant project|repo addcast--roletoGrantProjectAccessInputBodyRole/GrantRepoAccessInputBodyRole;entire org listpassesListOrgsParams{}toListOrgs.Reviewed by Cursor Bugbot for commit 592bbac. Configure here.