Skip to content

tht13/gulp-swagger-js-codegen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gulp-swagger-js-codegen

A gulp library for Swagger-JS-Codegen

Basic Usage

Either YAML or JSON can be piped

Local file example

const gulp = require("gulp");
const swagger = require("gulp-swagger-js-codegen");

gulp.task("swagger", () => {
  return gulp.src("example.yaml")
    .pipe(swagger())
    .pipe(gulp.dest("./"));
});

Download example

const gulp = require("gulp");
const swagger = require("gulp-swagger-js-codegen");
const download = require("gulp-download");

gulp.task("swagger", () => {
  return download("http://example.com/example.yaml")
    .pipe(swagger())
    .pipe(gulp.dest("./"));
});

Options

Define out put type in the options argument

options = {
  type: "typescript" | "node" | "angular",
  name: string, # Output file name
  swaggerOptions: {
    # swagger-js-codegen options
  }
}

swagger(options)

About

A gulp library for Swagger-JS-Codegen

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published