Apigee2openAPI

 

I was using apigee2openapi tool to generate openAPIspec from apigee API proxy on windows.
I installed the "apigee2openapi" by running the command( "npm install --location=global apigee2openapi")on my window command.
Next I specified the path(destination directory) where I want to download the proxy by running the command
apigee2openapi -d /c/Users/{userprofile}/Downloads.

After I ran this command, I prompted with the below

Base URI ? https://api.enterprise.apigee.com
Org Name ? [your Edge organization name]
User ID ? [your Edge organization administrator email address]
Password ? [your Edge organization administrator password]
API Proxy Name ? [the name of the API proxy]
Revision Number ? [the API proxy revision number]
API Proxy End Point ? [the API proxy target endpoint URL]

I filed all of them, but there is no downloaded(stored) API proxy at the directory which I specified earlier.
I will appreciate if any one can give me an idea or let me know if there is a better way to do.

NB. I am using Apigee x

Solved Solved
0 6 391
1 ACCEPTED SOLUTION

The download part of apigee2openapi tool only works for Apigee Edge. The authentication mechanism and Management API for Apigee X is different and so the tool in its current form can not be used to download proxies in Apigee X.

For Apigee X this means:
1. Download the proxy bundle
2. Run the tool like this against the local proxy bundle:

 

apigee2openapi -d /tmp/apigee-oas-test -l /Users/me/myproxy.zip -n my-proxy-name -e https://api.example.com

 

 

View solution in original post

6 REPLIES 6

The download part of apigee2openapi tool only works for Apigee Edge. The authentication mechanism and Management API for Apigee X is different and so the tool in its current form can not be used to download proxies in Apigee X.

For Apigee X this means:
1. Download the proxy bundle
2. Run the tool like this against the local proxy bundle:

 

apigee2openapi -d /tmp/apigee-oas-test -l /Users/me/myproxy.zip -n my-proxy-name -e https://api.example.com

 

 

Hello,

Does this tool work with OPDK as well ?

Yes, because the proxy bundle structure is the same.

@strebel I ran it the way you mentioned but the generated json doesn't look complete . I downloaded the petstore yaml and created the apigee proxy out of it. Then downloaded the proxy and used the apigee2openapi tool to generate a swagger. Both the yaml don't match. Attaching the screenshots.Screenshot 2023-08-29 at 14.39.57.pngScreenshot 2023-08-29 at 14.43.03.png

That's an expected output. The proxy bundle doesn't contain the same information and therefore has no way to infer things like the response format or query parameter semantics. 

I'd use the generator only to generate a scaffold that then needs to be filled in manually with the additional information that isn't contained in the proxy specification.

Thanks Strebel