Skip to content

Commit

Permalink
[C-libcurl] The name in API parameter should not be escaped even thou…
Browse files Browse the repository at this point in the history
…gh it includes a C key word. (#5487)
  • Loading branch information
ityuhui authored Mar 1, 2020
1 parent d094cca commit 10d5d27
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
{{#isPrimitiveType}}{{#isNumber}}{{{dataType}}}{{/isNumber}}{{#isLong}}{{{dataType}}}{{/isLong}}{{#isInteger}}{{{dataType}}}{{/isInteger}}{{#isDouble}}{{{dataType}}}{{/isDouble}}{{#isFloat}}{{{dataType}}}{{/isFloat}}{{#isBoolean}}{{dataType}}{{/isBoolean}}{{#isEnum}}{{#isString}}{{{baseName}}}_e{{/isString}}{{/isEnum}}{{^isEnum}}{{#isString}}{{{dataType}}} *{{/isString}}{{/isEnum}}{{#isByteArray}}{{{dataType}}}{{/isByteArray}}{{#isDate}}{{{dataType}}}{{/isDate}}{{#isDateTime}}{{{dataType}}}{{/isDateTime}}{{#isFile}}{{{dataType}}}{{/isFile}}{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isModel}}{{#isEnum}}{{datatypeWithEnum}}_e{{/isEnum}}{{^isEnum}}{{{dataType}}}_t *{{/isEnum}}{{/isModel}}{{^isModel}}{{#isEnum}}{{datatypeWithEnum}}_e{{/isEnum}}{{/isModel}}{{#isUuid}}{{dataType}} *{{/isUuid}}{{#isEmail}}{{dataType}}{{/isEmail}}{{/isPrimitiveType}} valueHeader_{{{paramName}}};
keyValuePair_t *keyPairHeader_{{paramName}} = 0;
if ({{paramName}}) {
keyHeader_{{{paramName}}} = strdup("{{{paramName}}}");
keyHeader_{{{paramName}}} = strdup("{{{baseName}}}");
valueHeader_{{{paramName}}} = {{#isString}}{{^isEnum}}strdup({{/isEnum}}{{/isString}}({{{paramName}}}){{#isString}}{{^isEnum}}){{/isEnum}}{{/isString}};
keyPairHeader_{{paramName}} = keyValuePair_create(keyHeader_{{{paramName}}}, {{#isEnum}}(void *){{/isEnum}}{{^isString}}&{{/isString}}valueHeader_{{{paramName}}});
list_addElement(localVarHeaderParameters,keyPairHeader_{{paramName}});
Expand Down Expand Up @@ -164,13 +164,13 @@
if ({{paramName}} != NULL)
{
{{#isFile}}
keyForm_{{paramName}} = strdup("{{{paramName}}}");
keyForm_{{paramName}} = strdup("{{{baseName}}}");
valueForm_{{paramName}} = {{paramName}};
keyPairForm_{{paramName}} = keyValuePair_create(keyForm_{{paramName}}, &valueForm_{{paramName}});
list_addElement(localVarFormParameters,keyPairForm_{{paramName}}); //file adding
{{/isFile}}
{{^isFile}}
keyForm_{{paramName}} = strdup("{{{paramName}}}");
keyForm_{{paramName}} = strdup("{{{baseName}}}");
valueForm_{{paramName}} = {{#isString}}{{^isEnum}}strdup({{/isEnum}}{{/isString}}({{{paramName}}}){{#isString}}{{^isEnum}}){{/isEnum}}{{/isString}};
keyPairForm_{{paramName}} = keyValuePair_create(keyForm_{{paramName}},{{#isString}}{{#isEnum}}(void *){{/isEnum}}{{/isString}}{{^isString}}&{{/isString}}valueForm_{{paramName}});
list_addElement(localVarFormParameters,keyPairForm_{{paramName}});
Expand Down

0 comments on commit 10d5d27

Please sign in to comment.