API Proxy Generator

1 2 1,340

Gitter

Hi everyone,

I wanted to publish a blog post in Apigee Community about something that many developers have been looking for. Automated generation of scaffolding and API Management instrumentation of API Proxies. This tool will help developers to manage the API Lifecycle by providing the utilities that automate it. So, importing/exporting KVMs, encrypting/decrypting files, linting, testing, bundle compression, un/deploying to Apigee Edge, etc.) all of this in a seamless and pluggable approach.

In order to achieve these capabilities, this tool relies in two major components: Yeoman Generator and Apigee Grunt Plugins. The latter has already been discussed in previous threads and articles while the former is relatively new. I hope you find it useful!

alt text

Features

  • Build Apigee API Proxy Scaffolding code
  • Customizes scripts based on parameters
  • Includes Grunfile.js and custom tasks to manage deployment to Apigee Edge

Getting Started

  • Install: npm install -g generator-apigee-deploy-grunt-api
  • Run: yo apigee-deploy-grunt-api

The source code of this plugin can be obtained from this Github Repo.

Dare to give it a try and post any comments or questions!

Comments
Alok_Chugh2
New Member

Hi Diego,

I am using your tool and doing, "grunt -v --env=test --upload-modules" and I am getting the following error - "Getting error Cannot read property 'statusCode' of undefined". Any ideas on how to get around this error?

Thanks

kianting-1
New Member

Hi @Diego Zuluaga, I have raised an issue with the generator you have created.

I have segregated the task according to priority queues, when I run yeoman under debug mode I can see that the task is being queued but it is not being but only the task that falls in initialising and prompting queues are being executed. How do I trouble shoot the priority queues and make the task run? Is it something that I am doing that is wrong? Cause if we are to create composite generators to extend your code we need the priority queues to orchestrate the task. Those problem we are facing now is that the task no longer runs and that only task that falls under priority queues of prompting and initialising is running.

Is there a reason why the task created in your code is not put into priority queues?

The following is the print out when I run yeoman using debug mode. You can see that yoemen recognises the task places in the priority queues, and it is queuing each function accordingly, but only the task that falls under initialising and prompting is being executed.

`yo test-proxy
yeoman:generator Queueing initializing in initializing +0ms
yeoman:generator Queueing prompting in prompting +1ms
yeoman:generator Queueing configuring in configuring +0ms
yeoman:generator Queueing apiProxy in writing +0ms
yeoman:generator Queueing grunt in writing +1ms
yeoman:generator Queueing node in writing +0ms
yeoman:generator Queueing tests in writing +0ms
yeoman:generator Queueing config in writing +0ms
yeoman:generator Queueing git in writing +0ms
yeoman:generator Queueing others in writing +0ms
yeoman:generator Queueing copyApigeeConfigTemplate in writing +0ms
yeoman:generator Queueing copyDefault in writing +0ms
yeoman:generator Queueing copyPackage in writing +0ms
yeoman:generator Queueing copyReadme in writing +0ms
yeoman:generator Queueing conflicts in conflicts +0ms
yeoman:generator Queueing install in install +0ms
yeoman:generator Queueing swaggerImport in end +0ms
yeoman:generator Running initializing +1ms
Inializing yo ...
yeoman:generator Running prompting +2ms
launching prompt ...

Out of the box I include scaffolding apiproxy, Node.js, and Gruntfile to build your app.
? Your api name test-mahesh-api
? API Description test mahesh test
? Basepath /mahesh
? Organization Name test-public
? Swagger Specification`

https://github.com/dzuluaga/generator-apigee-deploy-grunt-api/issues/4

Version history
Last update:
‎05-11-2015 04:38 PM
Updated by: