chenshuai2144 / openapi2typescript

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

[Bug] 1.4.4 升级后,allof数据模型生成问题 #66

Closed darin-lao closed 2 years ago

darin-lao commented 2 years ago

在1.3.10版本生在代码无问题,但升级1.4.4后

"OutSourceOrderVO": {
        "allOf": [
          {
            "$ref": "#/components/schemas/CommonVO"
          },
          {
            "$ref": "#/components/schemas/FinishedGoodsInventoryOrderVO"
          }
        ],
        "description": "xx实体",
        "x-apifox-folder": "finishedGoodsInventory/outSourceOrder"
      },

1.3.10版本生生的代码

 type OutSourceOrderVO = CommonVO & FinishedGoodsInventoryOrderVO;

1.4.4版本生成的代码

 type OutSourceOrderVO = '' & FinishedGoodsInventoryOrderVO;
scrapstation commented 2 years ago

能把你后端的类的定义代码贴上来吗,我发现这个问题了,但是你这个结构看起来像多继承

darin-lao commented 2 years ago

我在1.5.0版本测试无问题。