From d4cf35ee71cd0110c004fe1242d19efe85f8954d Mon Sep 17 00:00:00 2001 From: Jens-Olaf Hemprich Date: Thu, 5 Sep 2024 13:35:51 +0200 Subject: [PATCH] IMS-27434 Fixed wrong ..._ToString function name --- .../src/main/resources/C-libcurl/model-body.mustache | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache b/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache index b848e2a2e8c8..8a28e5d1cd7f 100644 --- a/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache +++ b/modules/openapi-generator/src/main/resources/C-libcurl/model-body.mustache @@ -376,7 +376,7 @@ cJSON *{{classname}}_convertToJSON({{classname}}_t *{{classname}}) { {{/isBoolean}} {{#isEnum}} {{#isString}} - if(cJSON_AddStringToObject(item, "{{{baseName}}}", {{{name}}}{{classname}}_ToString({{{classname}}}->{{{name}}})) == NULL) + if(cJSON_AddStringToObject(item, "{{{baseName}}}", {{classname}}_{{{name}}}_ToString({{{classname}}}->{{{name}}})) == NULL) { goto fail; //Enum } @@ -884,7 +884,7 @@ fail: {{^isPrimitiveType}} {{#isModel}} {{#isEnum}} - {{^required}}{{{name}}} ? {{/required}}{{{name}}}_local_nonprim_enum{{^required}} : {{projectName}}_{{classVarName}}_{{enumName}}_NULL{{/required}}{{^-last}},{{/-last}} + {{^required}}{{{name}}} ? {{/required}}{{{name}}}_local_nonprim_enum{{^required}} : -1{{/required}}{{^-last}},{{/-last}} {{/isEnum}} {{^isEnum}} {{^required}}{{{name}}} ? {{/required}}{{{name}}}_local_nonprim{{^required}} : NULL{{/required}}{{^-last}},{{/-last}} @@ -914,7 +914,7 @@ fail: {{/isBoolean}} {{#isEnum}} {{#isString}} - {{^required}}{{{name}}} ? {{/required}}{{name}}Variable{{^required}} : {{projectName}}_{{classVarName}}_{{enumName}}_NULL{{/required}}{{^-last}},{{/-last}} + {{^required}}{{{name}}} ? {{/required}}{{name}}Variable{{^required}} : -1{{/required}}{{^-last}},{{/-last}} {{/isString}} {{/isEnum}} {{^isEnum}}