openapi2typescript icon indicating copy to clipboard operation
openapi2typescript copied to clipboard

一个被大范围使用的小工具

Results 63 openapi2typescript issues
Sort by recently updated
recently updated
newest added

``` "parameters": [ { "name": "tenantId", "in": "header", "required": true, "schema": { "type": "string" }, "default": "tenant's Id" } ] ``` 比如 请求中有一个参数是tenantId,该参数需要通过Header传递 ,但是生成的代理该参数不会包装到header去 而是query :(

https://github.com/chenshuai2144/openapi2typescript/blob/74b11d5a6c8a46a6c10856920404ebe0b709076b/src/serviceGenerator.ts#L569-L578 问个问题哈,200 的优先级不是应该比 default 高吗,还是我理解错了 例如当我有个接口是这样定义的 ```json "paths": { "/v1/address/find_by_user_id": { "get": { "operationId": "Address_FindAddressByUserId", "responses": { "200": { "description": "A successful response.", "schema": { "$ref": "#/definitions/addressFindAddressByUserIdReply" } }, "default":...

"@umijs/plugin-openapi": "^1.3.3" 我使用openapi 生成接口的时候,我服务端model是结构性的 type ArticleItem struct { CollectedData * ArticleCollectedData ArticleFormData * ArticleFormData Highlight map[string]*HighlightItem } 我预期生成一个也是结构性的结构比如 type ArticleItem = { article_form_data?: ArticleFormData; collected_data?: ArticleCollectedData; }; 但是通过plugin-openapi生成接口的时候,ArticleItem 结构只得到了 type...

因为这个导致得生成类型问题 [#76 ](https://github.com/chenshuai2144/openapi2typescript/pull/76)

(Patchable) parameter.type is mandatory for non-body parameters ![image](https://user-images.githubusercontent.com/66985784/170068100-7788dc8e-ef5b-4fc2-8eb4-547df1815721.png)

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":...

Hi, I having a Spring Boot application where I have a REST endpoint that consumes "multipart/form-data". The endpoint expects two file parts, the userData of type "application/json" and a profile...

help need

最近在弄hook,想解构类型,发现分析器被any类型阻断了,是不是改成unknown更为合理 ```ts type Response = { code?: number; data?: unknown; // 生成any情形下, 下面hook的类型分析,就会被阻断 msg?: string; }; /** 获取当前登录账号信息 GET /admin/login */ export async function LogInfo(options?: { [key: string]: any })...

![image](https://user-images.githubusercontent.com/43058612/143559475-6b35941a-8667-4022-9f13-bc62acf98ef0.png) JSON文件已上传 [swagger.zip](https://github.com/chenshuai2144/openapi2typescript/files/7607785/swagger.zip) 还请帮忙看下,谢谢