Open vicentepinto98 opened 1 month ago
thanks for reporting the issue.
i've filed https://github.com/OpenAPITools/openapi-generator/pull/19986 to fix the issue with a test
would appreciate if you can pull the branch and do a test locally to confirm it fixes the issues for your use cases as well
Bug Report Checklist
Description
A component defined in the API specification which is defined as a
allOf
of a single $ref which is a simple data type model gets generated as aninterface{}
instead of the correct type.The same happens if the model is
nullable
, in which case the field is defined as an unexistentNullableInterface
type.openapi-generator version
OpenAPI declaration file content or url
schema.components block
Generation Details
Generation call:
java -Dlog.level=${LOG_LEVEL} -jar ${PATH} generate \ --generator-name go \ --input-spec ${JSON_SPEC} \ --enable-post-process-file \ --global-property apis,models,modelTests=true,modelDocs=false,apiDocs=false,supportingFiles \ --additional-properties=isGoSubmodule=true,enumClassPrefix=true
Generated model:
Related issues/PRs
Might be related to #17534
Suggest a fix
The generated model should have the type of the simple data type model that is being referenced, in this case
string