swagger-typescript-api
swagger-typescript-api copied to clipboard
Query params of type array are not generated as array
Hi,
when the query param is an array it does not get generated as array.
Example of swagger.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:
getIntegrationFilesGet: (
query?: {
/** File types */
fileTypes?: GetIntegrationFilesGetParamsFileTypes;
Expected output:
getIntegrationFilesGet: (
query?: {
/** File types */
fileTypes?: Array<GetIntegrationFilesGetParamsFileTypes>;
Thanks
Same issue here, any chance you have a workaround or fix?