Closed carlosmscabral closed 1 month ago
Using the following command:
apigee-go-gen render apiproxy --template ./template/apiproxy.yaml \ --set-oas spec=./productOrdering-v2.yaml \ --include ./template/*.tmpl \ --output ./out/apiproxies/productOrdering-v2
I receive the following error message:
Error: unknown node "PostClientFlow" found at "Root.ProxyEndpoints.0.ProxyEndpoint(name: default)"
It seems that PostClientFlows are not well understood by the tool.
The full template is below:
APIProxy: .revision: 1 .name: teste DisplayName: {{$.Values.spec.info.title}} Description: {{$.Values.spec.info.description}}
Policies:
Resource: jsc://transformPath.js TargetEndpoints: TargetEndpoint: default Policies: $ref: ./policies.yaml#/ ProxyEndpoints:
ProxyEndpoint: .name: default FaultRules: FaultRule: .name: SF Error Handling Step: Name: FC-ErrorHandling PreFlow: Request:
RouteRule: .name: default TargetEndpoint: default TargetEndpoints:
Path: ./spec.yaml
Path: ./config.properties
If I coment out the PostClientFlow portion, the rendering simply works.
Fixed by https://github.com/apigee/apigee-go-gen/pull/15
Using the following command:
apigee-go-gen render apiproxy --template ./template/apiproxy.yaml \ --set-oas spec=./productOrdering-v2.yaml \ --include ./template/*.tmpl \ --output ./out/apiproxies/productOrdering-v2
I receive the following error message:
Error: unknown node "PostClientFlow" found at "Root.ProxyEndpoints.0.ProxyEndpoint(name: default)"
It seems that PostClientFlows are not well understood by the tool.
The full template is below:
APIProxy: .revision: 1 .name: teste DisplayName: {{$.Values.spec.info.title}} Description: {{$.Values.spec.info.description}}
BasePaths: /api/geographicAddressManagement/v1
Policies:
Resource: jsc://transformPath.js TargetEndpoints: TargetEndpoint: default Policies: $ref: ./policies.yaml#/ ProxyEndpoints:
ProxyEndpoint: .name: default FaultRules: FaultRule: .name: SF Error Handling Step: Name: FC-ErrorHandling PreFlow: Request:
{{- range $path, $pathItem := $.Values.spec.paths }}
{{- range $verb, $opItem := $pathItem }}
{{- if eq (include "get_visibility" $opItem) "INTERNAL" }}
{{- fmt_printf "Skipping internal operation '%s' (%s %s)\n" $opItem.operationId $verb $path }}
{{- continue }}
{{- end }}
{{- end }}
{{- end }}
RouteRule: .name: default TargetEndpoint: default TargetEndpoints:
{{ os_writefile "./spec.yaml" $.Values.spec_string }}
{{ remove_oas_extensions "./spec.yaml" }}
Path: ./spec.yaml
{{ os_copyfile "./config.properties" "./resources/config.properties" }}
Path: ./config.properties