SpecGen seems to be down for couple days… ![]()
I get the tool to run successfully against a on-prem version of apigee with the petstore api but I am not gettting all the API paths and parameters. When I run against one of my APIs the paths are empty but the header information is there. Any suggestions?
Please check the condition you have applied in the flow.
If you have applied a condition like this (proxy.pathsuffix MatchesPath “/pet/findByStatus”) and (request.verb = “GET”) it will work.
But you will not get path for
(proxy.pathsuffix = “/pet/findByStatus”) and (request.verb = “GET”) it will work not work.
This might be the issue with your API.
Question: when trying to run this against a local bundle, I get "error: unknown option ‘-l’
why is this? looking at the code, it looks like it supports running against local Apigee bundles…
You make the statement:
“It creates paths only if conditional flows exist in your API proxy, otherwise there is no way to read paths information since paths data is only available during API runtime not in the proxy bundle.”
But having conditional flows is not sufficient, is it?
You must have a “request.verb” test in the condition, or it will not create the entry.
What happens if your condition has more than 1 request.verb test? (like GET && POST)?
Will that work?
Hi,
Tool doesn’t seem to work if all the conditional flows for resources are defined in TargetEndpoint (I don’t get any errors; just that it creates swagger for the dummy ‘default’ conditional flow (proxy.pathsuffix MatchesPath “/”) and (request.verb = “GET”) defined in ProxyEndoint).
Anyway to add another config input to specify Proxy vs Target for conditional flows?
Thanks,
Aneesh.
Installing apigee2openapi shows four warnings on Linux (Ubuntu / Mint) that I want to note. These were:
sudo npm install -g apigee2openapi<br>
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead<br>
npm WARN deprecated to-iso-string@0.0.2: to-iso-string has been deprecated, use @segment/to-iso-string instead.<br>
npm WARN deprecated jade@0.26.3: Jade has been renamed to pug, please install the latest version of pug instead of jade<br>
npm WARN deprecated minimatch@0.3.0: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
First run does not work, so I’ve installed the required tools:
sudo apt-get install nodejs
sudo apt-get install npm
sudo apt-get install nodejs-legacy
Example “petStore” works for me. Just to point out that:
- Base URI: just hit Enter
- Organization: Org Name AND environment-name
- API Proxy Name: in my case, not “petStore”, but “1151-petstore-rev1-2015-09-13”
Second run works for me.
I’m not getting any parameters in the generated JSON. I tried with your petstore example also. The generated json does not look like the one you have shown above.
I gave the following command:
C:\Users\krishna.seetharaman>apigee2openapi -d D:\
Base URI(https://api.enterprise.apigee.com)https://krishnaseetharaman-eval-test.apigee.net Organization?krishnaseetharaman-eval
User Id? krishna.seetharaman@aspiresys.com ?
Password? **********
API Proxy Name ? firstproxy
Revision Number ? 3
API Proxy End Point ? https://krishnaseetharaman-eval-test.apigee.net
It gave the below error:
Error: Received error 404 when fetching proxy: [object Object] at Request.callback (C:\Users\krishna.seetharaman\AppData\Roaming\npm\node modules\apigee2openapi\lib\downloadApi.js:39:12) at Request.self.callback (C:\Users\krishna.seetharaman\AppData\Roaming\npm\n ode_modules\apigee2openapi\node_modules\request\request.js:185:22) at emitTwo (events.js:126:13) at Request.emit (events.js:214:7) at Request. (C:\Users\krishna.seetharaman\AppData\Roaming\npm\nod e_modules\apigee2openapi\node_modules\request\request.js:1157:10) at emitOne (events.js:116:13) at Request.emit (events.js:211:7) at IncomingMessage. (C:\Users\krishna.seetharaman\AppData\Roaming \npm\node_modules\apigee2openapi\node_modules\request\request.js:1079:12) at Object.onceWrapper (events.js:313:30) at emitNone (events.js:111:20)
Can you please advise what is the reason?
@Anil Sagar, I have scenario where my apigee resources are like :
GET : /api/clients
POST : /api/clients
node module : apigee2openapi
Generated spec has only one end point with POST /api/clients ,GET is missing.
Please let me know if node module is not handling this scenario . pets example shown in this thread have different end points. Thanks in Advance.
Thanks
Anil P
Hello – I’m a huge fan of this tool, but now I’m getting a strange error (“ENAMETOOLONG: name too long, mkdir '/Users/dieter.randolph/desktop/docspock/udr/ources/xsl/deletecontact-add-namespace.xslt�W�o�6~�_q�K�2��#N���݀�” and then some) when I try to use it. Any guidance you can offer would be most welcome. Thanks!
Hello!
I face the following error kindly guide me:
“primordials is not defined”
Thanks!
The above article does not mentions the required version of NodeJs, etc.
I am using Windows 10 with latest NodeJs version and getting below error,
fs.js:39 } = primordials; ^ ReferenceError: primordials is not defined
at fs.js:39:5 at req_
(C:\Users...\AppData\Roaming\npm\node_modules\apigee2openapi\node_modules\natives\index.js:143:24) at Object.req [as require] (C:\Users...\AppData\Roaming\npm\node_modules\apigee2openapi\node_modules\natives\index.js:55:10) at Object. (C:\Users...\AppData\Roaming\npm\node_modules\apigee2openapi\node_modules\graceful-fs\fs.js:1:37) at Module._compile (internal/modules/cjs/loader.js:1200:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1220:10) at Module.load (internal/modules/cjs/loader.js:1049:32) at Function.Module._load (internal/modules/cjs/loader.js:937:14) at Module.require (internal/modules/cjs/loader.js:1089:19) at require (internal/modules/cjs/helpers.js:73:18)
The tool seems to be some pet project and the owner facing challenges with maintaining/supporting it. Why Apigee cannot provide a reliable and stable version of the tool and make this an option to export OpenAPI spect out of existing API Proxies in its online Edge tool UI?
It runs for me when i have the proxy zip file downloaded manually in my local machine.
Command
$ apigee2openapi -d /Downloads
- Base URI ? https://api.enterprise.apigee.com/v1
- Org Name ? org name
- User ID ? emailid
- Password ? password
- API Proxy Name ? Proxy Name
- Revision Number ? 1
- API Proxy End Point ? i am providing the virtual host url here.
can somebody help here?
@always200 - this tool is not maintained currently. You can fork the repo and fix it if needed.
@anilsr - pls suggest what can be done
Unfortunately, Tool is no longer maintained. As Sai says, Please fork the repo and fix if needed.