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 摘要。