chenshuai2144 / openapi2typescript

一个被大范围使用的小工具
312 stars 136 forks source link

[1.4.3] enum 会被转化为 Record #61

Closed emeiziying closed 2 years ago

emeiziying commented 2 years ago
  "apiLoginType": {
      "type": "integer",
      "format": "int32",
      "enum": [0, 1],
      "default": "0",
      "title": "- 0: 企业内部应用免登\n - 1: 第三方应用扫码登陆"
    },

会被转化为Record<string,any> 应该是0|1才对 1.4.0版本是没这个问题的

scrapstation commented 2 years ago

57 的bug

等 #62 修复

可以先在配置项加 enumStyle: 'string-literal'