1.0.1 • Published 1 year ago
swagger-to-ts-api-for-webpack v1.0.1
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
}),
];
}