{
"name": "example",
"in": "query",
"description": "",
"required": false,
"explode": false,
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
/** @type {import('@hey-api/client-fetch').Config} */
const config = {
baseUrl: PUBLIC_API_URL,
throwOnError: true,
credentials: 'include'
};
{
"openapi": "3.0.0",
"info": {
"title": "Test API",
"license": {
"name": "Copyright 2024 Test inc."
},
"version": "0.1.0"
},
"servers": [
{
"url": "http://127.0.0.1:3001",
"description": "API"
}
],
"paths": {
"/test": {
"get": {
"summary": "Test route",
"operationId": "get-test",
"parameters": [
{
"name": "example",
"in": "query",
"description": "",
"required": false,
"explode": false,
"schema": {
"type": "array",
"items": {
"type": "string"
}
}
}
],
"tags": [
"Test"
],
"responses": {
"200": {
"description": "List of test items",
"content": {
"application/json": {
"schema": {
"type": "object",
"title": "List of test items",
"required": [
"meta",
"items"
],
"properties": {
"meta": {
"type": "object",
"title": "Meta data",
"required": [
"total"
],
"properties": {
"total": {
"type": "integer",
"minimum": 0,
"maximum": 9223372036854775807
}
}
},
"items": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TestItem"
}
}
}
}
}
}
}
}
}
}
},
"components": {
"securitySchemes": {
"token": {
"type": "http",
"description": "API token",
"name": "",
"in": "",
"scheme": "bearer",
"bearerFormat": "base32hex"
}
},
"schemas": {
"TestItem": {
"type": "object",
"required": [
"id"
],
"properties": {
"id": {
"type": "string"
}
}
}
}
},
"tags": []
}
Description
We have an OpenAPI 3.0 spec that specifies query params like this:
We want it to generate a query param for the request like
?example=e1,e2but when we generate the client we get?example=e1&example=e2. We could supply thequerySerializerargument to fix this but it should not be needed if already supplied in the spec.The client config looks like this:
Reproducible example or configuration
No response
OpenAPI specification (optional)
System information (optional)
MacOS 14.6.1
Node v20.18.0
@hey-api/open-ts v0.55.1