I'm working on a project and am using the swagger2api tool as part of the workflow. However, for this to work effectively in the workflow, I'll need to script the usage of the tool. Currently, the tool requires interactive input of the base URL, org, and user credentials.
Can these be passed as additional arguments so that it can be scripted?
Solved! Go to Solution.
Dear @janticouni ,
Thank you for using the tool & great suggestions. We will definitely take it forward & implement same.
- Currently, the tool requires confirmation of the base URL, org, and user credentials. Can this be passed as additional arguments so that it can be scripted and avoid the interactive ui?
Currently we capture information via interactive UI. We will make sure next version of tool supports arguments for same. I will keep you informed once above feature is available. You are welcome to submit pull request too in github. It's an open source tool. I will try to release the same today. I will keep you updated.
- I'm testing with a very simple swagger document; do you have a sample swagger doc that exposes more policies and surface area of Edge features?
Yes, We have documented same in Apigee Community Articles. Please find below links.
Getting Started with Swagger2API
Swagger2API Apigee-127 Extensions support
Secure APIs using OAuth2.0 & Verify API Key Policies in Apigee using Swagger 2.0
- Any sample swagger documents to share ?
PetStore example is great way to start. You can find same here. You can also find examples in source code examples directory. Above articles have sample swagger specs that also showcases Apigee-127 support & creating policies using A-127 extensions.
** UPDATE ** :
sudo npm update -g swagger2api
swagger2api generateApi -h
swagger2api generateApi petStore -s http://petstore.swagger.io/v2/swagger.json -D -d /Users/Anil/Desktop/ --baseuri https://api.enterprise.apigee.com --organization XXXXXXX --username XXXXXXXXXXXX --password XXXXXXXX --environment test --virtualhosts default,secure
Keep us posted if you have any queries.
Dear @janticouni ,
Thank you for using the tool & great suggestions. We will definitely take it forward & implement same.
- Currently, the tool requires confirmation of the base URL, org, and user credentials. Can this be passed as additional arguments so that it can be scripted and avoid the interactive ui?
Currently we capture information via interactive UI. We will make sure next version of tool supports arguments for same. I will keep you informed once above feature is available. You are welcome to submit pull request too in github. It's an open source tool. I will try to release the same today. I will keep you updated.
- I'm testing with a very simple swagger document; do you have a sample swagger doc that exposes more policies and surface area of Edge features?
Yes, We have documented same in Apigee Community Articles. Please find below links.
Getting Started with Swagger2API
Swagger2API Apigee-127 Extensions support
Secure APIs using OAuth2.0 & Verify API Key Policies in Apigee using Swagger 2.0
- Any sample swagger documents to share ?
PetStore example is great way to start. You can find same here. You can also find examples in source code examples directory. Above articles have sample swagger specs that also showcases Apigee-127 support & creating policies using A-127 extensions.
** UPDATE ** :
sudo npm update -g swagger2api
swagger2api generateApi -h
swagger2api generateApi petStore -s http://petstore.swagger.io/v2/swagger.json -D -d /Users/Anil/Desktop/ --baseuri https://api.enterprise.apigee.com --organization XXXXXXX --username XXXXXXXXXXXX --password XXXXXXXX --environment test --virtualhosts default,secure
Keep us posted if you have any queries.
Thanks for the quick response, @Anil! I updated to the new version and it worked on the first go.
Awesome @janticouni , Glad your query is resolved. Keep us posted 🙂
User | Count |
---|---|
3 | |
2 | |
1 | |
1 | |
1 |