OpenAPI 3.0 with unofficial tooling

As mentioned in the earlier section, this section will use version 2 of the YAML file, which can generate a server using the official tooling. There are, however, other tools out there that can generate some code, but not complete enough to be easy to use:

  1. If using OpenAPI 3.0 on the project folder, execute the following command:
$ npx swagger-node-codegen swagger.oas3.yaml -o ./server...Done! Check out your shiny new API at C:\dev\lemon-mart-swagger-server\server.

Under a new folder, called server, you should now have a Node Express server generated.

  1. Install dependencies for the server:
$ cd server$ npm install

You must then manually implement the missing stubs to complete the implementation of the ...

Get Angular 6 for Enterprise-Ready Web Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.