Open
Description
Description
"/upload?id={id}": {
"post": {
"parameters": [
{
"name": "id",
"in": "query",
"description": "File id",
"required": true,
"schema": {
"type": "string"
}
}
],
"description": "Upload file information",
"responses": {
"200": {
"description": "response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/UploadFile"
}
}
}
}
}
},
"summary": "",
"tags": [
"Upload - File"
],
"requestBody": {
"description": "Upload files",
"required": true,
"content": {
"multipart/form-data": {
"schema": {
"type": "object",
"properties": {
"fileInfo": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"alternativeText": {
"type": "string"
},
"caption": {
"type": "string"
}
}
},
"files": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
}
},
is generating:
export const postUpload?id=byId = <ThrowOnError extends boolean = false>(options: Options<PostUpload_id_byIdData, ThrowOnError>) => {
return (options.client ?? _heyApiClient).post<PostUpload_id_byIdResponses, unknown, ThrowOnError>({
...formDataBodySerializer,
security: [
{
scheme: 'bearer',
type: 'http'
}
],
url: '/upload?id={id}',
...options,
headers: {
'Content-Type': null,
...options.headers
}
});
};
note the ? in the function name
Reproducible example or configuration
https://stackblitz.com/edit/hey-api-client-fetch-example
OpenAPI specification (optional)
No response
System information (optional)
No response