ng2-rest-swagger-generator
Generate Angualr 2 Service from swagger json
Last updated 7 months ago by darekf77 .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install ng2-rest-swagger-generator 
SYNC missed versions from official npm registry.

ng2-rest-swagger-generator

Generate services for Angular2+ from your swagger.json files.

Instalation

npm install ng2-rest-swagger-generator -g

Usage

ng2-rest-swagger-generateor \
  --json ~/api_swagger.json \           # local swagger json file  or 
  --json http://api.com/swagger.json \  # external link to swagger json
  --base my_api_from_swagger_json

It will generate my_api_from_swagger_json folder with angular2_ module.

Your can alsow ommit --base param, default out folder is "api".

Import

To import generated module in app.module of you angular app do this:

    import { Ng2RestGenModule } from './api';
    ...
    imports: [ Ng2RestGenModule ],
    ...

Api url modyfication

It you wanna change your base paths just use property enpointUrl in Ng2RestGenModule module :

	if(enviroment.production) {
		Ng2RestGenModule.enpointUrls.myresource.myhost = 'https://myproductionhost.com'
	}

Parameters description

param description
--json online links or local paths for swagger.json files
--base output module folder
-s if https protocole enable (one for all json-s)

Current Tags

  • 5.0.15                                ...           latest (7 months ago)

35 Versions

  • 5.0.15                                ...           7 months ago
  • 5.0.14                                ...           7 months ago
  • 5.0.1                                ...           7 months ago
  • 4.0.6                                ...           7 months ago
  • 4.0.5                                ...           7 months ago
  • 4.0.4                                ...           7 months ago
  • 4.0.3                                ...           7 months ago
  • 3.1.2                                ...           2 years ago
  • 3.1.1                                ...           2 years ago
  • 3.1.0                                ...           2 years ago
  • 3.0.5                                ...           2 years ago
  • 3.0.3                                ...           2 years ago
  • 3.0.2                                ...           2 years ago
  • 2.0.5                                ...           2 years ago
  • 2.0.4                                ...           2 years ago
  • 2.0.3                                ...           2 years ago
  • 2.0.2                                ...           2 years ago
  • 0.0.27                                ...           2 years ago
  • 0.0.24                                ...           2 years ago
  • 0.0.23                                ...           2 years ago
  • 0.0.22                                ...           2 years ago
  • 0.0.21                                ...           2 years ago
  • 0.0.20                                ...           2 years ago
  • 0.0.19                                ...           2 years ago
  • 0.0.16                                ...           2 years ago
  • 0.0.15                                ...           2 years ago
  • 0.0.14                                ...           2 years ago
  • 0.0.13                                ...           3 years ago
  • 0.0.12                                ...           3 years ago
  • 0.0.11                                ...           3 years ago
  • 0.0.10                                ...           3 years ago
  • 0.0.8                                ...           3 years ago
  • 0.0.7                                ...           3 years ago
  • 0.0.4                                ...           3 years ago
  • 0.0.3                                ...           3 years ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 35
Dependencies (92)
Dev Dependencies (8)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |