I am working on a project where I need to consume APIs from n number of Applications. I am tired of writing microservice for each application. Is there any tool that will generate code for me as API or do I need to write any generic engine? Any help.
I'm not sure how good / useful this is, but I was recently reading up on RAML, which is a YAML based language for describing REST APIs. You can combine that with this tool, osprey, to generate express router middleware from said RAML.
If you give it a go, let me know how well / un-well it worked, and whether that's what you were looking for?
Matt Strom
Software Engineer, TypeScript ninja
Yeoman describes itself as a "scaffolding tool for modern webapps", but I have used it for a general code generation tool with its ability to create custom generators.
Generators have a well-defined lifecycle. In the
promptingstage, if desired, Yeoman can prompt you with different questions that it will use in later stages. You can include a set of static files for Yeoman to copy into the new project, as well as dynamic templates that Yeoman will fill with the answers to the questions, computed values, or arguments from the command line.Yeoman is written in JavaScript and was originally intended for JavaScript, but it can definitely be used for generating code for other languages.