Skip to content

Conversation

@vbotbuildovich
Copy link
Contributor

@vbotbuildovich vbotbuildovich commented Sep 19, 2025

This PR updates the OpenAPI spec file for the Cloud API.
Triggered by commit: 5fdbc30b13881aef68b17176891e5b4690cd8a72

@coderabbitai
Copy link

coderabbitai bot commented Sep 19, 2025

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

📝 Walkthrough

Walkthrough

  • Added a new public enum schema NetworkAccessMode (NETWORK_ACCESS_MODE_PRIVATE, NETWORK_ACCESS_MODE_PUBLIC).
  • Introduced api_gateway_access property (referencing NetworkAccessMode) to Cluster, ClusterCreate, and ClusterUpdate schemas.
  • Extended UpdateCluster request schema to allow api_gateway_access in the request body.
  • Updated OpenAPI examples/responses to include api_gateway_access (using NETWORK_ACCESS_MODE_UNSPECIFIED in examples).
  • Revised control plane API description and Serverless Private Links tag description text.
  • In dataplane spec, made text-only description changes (capitalization and summaries) without structural/type changes.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor Client
  participant ControlPlaneAPI as Control Plane API

  Note over Client,ControlPlaneAPI: New field: api_gateway_access (NetworkAccessMode)

  Client->>ControlPlaneAPI: POST /clusters (ClusterCreate with api_gateway_access)
  ControlPlaneAPI-->>Client: 201 Created (Cluster with api_gateway_access)

  Client->>ControlPlaneAPI: PATCH /clusters/{id} (ClusterUpdate with api_gateway_access)
  ControlPlaneAPI-->>Client: 200 OK (updated Cluster with api_gateway_access)

  Client->>ControlPlaneAPI: GET /clusters/{id}
  ControlPlaneAPI-->>Client: 200 OK (Cluster includes api_gateway_access)

  Client->>ControlPlaneAPI: GET /clusters
  ControlPlaneAPI-->>Client: 200 OK (List includes api_gateway_access per Cluster)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • auto-docs: Update Cloud API spec #11 — Also modifies the Cluster schema in cloud-controlplane/cloud-controlplane.yaml (adds nat_gateways/removes internet_gateways), overlapping with this PR’s Cluster schema changes.

Suggested reviewers

  • kbatuigas
  • JakeSCahill
  • micheleRP

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
Title Check ✅ Passed The title "auto-docs: Update Cloud API spec" succinctly and accurately reflects the primary change in this PR—automated updates to the Cloud API OpenAPI specification (including additions like NetworkAccessMode and api_gateway_access and minor description edits)—so it is concise, relevant, and clear for reviewers.
Description Check ✅ Passed The description clearly states that the pull request updates the OpenAPI specification for the Cloud API, which directly aligns with the changes made to the cloud-controlplane and cloud-dataplane YAML files; it is therefore related to the changeset.

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Sep 19, 2025

🤖 API structural change detected:

Modified (11)

  • DELETE /v1/clusters/{id}
    • Response modified: 202
      • Content type modified: application/json
        • Property modified: operation
          • Property modified: response
  • DELETE /v1/networks/{id}
    • Response modified: 202
      • Content type modified: application/json
        • Property modified: operation
          • Property modified: response
  • DELETE /v1/serverless/clusters/{id}
    • Response modified: 202
      • Content type modified: application/json
        • Property modified: operation
          • Property modified: response
  • GET /v1/clusters
    • Response modified: 200
      • Content type modified: application/json
        • Property modified: clusters
          • Property added: api_gateway_access
  • GET /v1/clusters/{id}
    • Response modified: 200
      • Content type modified: application/json
        • Property modified: cluster
          • Property added: api_gateway_access
  • GET /v1/operations
    • Response modified: 200
      • Content type modified: application/json
        • Property modified: operations
          • Property modified: response
  • GET /v1/operations/{id}
    • Response modified: 200
      • Content type modified: application/json
        • Property modified: operation
          • Property modified: response
  • PATCH /v1/clusters/{cluster.id}
    • Content type modified: application/json
      • Property modified: aws_private_link
        • Property modified: connect_console
          • Type went from boolean to boolean | null
      • Property modified: azure_private_link
        • Property modified: connect_console
          • Type went from boolean to boolean | null
      • Property added: api_gateway_access
    • Response modified: 202
      • Content type modified: application/json
        • Property modified: aws_private_link
          • Property modified: connect_console
            • Type went from boolean to boolean | null
        • Property modified: azure_private_link
          • Property modified: connect_console
            • Type went from boolean to boolean | null
        • Property added: api_gateway_access
  • POST /v1/clusters
    • Content type modified: application/json
      • Property modified: cluster
        • Property modified: aws_private_link
          • Property modified: connect_console
            • Type went from boolean to boolean | null
        • Property modified: azure_private_link
          • Property modified: connect_console
            • Type went from boolean to boolean | null
        • Property added: api_gateway_access
    • Response modified: 202
      • Content type modified: application/json
        • Property modified: operation
          • Property modified: response
  • POST /v1/networks
    • Response modified: 202
      • Content type modified: application/json
        • Property modified: operation
          • Property modified: response
  • POST /v1/serverless/clusters
    • Response modified: 202
      • Content type modified: application/json
        • Property modified: operation
          • Property modified: response

