Oleh Sky Oleh Sky - 2 months ago 37
Node.js Question

node.js REST client for JHipster application

I have generated jhipster web-app, it comes with REST APIs.

Now, I would like to integrate an existing node.js application to jhipster web-app.

Is there a way to generate a rest-jhipster-client from existing jhipster app? Instead of manually creating functions and calls? Currently using node-rest-client for this

Thank you!


JHipster exposes your REST API documentation using swagger.

So you should look for swagger codegen to generate your client code from swagger JSON specification file, for your Jhipster app it is available at /v2/api-docs URL.

I'm not a nodejs expert but you could have a look at this one: https://www.npmjs.com/package/swagger-js-codegen