Skip to content

Refresh Core API OpenAPI spec#1512

Merged
Soph merged 2 commits into
mainfrom
20260624-openapi
Jun 24, 2026
Merged

Refresh Core API OpenAPI spec#1512
Soph merged 2 commits into
mainfrom
20260624-openapi

Conversation

@toothbrush

@toothbrush toothbrush commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

https://entire.io/gh/entireio/cli/trails/651

Refreshes the committed Core API spec from us.console.entire.io/api/v1/openapi.json and regenerates the ogen client.

New surface: /clusters, /orgs/{orgId}, /projects/{projectId}, repo grant routes, plus UpdateMe/RepoGrant/ListRepoGrants/Cluster schemas.

Call-site adaptations for upstream drift:

  • Grant roles are now typed enums (GrantProjectAccessInputBodyRole / GrantRepoAccessInputBodyRole) — cast at the two grant add sites.
  • ListOrgs gained a params arg — pass empty ListOrgsParams{} from org 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 via pageSize / pageToken, and optional name filters on org/project/repo listings).

CLI call-site fixes for upstream drift: entire grant project|repo add cast --role to GrantProjectAccessInputBodyRole / GrantRepoAccessInputBodyRole; entire org list passes ListOrgsParams{} to ListOrgs.

Reviewed by Cursor Bugbot for commit 592bbac. Configure here.

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
Copilot AI review requested due to automatic review settings June 24, 2026 08:04
@toothbrush toothbrush requested a review from a team as a code owner June 24, 2026 08:04

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread cmd/entire/cli/org.go

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.json from the upstream Core API and regenerated ogen client 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 (ListOrgs now 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-type are 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 generated Validate() 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-type are 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 generated Validate() 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))
				}

@Soph Soph enabled auto-merge June 24, 2026 11:13
@Soph Soph merged commit 9f2a821 into main Jun 24, 2026
9 checks passed
@Soph Soph deleted the 20260624-openapi branch June 24, 2026 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants