-
Notifications
You must be signed in to change notification settings - Fork 2
auto-docs: Update Cloud API spec #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThis PR extends the cloud-controlplane OpenAPI specification by introducing eleven new schemas for long-running operation metadata and responses. These schemas support create and delete operations for network peering, serverless clusters, and serverless private links. The Estimated code review effort🎯 2 (Simple) | ⏱️ ~13 minutes Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Comment |
ℹ️ Redpanda/http-proxy API content change detectedNo structural change, nothing to display. Powered by Bump.sh |
ℹ️ Redpanda/schema-registry API content change detectedNo structural change, nothing to display. Powered by Bump.sh |
ℹ️ Redpanda/admin (branch: v1) API content change detectedNo structural change, nothing to display. Powered by Bump.sh |
ℹ️ Redpanda/admin (branch: v2) API content change detectedNo structural change, nothing to display. Powered by Bump.sh |
ℹ️ Redpanda/cloud-dataplane API content change detectedNo structural change, nothing to display. Powered by Bump.sh |
🚨 Breaking Redpanda/cloud-controlplane API change detectedStructural change detailsModified (19)
Powered by Bump.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
cloud-controlplane/cloud-controlplane.yaml (3)
5402-5444:GetNetworkPeeringresponse schema reference looks wrong (GetNetworkPeeringRequestvs response).Under the 200 response, the schema currently references
#/components/schemas/GetNetworkPeeringRequest(Line 5442-5443), but the payload shown is anetwork_peeringwrapper (i.e.,GetNetworkPeeringResponse). Even if this was pre-existing, it’s worth fixing since this endpoint segment was touched.Proposed diff
"200": content: application/json: @@ schema: - $ref: '#/components/schemas/GetNetworkPeeringRequest' + $ref: '#/components/schemas/GetNetworkPeeringResponse'
5461-5510: Fix typo in endpoint description (“pering” → “peering”).User-facing docs regression.
Proposed diff
- description: Create a Redpanda network pering. + description: Create a Redpanda network peering.
2575-2741: Add missing ServerlessPrivateLink operation metadata toOperationMetadata.oneOfand remove duplicateDeleteNetworkPeeringMetadata/DeleteNetworkPeeringResponseentries.The schemas
CreateServerlessPrivateLinkMetadata,DeleteServerlessPrivateLinkMetadata, andUpdateServerlessPrivateLinkMetadataare defined in the specification but are not included inOperationMetadata.oneOf. Each must be added as aoneOfvariant with the corresponding@typediscriminator to ensure the API properly returns these metadata types.Additionally,
DeleteNetworkPeeringMetadata(line 2631 and 2639) andDeleteNetworkPeeringResponse(line 2714 and 2722) are duplicated in their respectiveoneOfarrays—remove one occurrence of each.Note: ServerlessPrivateLink response schemas (
CreateServerlessPrivateLinkResponse,DeleteServerlessPrivateLinkResponse,UpdateServerlessPrivateLinkResponse) do not appear to be defined; if they should exist, they must be added both as schemas and toOperationResponse.oneOf.
🤖 Fix all issues with AI agents
In @cloud-controlplane/cloud-controlplane.yaml:
- Around line 1158-1162: The schema description text for response objects is
incorrect: update the description for CreateServerlessClusterResponse and
DeleteServerlessClusterResponse (and any other schema components with “Response
is the request of …”) to correctly read “CreateServerlessClusterResponse is the
response of CreateServerlessCluster.” and “DeleteServerlessClusterResponse is
the response of DeleteServerlessCluster.” respectively; locate the description
fields in the YAML for the CreateServerlessClusterResponse and
DeleteServerlessClusterResponse schema objects and replace “request” with
“response” (and audit similar Response schema descriptions to make the same
fix).
- Around line 2701-2740: The OperationResponse.oneOf array currently contains a
duplicated branch for DeleteNetworkPeeringResponse; remove the redundant allOf
entry that references DeleteNetworkPeeringResponse so only a single oneOf member
exists (locate the duplicate allOf block that sets '@type' to
type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringResponse
and the subsequent $ref to DeleteNetworkPeeringResponse and delete that block),
and if this YAML is generated, fix the upstream generator/proto template that
emits OperationResponse.oneOf to prevent emitting duplicate
DeleteNetworkPeeringResponse entries.
- Around line 2618-2658: In OperationMetadata.oneOf remove the duplicated
DeleteNetworkPeeringMetadata branch (the repeated allOf that references
DeleteNetworkPeeringMetadata) and add the missing serverless private-link
metadata entries by inserting allOf entries for
CreateServerlessPrivateLinkMetadata, DeleteServerlessPrivateLinkMetadata, and
UpdateServerlessPrivateLinkMetadata; each entry should mirror the existing
pattern (properties.'@type' enum set to the fully-qualified
type.googleapis.com/redpanda.api.controlplane.v1.<Name> and an $ref to
'#/components/schemas/<Name>'). Ensure the enum strings and $ref names exactly
match the schema component names (CreateServerlessPrivateLinkMetadata,
DeleteServerlessPrivateLinkMetadata, UpdateServerlessPrivateLinkMetadata) and
remove only the duplicate block referencing DeleteNetworkPeeringMetadata.
🧹 Nitpick comments (2)
cloud-controlplane/cloud-controlplane.yaml (2)
1070-1089: AddrequiredforCreateNetworkPeeringBody.network_peering(and considertitle/descriptionparity).
CreateNetworkPeeringBodydefinesnetwork_peering, but doesn’t mark it required, which can lead to underspecified clients/server stubs for a body that is effectively mandatory.Proposed diff
CreateNetworkPeeringBody: properties: network_peering: properties: aws: $ref: '#/components/schemas/AWSPeeringSpec' azure: $ref: '#/components/schemas/AzurePeeringSpec' cloud_provider: $ref: '#/components/schemas/CloudProvider' display_name: type: string gcp: $ref: '#/components/schemas/GCPPeeringSpec' type: object + required: + - network_peering type: object
5370-5380: DeleteNetworkPeering 202 example: consider includingmetadatafields (even if empty) consistently.The example includes
metadata.@typebut no fields; that’s fine if metadata is intentionally empty, but it’s a bit inconsistent with other operations that include IDs in metadata.
📜 Review details
Configuration used: Organization 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.
📒 Files selected for processing (2)
cloud-controlplane/cloud-controlplane.yamlcloud-dataplane/cloud-dataplane.yaml
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: kbatuigas
Repo: redpanda-data/api-docs PR: 40
File: cloud-controlplane/cloud-controlplane.yaml:1733-1738
Timestamp: 2025-11-26T19:18:28.591Z
Learning: For the redpanda-data/api-docs repository, the OpenAPI specification files in cloud-controlplane/ and cloud-dataplane/ are auto-generated from proto source files. Changes to these specs should be made in the upstream proto sources rather than directly editing the generated OpenAPI YAML files.
📚 Learning: 2025-11-26T19:18:28.591Z
Learnt from: kbatuigas
Repo: redpanda-data/api-docs PR: 40
File: cloud-controlplane/cloud-controlplane.yaml:1733-1738
Timestamp: 2025-11-26T19:18:28.591Z
Learning: For the redpanda-data/api-docs repository, the OpenAPI specification files in cloud-controlplane/ and cloud-dataplane/ are auto-generated from proto source files. Changes to these specs should be made in the upstream proto sources rather than directly editing the generated OpenAPI YAML files.
Applied to files:
cloud-controlplane/cloud-controlplane.yaml
🔇 Additional comments (8)
cloud-dataplane/cloud-dataplane.yaml (1)
7851-7853: Non-functional doc polish; ensure it’s reflected in the upstream generator/source-of-truth.Capitalizing the endpoint summary to
Deploy Transformis fine for consistency, but since these specs are auto-generated, please ensure this change is coming from (or is mirrored in) the upstream proto/generator to avoid being reverted on the next regen. Based on learnings, ...cloud-controlplane/cloud-controlplane.yaml (7)
4934-4977: Example updates look consistent (tier rename +CreateClusterRequestnesting).Switching the example tier value and nesting the create body under
cluster:matches theCreateClusterRequestschema.
5316-5340: ListNetworkPeerings example looks good and matches the response schema shape.The example includes
network_peerings: [...]with nested provider status, which aligns withListNetworkPeeringsResponse.
5591-5597:CreateNetworkRequestexample nesting undernetwork:matches the schema.This is aligned with
CreateNetworkRequest.network.
6324-6326:CreateResourceGroupRequestexample nesting underresource_group:matches the schema.Aligned with
CreateResourceGroupRequest.resource_group.
6881-6922: Addingpage_sizebounds is good; Serverless list example looks consistent.The
minimum: 1/maximum: 100addition improves client-side validation.
6938-6963: Serverless create/delete/get examples look coherent with the new metadata schema.Examples consistently use
CreateServerlessClusterMetadata.serverless_cluster_idandDeleteServerlessClusterMetadataas metadata type.Also applies to: 7002-7012, 7035-7075
8077-8080: Tag reordering/update is fine.No issues.
| description: CreateServerlessClusterResponse is the request of CreateServerlessCluster. | ||
| properties: | ||
| serverless_cluster: | ||
| $ref: '#/components/schemas/ServerlessCluster' | ||
| type: object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix incorrect “Response is the request of …” descriptions.
CreateServerlessClusterResponse and DeleteServerlessClusterResponse descriptions say “request”, which is misleading in generated docs.
Proposed diff
CreateServerlessClusterResponse:
- description: CreateServerlessClusterResponse is the request of CreateServerlessCluster.
+ description: CreateServerlessClusterResponse is the response of CreateServerlessCluster.
properties:
serverless_cluster:
$ref: '#/components/schemas/ServerlessCluster'
type: object
@@
DeleteServerlessClusterResponse:
- description: DeleteServerlessClusterResponse is the request of DeleteServerlessCluster.
+ description: DeleteServerlessClusterResponse is the response of DeleteServerlessCluster.
type: objectAlso applies to: 1451-1452
🤖 Prompt for AI Agents
In @cloud-controlplane/cloud-controlplane.yaml around lines 1158 - 1162, The
schema description text for response objects is incorrect: update the
description for CreateServerlessClusterResponse and
DeleteServerlessClusterResponse (and any other schema components with “Response
is the request of …”) to correctly read “CreateServerlessClusterResponse is the
response of CreateServerlessCluster.” and “DeleteServerlessClusterResponse is
the response of DeleteServerlessCluster.” respectively; locate the description
fields in the YAML for the CreateServerlessClusterResponse and
DeleteServerlessClusterResponse schema objects and replace “request” with
“response” (and audit similar Response schema descriptions to make the same
fix).
| - allOf: | ||
| - properties: | ||
| '@type': | ||
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | ||
| enum: | ||
| - type.googleapis.com/redpanda.api.controlplane.v1.CreateNetworkPeeringMetadata | ||
| type: string | ||
| - $ref: '#/components/schemas/CreateNetworkPeeringMetadata' | ||
| - allOf: | ||
| - properties: | ||
| '@type': | ||
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | ||
| enum: | ||
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringMetadata | ||
| type: string | ||
| - $ref: '#/components/schemas/DeleteNetworkPeeringMetadata' | ||
| - allOf: | ||
| - properties: | ||
| '@type': | ||
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | ||
| enum: | ||
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringMetadata | ||
| type: string | ||
| - $ref: '#/components/schemas/DeleteNetworkPeeringMetadata' | ||
| - allOf: | ||
| - properties: | ||
| '@type': | ||
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | ||
| enum: | ||
| - type.googleapis.com/redpanda.api.controlplane.v1.CreateServerlessClusterMetadata | ||
| type: string | ||
| - $ref: '#/components/schemas/CreateServerlessClusterMetadata' | ||
| - allOf: | ||
| - properties: | ||
| '@type': | ||
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | ||
| enum: | ||
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteServerlessClusterMetadata | ||
| type: string | ||
| - $ref: '#/components/schemas/DeleteServerlessClusterMetadata' | ||
| OperationResponse: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove duplicated DeleteNetworkPeeringMetadata branch in OperationMetadata.oneOf and wire in missing serverless private-link metadata (if applicable).
There are two identical DeleteNetworkPeeringMetadata oneOf entries (Line 2627-2642), which can confuse schema validators/generators. Also, newly added CreateServerlessPrivateLinkMetadata, DeleteServerlessPrivateLinkMetadata, and UpdateServerlessPrivateLinkMetadata aren’t present here (in the provided excerpt), so operation.metadata may not validate for those operation types.
Proposed diff (dedupe + add missing metadata types)
OperationMetadata:
description: Metadata of the long-running Operation. Contains in-progress information.
oneOf:
@@
- allOf:
- properties:
'@type':
description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`.
enum:
- type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringMetadata
type: string
- $ref: '#/components/schemas/DeleteNetworkPeeringMetadata'
- - allOf:
- - properties:
- '@type':
- description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`.
- enum:
- - type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringMetadata
- type: string
- - $ref: '#/components/schemas/DeleteNetworkPeeringMetadata'
@@
+ - allOf:
+ - properties:
+ '@type':
+ description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`.
+ enum:
+ - type.googleapis.com/redpanda.api.controlplane.v1.CreateServerlessPrivateLinkMetadata
+ type: string
+ - $ref: '#/components/schemas/CreateServerlessPrivateLinkMetadata'
+ - allOf:
+ - properties:
+ '@type':
+ description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`.
+ enum:
+ - type.googleapis.com/redpanda.api.controlplane.v1.DeleteServerlessPrivateLinkMetadata
+ type: string
+ - $ref: '#/components/schemas/DeleteServerlessPrivateLinkMetadata'
+ - allOf:
+ - properties:
+ '@type':
+ description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`.
+ enum:
+ - type.googleapis.com/redpanda.api.controlplane.v1.UpdateServerlessPrivateLinkMetadata
+ type: string
+ - $ref: '#/components/schemas/UpdateServerlessPrivateLinkMetadata'Based on learnings, if this file is generated from protos, the dedupe/wiring should be fixed in the upstream proto/OpenAPI generator rather than hand-editing this YAML.
📝 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.
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.CreateNetworkPeeringMetadata | |
| type: string | |
| - $ref: '#/components/schemas/CreateNetworkPeeringMetadata' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringMetadata | |
| type: string | |
| - $ref: '#/components/schemas/DeleteNetworkPeeringMetadata' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringMetadata | |
| type: string | |
| - $ref: '#/components/schemas/DeleteNetworkPeeringMetadata' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.CreateServerlessClusterMetadata | |
| type: string | |
| - $ref: '#/components/schemas/CreateServerlessClusterMetadata' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteServerlessClusterMetadata | |
| type: string | |
| - $ref: '#/components/schemas/DeleteServerlessClusterMetadata' | |
| OperationResponse: | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.CreateNetworkPeeringMetadata | |
| type: string | |
| - $ref: '#/components/schemas/CreateNetworkPeeringMetadata' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringMetadata | |
| type: string | |
| - $ref: '#/components/schemas/DeleteNetworkPeeringMetadata' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.CreateServerlessClusterMetadata | |
| type: string | |
| - $ref: '#/components/schemas/CreateServerlessClusterMetadata' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteServerlessClusterMetadata | |
| type: string | |
| - $ref: '#/components/schemas/DeleteServerlessClusterMetadata' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.CreateServerlessPrivateLinkMetadata | |
| type: string | |
| - $ref: '#/components/schemas/CreateServerlessPrivateLinkMetadata' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteServerlessPrivateLinkMetadata | |
| type: string | |
| - $ref: '#/components/schemas/DeleteServerlessPrivateLinkMetadata' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.UpdateServerlessPrivateLinkMetadata | |
| type: string | |
| - $ref: '#/components/schemas/UpdateServerlessPrivateLinkMetadata' | |
| OperationResponse: |
🤖 Prompt for AI Agents
In @cloud-controlplane/cloud-controlplane.yaml around lines 2618 - 2658, In
OperationMetadata.oneOf remove the duplicated DeleteNetworkPeeringMetadata
branch (the repeated allOf that references DeleteNetworkPeeringMetadata) and add
the missing serverless private-link metadata entries by inserting allOf entries
for CreateServerlessPrivateLinkMetadata, DeleteServerlessPrivateLinkMetadata,
and UpdateServerlessPrivateLinkMetadata; each entry should mirror the existing
pattern (properties.'@type' enum set to the fully-qualified
type.googleapis.com/redpanda.api.controlplane.v1.<Name> and an $ref to
'#/components/schemas/<Name>'). Ensure the enum strings and $ref names exactly
match the schema component names (CreateServerlessPrivateLinkMetadata,
DeleteServerlessPrivateLinkMetadata, UpdateServerlessPrivateLinkMetadata) and
remove only the duplicate block referencing DeleteNetworkPeeringMetadata.
| - allOf: | ||
| - properties: | ||
| '@type': | ||
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | ||
| enum: | ||
| - type.googleapis.com/redpanda.api.controlplane.v1.CreateNetworkPeeringResponse | ||
| type: string | ||
| - $ref: '#/components/schemas/CreateNetworkPeeringResponse' | ||
| - allOf: | ||
| - properties: | ||
| '@type': | ||
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | ||
| enum: | ||
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringResponse | ||
| type: string | ||
| - $ref: '#/components/schemas/DeleteNetworkPeeringResponse' | ||
| - allOf: | ||
| - properties: | ||
| '@type': | ||
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | ||
| enum: | ||
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringResponse | ||
| type: string | ||
| - $ref: '#/components/schemas/DeleteNetworkPeeringResponse' | ||
| - allOf: | ||
| - properties: | ||
| '@type': | ||
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | ||
| enum: | ||
| - type.googleapis.com/redpanda.api.controlplane.v1.CreateServerlessClusterResponse | ||
| type: string | ||
| - $ref: '#/components/schemas/CreateServerlessClusterResponse' | ||
| - allOf: | ||
| - properties: | ||
| '@type': | ||
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | ||
| enum: | ||
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteServerlessClusterResponse | ||
| type: string | ||
| - $ref: '#/components/schemas/DeleteServerlessClusterResponse' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove duplicated DeleteNetworkPeeringResponse branch in OperationResponse.oneOf.
There are two identical DeleteNetworkPeeringResponse oneOf entries (Line 2710-2724), which can cause ambiguity for tooling.
Proposed diff
OperationResponse:
description: Response of the long-running Operation.
oneOf:
@@
- allOf:
- properties:
'@type':
description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`.
enum:
- type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringResponse
type: string
- $ref: '#/components/schemas/DeleteNetworkPeeringResponse'
- - allOf:
- - properties:
- '@type':
- description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`.
- enum:
- - type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringResponse
- type: string
- - $ref: '#/components/schemas/DeleteNetworkPeeringResponse'Based on learnings, this likely needs to be corrected in the upstream generator/protos.
📝 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.
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.CreateNetworkPeeringResponse | |
| type: string | |
| - $ref: '#/components/schemas/CreateNetworkPeeringResponse' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringResponse | |
| type: string | |
| - $ref: '#/components/schemas/DeleteNetworkPeeringResponse' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringResponse | |
| type: string | |
| - $ref: '#/components/schemas/DeleteNetworkPeeringResponse' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.CreateServerlessClusterResponse | |
| type: string | |
| - $ref: '#/components/schemas/CreateServerlessClusterResponse' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteServerlessClusterResponse | |
| type: string | |
| - $ref: '#/components/schemas/DeleteServerlessClusterResponse' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.CreateNetworkPeeringResponse | |
| type: string | |
| - $ref: '#/components/schemas/CreateNetworkPeeringResponse' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringResponse | |
| type: string | |
| - $ref: '#/components/schemas/DeleteNetworkPeeringResponse' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.CreateServerlessClusterResponse | |
| type: string | |
| - $ref: '#/components/schemas/CreateServerlessClusterResponse' | |
| - allOf: | |
| - properties: | |
| '@type': | |
| description: Fully qualified protobuf type name of the underlying response, prefixed with `type.googleapis.com/`. | |
| enum: | |
| - type.googleapis.com/redpanda.api.controlplane.v1.DeleteServerlessClusterResponse | |
| type: string | |
| - $ref: '#/components/schemas/DeleteServerlessClusterResponse' |
🤖 Prompt for AI Agents
In @cloud-controlplane/cloud-controlplane.yaml around lines 2701 - 2740, The
OperationResponse.oneOf array currently contains a duplicated branch for
DeleteNetworkPeeringResponse; remove the redundant allOf entry that references
DeleteNetworkPeeringResponse so only a single oneOf member exists (locate the
duplicate allOf block that sets '@type' to
type.googleapis.com/redpanda.api.controlplane.v1.DeleteNetworkPeeringResponse
and the subsequent $ref to DeleteNetworkPeeringResponse and delete that block),
and if this YAML is generated, fix the upstream generator/proto template that
emits OperationResponse.oneOf to prevent emitting duplicate
DeleteNetworkPeeringResponse entries.
f66607f to
aadf1aa
Compare
This PR updates the OpenAPI spec file for the Cloud API.
Triggered by commit: 724e843b520abdf853e142925b5aa69f6a7c7d2f