openapi2typescript icon indicating copy to clipboard operation
openapi2typescript copied to clipboard

不同controller下的同名方法的Get请求生成typings.d.ts 冲突

Open scrapstation opened this issue 3 years ago • 13 comments

Product和Refund都有同名方法GetById

在类型文件里生成了两个GetByIdParams


"/api/Product/{productId}": {
      "get": {
        "tags": [
          "Product"
        ],
        "operationId": "Product_GetById",
        "parameters": [
          {
            "name": "productId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "format": "guid"
            },
            "x-position": 1
          }
        ],
        "responses": {
          "200": {
            "description": "",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/GetProductByIdResponse"
                }
              }
            }
          }
        }
      },
}

scrapstation avatar Apr 08 '22 19:04 scrapstation

https://github.com/umijs/plugins/issues/828

scrapstation avatar Apr 08 '22 19:04 scrapstation

可以先退回1.3.0版本使用

XuJin186 avatar Apr 13 '22 05:04 XuJin186

umijs/plugins#828

你搞定了嘛

XuJin186 avatar Apr 24 '22 05:04 XuJin186

umijs/plugins#828

你搞定了嘛

我暂时通过改方法名 GetById->GetOrderById

scrapstation avatar Apr 24 '22 05:04 scrapstation

umijs/plugins#828

你搞定了嘛

或者你研究研究提个pr

scrapstation avatar Apr 24 '22 05:04 scrapstation

umijs/plugins#828

你搞定了嘛

或者你研究研究提个pr

我就是搞不定才问你得呀 我连node调试都不会 我和你一样都是c#

XuJin186 avatar Apr 24 '22 05:04 XuJin186

umijs/plugins#828

你搞定了嘛

或者你研究研究提个pr

我就是搞不定才问你得呀 我连node调试都不会 我和你一样都是c#

那你等等我下午提个pr

scrapstation avatar Apr 24 '22 05:04 scrapstation

umijs/plugins#828

你搞定了嘛

或者你研究研究提个pr

我就是搞不定才问你得呀 我连node调试都不会 我和你一样都是c#

那你等等我下午提个pr

好的 感谢 我现在都是回退到1.3.0
image 1.3.0生成出来得

XuJin186 avatar Apr 24 '22 05:04 XuJin186

umijs/plugins#828

你搞定了嘛

或者你研究研究提个pr

我就是搞不定才问你得呀 我连node调试都不会 我和你一样都是c#

那你等等我下午提个pr

好的 感谢 我现在都是回退到1.3.0

image

1.3.0生成出来得

你期望的params命名规则是什么? [Action]+Params+For+[ControllerName]?

eg. GetByIdParamsForOrder

scrapstation avatar Apr 24 '22 05:04 scrapstation

umijs/plugins#828

你搞定了嘛

或者你研究研究提个pr

我就是搞不定才问你得呀 我连node调试都不会 我和你一样都是c#

那你等等我下午提个pr

好的 感谢 我现在都是回退到1.3.0 image 1.3.0生成出来得

你期望的params命名规则是什么? [Action]+Params+For+[ControllerName]?

eg. GetByIdParamsForOrder

其实我是无所谓得 只要不报错就行 1.3.0版本得那个似乎也行 无非就是没办法复用

XuJin186 avatar Apr 24 '22 05:04 XuJin186

不行得话 就是再开一个方法可以外部配置 参数就是actionName controllerName 默认为 [Action]+Params+For+[ControllerName]

XuJin186 avatar Apr 24 '22 05:04 XuJin186

umijs/plugins#828

你搞定了嘛

或者你研究研究提个pr

我就是搞不定才问你得呀 我连node调试都不会 我和你一样都是c#

那你等等我下午提个pr

好的 感谢 我现在都是回退到1.3.0

image

1.3.0生成出来得

你期望的params命名规则是什么? [Action]+Params+For+[ControllerName]?

eg. GetByIdParamsForOrder

其实我是无所谓得 只要不报错就行 1.3.0版本得那个似乎也行 无非就是没办法复用

我没用过1.3.0,之前用的.net nswag,tomkingke我wx,wx说吧

scrapstation avatar Apr 24 '22 05:04 scrapstation

已加

XuJin186 avatar Apr 24 '22 05:04 XuJin186