Sub‐generator: swagger - BlueOakJS/generator-blueoak GitHub Wiki

This sub-generator will take a swagger specification (YAML or JSON) and generate Angular Services to use in your project. If you're using BlueOak Server on the back-end, placing your swagger specification in a directory named swagger will automatically wire up routes to a corresponding handler.

Setup

To run the swagger sub-generator, you'll need to supply a path to the swagger specification. It should be noted the path you supply will be relative to the root of the project. Here's an example:

yo fegen:swagger server/swagger/petstore.json

Usage

The generated files are placed in client/src/app/swagger -- you shouldn't edit this file directly. Instead, if you modify your swagger specification, re-run the generator.

This sub-generator is built off of swagger-js-codegen and retains the same API.