Preview documentation

Powered by Bump.sh

@github-actions
Copy link

github-actions bot commented Sep 19, 2025

ℹ️ API content change detected:

No structural change, nothing to display.

Preview documentation

Powered by Bump.sh

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (12)
cloud-dataplane/cloud-dataplane.yaml (4)

3494-3500: Restore capitalization: “Connect” → “Connect”.

Align with the rest of the spec (“Connect cluster” used elsewhere in path params).

-        - description: Unique name of target connect cluster. For Redpanda Cloud, use `redpanda`.
+        - description: Unique name of target Connect cluster. For Redpanda Cloud, use `redpanda`.

3611-3617: Restore capitalization: “Connect” → “Connect”.

Keep path parameter descriptions consistent across Secrets endpoints.

-        - description: Unique name of target connect cluster. For Redpanda Cloud, use `redpanda`.
+        - description: Unique name of target Connect cluster. For Redpanda Cloud, use `redpanda`.

5613-5615: Use sentence case for summaries to match neighboring transform endpoints.

Other Transform summaries use “List transforms”, “Get transform”, “Delete transform”. Keep “Deploy transform” in sentence case.

-      summary: Deploy Transform
+      summary: Deploy transform

215-216: Capitalize “Kafka Connect” and use “Kafka Connect cluster” consistently.

Replace "connect cluster" → "Kafka Connect cluster" in these locations:

  • cloud-dataplane/cloud-dataplane.yaml line 215 — apply:
-          description: Unique name of connect cluster. For Redpanda Cloud, the value is `redpanda`.
+          description: Unique name of the Kafka Connect cluster. For Redpanda Cloud, the value is `redpanda`.
  • cloud-dataplane/cloud-dataplane.yaml lines 3494, 3565, 3611, 3660, 3710 — update each parameter description to:
    "Unique name of the Kafka Connect cluster. For Redpanda Cloud, use redpanda."
cloud-controlplane/cloud-controlplane.yaml (8)

268-270: Clarify property semantics (avoid $ref sibling pitfalls)

Add a description via allOf to document what “api_gateway_access” controls and its interaction with connection_type/Private Link.

-        api_gateway_access:
-          $ref: '#/components/schemas/NetworkAccessMode'
+        api_gateway_access:
+          allOf:
+            - $ref: '#/components/schemas/NetworkAccessMode'
+          description: Controls public/private reachability of the cluster’s managed API Gateway endpoints (Kafka API, HTTP Proxy, Schema Registry). See also connection_type and Private Link settings.

509-511: Mirror the description on ClusterCreate

Keep docs consistent at create time; use allOf to attach a description.

-        api_gateway_access:
-          $ref: '#/components/schemas/NetworkAccessMode'
+        api_gateway_access:
+          allOf:
+            - $ref: '#/components/schemas/NetworkAccessMode'
+          description: Controls public/private reachability of the cluster’s managed API Gateway endpoints at creation time.

653-655: Mirror the description on ClusterUpdate

Same rationale as above.

-        api_gateway_access:
-          $ref: '#/components/schemas/NetworkAccessMode'
+        api_gateway_access:
+          allOf:
+            - $ref: '#/components/schemas/NetworkAccessMode'
+          description: Controls public/private reachability of the cluster’s managed API Gateway endpoints.

3516-3518: PATCH schema: property ok, but please lint the request body block

Property addition looks fine. However, within this same schema block, “required: [cluster]” appears incongruent with the inline properties style and typical UpdateCluster request shape. Also ensure the 202 response schema references UpdateClusterOperation (not ClusterUpdate). Please run your OpenAPI linter and fix if flagged.


