Skip to content

phpjavac/vue-cli-plugin-swagger-to-types

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vue-cli-plugin-swagger-to-types

自动从swagger生成inteface

// 1.安装插件
  vue add swagger-to-types

// 2.vue.config.js中设置配置
  pluginOptions: {
    toTypes: {
      host: "http://192.168.1.1/demo-web/v2/api-docs", // swagger地址
      TypesPath: "./types/api.d.ts" // 生成的interface
     }
  },

// 3.package.json中 添加生成types命令
  vue-cli-service getTypes

About

自动从swagger生成inteface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published