Skip to content

Commit 735df6b

Browse files
kbatuigasKat Batuigas
andauthored
Add new overlays (#24)
* Address coderabbit suggestion on removing internal only value NETWORK_ACCESS_MODE_UNSPECIFIED * RESOURCE_TYPE_ANY is not available when creating a new ACL * Tiny changes to force deploy preview with overlays applied * Fix JSONPath * Apply suggestions from automated review * Fix workflow errors * Fix syntax error * Try using a new component schema instead * Fix api_gateway_access * Note about manually updating resource types --------- Co-authored-by: Kat Batuigas <kbauigas@gmail.com>
1 parent 58634be commit 735df6b

3 files changed

Lines changed: 43 additions & 1 deletion

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# This overlay updates the Cluster object in response examples to only use a
2+
# user-facing value for the api_gateway_access field.
3+
overlay: 1.0.0
4+
info:
5+
title: Update API Gateway Access Values in Response Examples
6+
version: 1.0.0
7+
8+
actions:
9+
# Target api_gateway_access fields that are descendants of any example field within responses
10+
- target: "$..responses..example..*[?(@.api_gateway_access == 'NETWORK_ACCESS_MODE_UNSPECIFIED')]"
11+
update:
12+
api_gateway_access: "NETWORK_ACCESS_MODE_PUBLIC"

cloud-dataplane/cloud-dataplane.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -683,7 +683,7 @@ components:
683683
{ "reason": "API_DISABLED"
684684
"domain": "googleapis.com"
685685
"metadata": {
686-
"resource": "projects/123",
686+
"resource": "projects/1234",
687687
"service": "pubsub.googleapis.com"
688688
}
689689
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# This overlay removes the RESOURCE_TYPE_ANY value as an available option for the
2+
# resource_type field in the CreateACLRequest schema.
3+
overlay: 1.0.0
4+
info:
5+
title: Remove RESOURCE_TYPE_ANY from Create ACL Request Body
6+
version: 1.0.0
7+
8+
# Note that we will have to manually update this enum if the Cloud team adds
9+
# new resource types in the future.
10+
actions:
11+
- target: "$.components.schemas"
12+
update:
13+
CreateACLResourceType:
14+
description: |-
15+
The type of resource (topic, consumer group, etc.) this
16+
ACL targets.
17+
enum:
18+
- "RESOURCE_TYPE_TOPIC"
19+
- "RESOURCE_TYPE_GROUP"
20+
- "RESOURCE_TYPE_CLUSTER"
21+
- "RESOURCE_TYPE_TRANSACTIONAL_ID"
22+
- "RESOURCE_TYPE_DELEGATION_TOKEN"
23+
- "RESOURCE_TYPE_USER"
24+
- "RESOURCE_TYPE_REGISTRY"
25+
- "RESOURCE_TYPE_SUBJECT"
26+
type: "string"
27+
# Replace the $ref with an inline enum that excludes RESOURCE_TYPE_ANY
28+
- target: "$.components.schemas.CreateACLRequest.properties.resource_type"
29+
update:
30+
$ref: '#/components/schemas/CreateACLResourceType'

0 commit comments

Comments
 (0)