Open s-xu-wafios opened 4 months ago
this is probably the same as https://github.com/OpenAPITools/openapi-generator/issues/18999
this is probably the same as #18999
@winniehell yeah the issues are similar. I had to abandon "allOf" to workaround this
a workaround for the example above would be:
const customFieldsApi = new CustomFieldsApi(config);
customFieldsApi
.fetchCustomFields({'work_order': CustomFieldTypeEnum.WorkOrder})
of course, this is not manageable for bigger code bases.
Bug Report Checklist
Description
When I use "allOf" in a query parameter (enum), the generated "AxiosParamCreator" uses the enum value in a wrong manner.
openapi-generator version
7.7.0
OpenAPI declaration file content or url
The following definition will cause the error
Generation Details
The code would be generated:
When the user calls the method and passes in
CustomFieldTypeEnum.WorkOrder
, the code above will split each character in the enum and result in{0=w&1=o&2=r&3=k&4=_&5=o&6=r&7=d&8=e&9=r}
Steps to reproduce
Call the generated method by running:
It will generate a wrong request URL (see following screenshot), where the correct expectation should be
type=work_order
(instead ofw, o, r, k, _, o, r, d, e, r
with0123456789
)Suggest a fix
As a temporal work-around, I had to remove "allOf"
To make "allOf" work again, I think, in the generated code, the enum should be generated in the same way (as if "allOf" was not being used):