Bug Report Checklist
Description
The generated client has an optional mixed type. Mixed already contains null values.
PHP Fatal error: Type mixed cannot be marked as nullable since mixed already includes null
/**
* Operation setValue
*
* @param mixed|null $body body (optional)
*
* @throws ApiException
* @return ApiResult
*/
public function setValue(?mixed $body = null): ApiResult
{
list($response) = $this->setValueWithHttpInfo($body);
return $response;
}
openapi-generator version
7.10.0
OpenAPI declaration
"/api/value": {
"post": {
"tags": [
"Value"
],
"operationId": "SetValue",
"parameters": [],
"requestBody": {
"content": {
"application/json": {
"schema": {}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiResponse"
}
},
}
},
"401": {
"description": "Unauthorized"
},
"403": {
"description": "Forbidden"
}
},
"security": [
{
"apiKey": [
"Key"
],
}
]
}
},
Generation Details
Steps to reproduce
Create the PHP API client with optional POST body
Related issues/PRs
Suggest a fix
Remove the ? if the type is mixed.
Bug Report Checklist
Description
The generated client has an optional mixed type. Mixed already contains null values.
PHP Fatal error: Type mixed cannot be marked as nullable since mixed already includes nullopenapi-generator version
7.10.0
OpenAPI declaration
Generation Details
Steps to reproduce
Create the PHP API client with optional POST body
Related issues/PRs
Suggest a fix
Remove the ? if the type is mixed.