acacode / acacode/swagger-typescript-api

Query params of type array are not generated as array

Aperta
#524 1 commento 1 reazione 0 assegnatari Vedi su GitHub
Lingua principale
TypeScript
Stelle
4.1k
Fork
436
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

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

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.