3331-3332: Fix invalid example value for api_gateway_access

Until UNSPECIFIED is added to the enum, this example won’t validate. Change to a valid value or add UNSPECIFIED to the enum (see earlier comment).

-                  - api_gateway_access: NETWORK_ACCESS_MODE_UNSPECIFIED
+                  - api_gateway_access: NETWORK_ACCESS_MODE_PUBLIC

3669-3669: Fix invalid example value in GetCluster example

Same enum mismatch as above.

-                  api_gateway_access: NETWORK_ACCESS_MODE_UNSPECIFIED
+                  api_gateway_access: NETWORK_ACCESS_MODE_PUBLIC

4068-4069: Fix invalid example value in CreateCluster operation example

Same enum mismatch as above.

-                          api_gateway_access: NETWORK_ACCESS_MODE_UNSPECIFIED
+                          api_gateway_access: NETWORK_ACCESS_MODE_PUBLIC

4194-4195: Fix invalid example value in UpdateCluster operation example

Same enum mismatch as above.

-                          api_gateway_access: NETWORK_ACCESS_MODE_UNSPECIFIED
+                          api_gateway_access: NETWORK_ACCESS_MODE_PUBLIC
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between a6fca53 and 5c6cb8f.

📒 Files selected for processing (2)
  • cloud-controlplane/cloud-controlplane.yaml (11 hunks)
  • cloud-dataplane/cloud-dataplane.yaml (4 hunks)
🔇 Additional comments (2)
cloud-controlplane/cloud-controlplane.yaml (2)

3273-3273: Info description update LGTM

Accurate, clearer scope of the Control Plane API.


5711-5712: Tag description tweak LGTM

Link and wording look consistent with the rest of the spec.

Comment on lines +1953 to +1960
NetworkAccessMode:
description: Network access mode for an endpoint.
enum:
- NETWORK_ACCESS_MODE_PRIVATE
- NETWORK_ACCESS_MODE_PUBLIC
type: string
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Enum/examples mismatch: add UNSPECIFIED or fix examples

Examples use NETWORK_ACCESS_MODE_UNSPECIFIED but the enum omits it. Add UNSPECIFIED to avoid invalid examples or update examples to a valid value.

Apply one of:
Option A (preferred: add enum value)

 NetworkAccessMode:
   description: Network access mode for an endpoint.
   enum:
+    - NETWORK_ACCESS_MODE_UNSPECIFIED
     - NETWORK_ACCESS_MODE_PRIVATE
     - NETWORK_ACCESS_MODE_PUBLIC
   type: string
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
NetworkAccessMode:
description: Network access mode for an endpoint.
enum:
- NETWORK_ACCESS_MODE_PRIVATE
- NETWORK_ACCESS_MODE_PUBLIC
type: string
NetworkAccessMode:
description: Network access mode for an endpoint.
enum:
- NETWORK_ACCESS_MODE_UNSPECIFIED
- NETWORK_ACCESS_MODE_PRIVATE
- NETWORK_ACCESS_MODE_PUBLIC
type: string
🤖 Prompt for AI Agents
In cloud-controlplane/cloud-controlplane.yaml around lines 1953 to 1958, the
OpenAPI enum lists NETWORK_ACCESS_MODE_PRIVATE and NETWORK_ACCESS_MODE_PUBLIC
but examples reference NETWORK_ACCESS_MODE_UNSPECIFIED, causing invalid
examples; add NETWORK_ACCESS_MODE_UNSPECIFIED to the enum definition (preferably
as the first value) so examples validate, and ensure any schema
default/description reflects the new UNSPECIFIED value; alternatively, update
examples to use one of the existing enum values if you choose not to add
UNSPECIFIED.

@vbotbuildovich vbotbuildovich force-pushed the update-branch-api branch 2 times, most recently from 8ea7598 to a0c6f48 Compare September 24, 2025 09:40
example:
clusters:
- cloud_provider: CLOUD_PROVIDER_GCP
- api_gateway_access: NETWORK_ACCESS_MODE_UNSPECIFIED
Copy link
Contributor

Choose a reason for hiding this comment

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

Will try adding overlays to target and use a public value

@kbatuigas kbatuigas merged commit 58634be into main Oct 3, 2025
8 checks passed
@kbatuigas kbatuigas deleted the update-branch-api branch October 3, 2025 00:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants