mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-06-29 04:00:51 +00:00
[typescript-axios]: handle explode query (#16435)
* [typescript-axios]: handle explode query * [typescript-axios]: handle explode query based on isPrimitive * Use `of` instead of `for...in` * Update modules/openapi-generator/src/main/resources/typescript-axios/apiInner.mustache --------- Co-authored-by: nightspite <n16h75p173@gmail.com> Co-authored-by: Esteban Gehring <esteban.gehring@gmail.com>
This commit is contained in:
parent
55c580579e
commit
a68eba649f
@ -127,7 +127,19 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
|
||||
{{paramName}};
|
||||
{{/isDate}}
|
||||
{{^isDate}}
|
||||
{{#isExplode}}
|
||||
{{#isPrimitiveType}}
|
||||
localVarQueryParameter['{{baseName}}'] = {{paramName}};
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
for (let param of Object.keys({{baseName}})) {
|
||||
localVarQueryParameter[param] = {{baseName}}?.[param];
|
||||
}
|
||||
{{/isPrimitiveType}}
|
||||
{{/isExplode}}
|
||||
{{^isExplode}}
|
||||
localVarQueryParameter['{{baseName}}'] = {{paramName}};
|
||||
{{/isExplode}}
|
||||
{{/isDate}}
|
||||
{{/isDateTime}}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user