Bug Report Checklist
Description
I bumped into an issue when using the php-nextgen generator where an operation has multiple response schemas and at least one of the response code doesn't have a schema defined.
openapi-generator version
7.19.0
OpenAPI declaration file content or url
https://gist.github.com/kocsismate/ba40e007a12c9a17cee7cb162b624b2c
Generation Details
docker run --rm \
--volume "$scriptPath:/local" \
--user "$(id -u):$(id -g)" \
openapitools/openapi-generator-cli:v7.19.0 generate \
--config /local/openApiConfig.json \
--output /local
The openApiConfig.json is the following:
{
"invokerPackage": "Api\\Client",
"artifactVersion": "1.0.0",
"composerPackageName": "api/client",
"packageName": "api/client",
"inputSpec": "https://gist.githubusercontent.com/kocsismate/ba40e007a12c9a17cee7cb162b624b2c/raw/994c4e2f4d92566a3b4f00b5fe57406fc7ad739e/schema.json",
"validateSpec": false,
"generatorName": "php-nextgen"
}
Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/pull/22322/changes#r2728382066
Suggest a fix
Always use the full union type syntax, rather than the ? shorthand.
Bug Report Checklist
Description
I bumped into an issue when using the php-nextgen generator where an operation has multiple response schemas and at least one of the response code doesn't have a schema defined.
openapi-generator version
7.19.0
OpenAPI declaration file content or url
https://gist.github.com/kocsismate/ba40e007a12c9a17cee7cb162b624b2c
Generation Details
The
openApiConfig.jsonis the following:{ "invokerPackage": "Api\\Client", "artifactVersion": "1.0.0", "composerPackageName": "api/client", "packageName": "api/client", "inputSpec": "https://gist.githubusercontent.com/kocsismate/ba40e007a12c9a17cee7cb162b624b2c/raw/994c4e2f4d92566a3b4f00b5fe57406fc7ad739e/schema.json", "validateSpec": false, "generatorName": "php-nextgen" }Related issues/PRs
https://github.com/OpenAPITools/openapi-generator/pull/22322/changes#r2728382066
Suggest a fix
Always use the full union type syntax, rather than the
?shorthand.