1.0.1 • Published 1 year ago

swagger-to-ts-api-for-webpack v1.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
1 year ago

Auto create api from swagger

base on swagger-typescript-api

vue.config.js

const ApiGenerator = require("swagger-to-ts-api-for-webpack").default;

configureWebpack: {
  plugins: [
    // ...other plugins
    ApiGenerator({
      name: "api", // name of generated file
      url: "http://localhost:3000/swagger-ui/index.json", // Get the link of swagger json
      output: "./src/api", // Location after file generation
      templates: "./templates", // Templates location
      // other swagger-typescript-api options
    }),
  ];
}

Default templates

1.0.1

1 year ago

1.0.0

1 year ago