Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions cloud-controlplane/overlays/update-api-gateway-access.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# This overlay updates the Cluster object in response examples to only use a
# user-facing value for the api_gateway_access field.
overlay: 1.0.0
info:
title: Update API Gateway Access Values in Response Examples
version: 1.0.0

actions:
# Target api_gateway_access fields that are descendants of any example field within responses
- target: "$..responses..example..*[?(@.api_gateway_access == 'NETWORK_ACCESS_MODE_UNSPECIFIED')]"
update:
api_gateway_access: "NETWORK_ACCESS_MODE_PUBLIC"
2 changes: 1 addition & 1 deletion cloud-dataplane/cloud-dataplane.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -683,7 +683,7 @@ components:
{ "reason": "API_DISABLED"
"domain": "googleapis.com"
"metadata": {
"resource": "projects/123",
"resource": "projects/1234",
"service": "pubsub.googleapis.com"
}
}
Expand Down
30 changes: 30 additions & 0 deletions cloud-dataplane/overlays/remove-resource-type-any.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# This overlay removes the RESOURCE_TYPE_ANY value as an available option for the
# resource_type field in the CreateACLRequest schema.
overlay: 1.0.0
info:
title: Remove RESOURCE_TYPE_ANY from Create ACL Request Body
version: 1.0.0

# Note that we will have to manually update this enum if the Cloud team adds
# new resource types in the future.
actions:
- target: "$.components.schemas"
update:
CreateACLResourceType:
description: |-
The type of resource (topic, consumer group, etc.) this
ACL targets.
enum:
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to keep in mind - we'll need to manually update this list if the Cloud team add more enums to the source.

- "RESOURCE_TYPE_TOPIC"
- "RESOURCE_TYPE_GROUP"
- "RESOURCE_TYPE_CLUSTER"
- "RESOURCE_TYPE_TRANSACTIONAL_ID"
- "RESOURCE_TYPE_DELEGATION_TOKEN"
- "RESOURCE_TYPE_USER"
- "RESOURCE_TYPE_REGISTRY"
- "RESOURCE_TYPE_SUBJECT"
type: "string"
# Replace the $ref with an inline enum that excludes RESOURCE_TYPE_ANY
- target: "$.components.schemas.CreateACLRequest.properties.resource_type"
update:
$ref: '#/components/schemas/CreateACLResourceType'