apigee / apigee-go-gen

Apache License 2.0
2 stars 3 forks source link

apigee-go-gen transform yaml-to-apiproxy : This commadn is not working properly #12

Open Ankit-Dwivedi opened 2 months ago

Ankit-Dwivedi commented 2 months ago

Hi Team,

I use below command to create yaml file from the proxy bundle: apigee-go-gen transform apiproxy-to-yaml --input ./api/api.zip --output ./api/api.yaml`

Then i use the same yaml file to create proxy bundle apigee-go-gen transform yaml-to-apiproxy --input ./api/api.yaml --output ./api/api1.zip

We are getting below error: Error: unknown node "Basepaths" found at "Root.APIProxy" Error: unknown node "PostClientFlow" found at "Root.ProxyEndpoints.0.ProxyEndpoint(name: default)"

I also tried this with multiple api got different different error: Error: unknown node "Basepaths" found at "Root.APIProxy" Error: unknown node "PostClientFlow" found at "Root.ProxyEndpoints.0.ProxyEndpoint(name: OAUTH2_TOKEN_V6ProxyEndpoint)" Error: unknown node "HealthMonitor" found at "Root.TargetEndpoints.0.TargetEndpoint(name: OauthIDPservice).HTTPTargetConnection"

micovery commented 4 days ago

Hey @Ankit-Dwivedi the PostClientFlow one was a bug. That has been fixed now through https://github.com/apigee/apigee-go-gen/pull/15

As for the "Basepaths" error ... seems like it should not be there at all. Did you find that in an example in the docs? My guess is that it came from an older Apigee Edge / OPDK manifest file. It's probably safe to delete that element.

@ssvaidyanathan , what do you think?

ssvaidyanathan commented 4 days ago

yeah.. should be Basepath

Pls try with the latest version and see if you are still having issues. If you are, please share your template and spec along with the command you are running. We will be happy to look into this

micovery commented 4 days ago

Also, on second look, @ssvaidyanathan brought up, the "HealthMonitor" error. That's a a bug in the tool.

In the meantime, you can work-around by ignoring validation errors with the --validate false flag