Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

apigee-go-gen creating custom template with updating apiproxy.yaml under oas3

Hi @lalevee@ssvaidyanathan 

We are trying to create a custom template to include  multiple route rules using system.region.name variables (conditions) & also include corresponding targetservers in apiprpoxy.yaml under oas3 in apigee-go-gen but not successful. Does apigee-go-gen follow the apigeex apiproxy.xml indent or what tool could help create the yaml with correct indent?

RouteRule:
.name: east
Conditions:
- Condition: "system.region.name == 'east'"
TargetEndpoint: west
- RouteRule:
.name: west
Conditions:
- Condition: "system.region.name == 'west'"
TargetEndpoint: west
- RouteRule:
.name: default
TargetEndpoint: east
Conditions: []
TargetEndpoints:
- TargetEndpoint:
.name: west
HTTPTargetConnection:
LoadBalancer:
- Algorithm: RoundRobin
- Server:
.name: api-region1
- Server:
.name: api-region2
IsFallback: true
- MaxFailures: 10
- ServerUnhealthyResponse:
- ResponseCode: 502
- ResponseCode: 503
- ResponseCode: 504
- HealthMonitor:
IsEnabled: true
IntervalInSec: 35
HTTPMonitor:
Request:
ConnectTimeoutInSec: 10
SocketReadTimeoutInSec: 30
Port: 443
Verb: GET
Path: /livecheck
SuccessResponse:
ResponseCode: 200
- TargetEndpoint:
.name: east
HTTPTargetConnection:
LoadBalancer:
- Algorithm: RoundRobin
- Server:
.name: api-region2
- Server:
.name: api-region1
IsFallback: true
- MaxFailures: 10
- ServerUnhealthyResponse:
- ResponseCode: 502
- ResponseCode: 503
- ResponseCode: 504
- HealthMonitor:
IsEnabled: true
IntervalInSec: 35
HTTPMonitor:
Request:
ConnectTimeoutInSec: 10
SocketReadTimeoutInSec: 30
Port: 443
Verb: GET
Path: /livecheck
SuccessResponse:
ResponseCode: 200
 
 
Error:
Error: unknown node "Request" found at "Root.ProxyEndpoints.0.ProxyEndpoint(name: PreFlow)"
Error: unknown node "IsFallback" found at "Root.TargetEndpoints.0.TargetEndpoint(name: west).HTTPTargetConnection.LoadBalancer"
1 12 457
12 REPLIES 12