acacode / acacode/swagger-typescript-api

Query params of type array are not generated as array

未關閉
#524 1 則留言 1 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
TypeScript
星號
4.1k
分支
436
PR 合併指標
30 天內沒有已合併 PR

描述

Hi,

when the query param is an array it does not get generated as array.

## Example of swagger.json

```json
"/api/integrations/{id}/files": {
"get": {
"tags": [
"integration-file-controller"
],
"summary": "getIntegrationFiles",
"description": "Returns a integration file list (pageable).",
"operationId": "getIntegrationFilesGET",
"produces": [
"application/json",
"application/xml"
],
"parameters": [
{
"name": "fileTypes",
"in": "query",
"description": "File types",
"required": false,
"type": "array",
"items": {
"type": "string",
"enum": [
"RESOURCE",
"ROUTE",
"PROPERTIES",
]
},
"collectionFormat": "multi",
"enum": [
"RESOURCE",
"ROUTE",
"PROPERTIES"
]
},
```

### Output
but the generated query is not an array:

```javascript
getIntegrationFilesGet: (
query?: {
/** File types */
fileTypes?: GetIntegrationFilesGetParamsFileTypes;
```

### Expected output:

```javascript
getIntegrationFilesGet: (
query?: {
/** File types */
fileTypes?: Array;
```

Thanks

貢獻指南

這個儲存庫沒有索引到貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。