JSPM

angular-swagger-client-generator

0.1.15
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 13
  • Score
    100M100P100Q41818F
  • License Apache-2.0

Angular REST API client generator from Swagger JSON using new HttpClient api

Package Exports

  • angular-swagger-client-generator

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (angular-swagger-client-generator) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

angular-swagger-client-generator

Angular API client generator from Swagger JSON specification

Description

This package generates a Angular 4 TypeScript classes from a Swagger v2.0 specification file. The code is generated using Mustache templates.

The generated service class uses new HttpClient module of Angular 4.

How to get it working

Installation

npm install angular-swagger-client-generator

or

git clone https://github.com/resistancecanyon/angular-swagger-client-generator
cd angular-swagger-client-generator
npm install
npm run build

Usage

From command line, run:

a4apigen -s [yopur/path/to/swagger.json]

or

a4apigen -u [url/of/your/swagger.json]

Example usage:

This command will generate API client described in swagger.json file to ./out folder

a4apigen -s ./tests/apis/swagger.json -o ./out

or from repository directory run:

node ./src/a4apigen -s ./tests/apis/swagger.json -o ./out

Note:

This project was inspired by swagger-js-codegen project.