Apigee API proxy to Swagger yaml file generation

Not applicable

Hi Anil,

I have created a sample API proxy via apigee. I need to create a swagger (.yaml) file for that API proxy. Can you please let me know the steps to achieve in local windows machine.

@ Anil - Quick reply is most appreciated.

Thanks

0 5 2,717
5 REPLIES 5

Hi there

Are you referring to this tool?

https://github.com/anil614sagar/apigee2openapi

Dane - Thanks for the reply

Yes.

PFA.I am not able to generate swagger file via this command

"apigee2openapi -d /Users/ashfaqullah.a/Documents".

facing-issue-in-apigee2openapi.png

HI @Ashfaq Aman

apigee2openapi is a node module (npm). You will need to install Node/npm and then install that module in your machine to get it working. For more info - https://www.npmjs.com/package/apigee2openapi

apigee2openapi-issue.pngDane/Sai - Thanks for the info.

PFA. I facing the error while generation the swagger file.

ERROR:

"Error: getaddrinfo EAI_AGAIN api.enterprise.apigee.com:443
at Object._errnoException (util.js:1024:11)
at errnoException (dns.js:55:15)
at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:92:26)
code: 'EAI_AGAIN',
errno: 'EAI_AGAIN',
syscall: 'getaddrinfo',
hostname: 'api.enterprise.apigee.com',
host: 'api.enterprise.apigee.com',
port: 443"

Can you please reply back.

The error you are seeing indicates you cannot reach "api.enterprise.apigee.com".

Are you able to make curl requests to the management API?

For example:

curl -i -n https://api.enterprise.apigee.com/v1/o/{ORG}/apis