mirror of
https://github.com/MingweiSamuel/Riven.git
synced 2024-12-26 19:06:32 +00:00
Fix handling of names for 'type' arg
This commit is contained in:
parent
c813228603
commit
c38afa7753
2 changed files with 2 additions and 2 deletions
|
@ -102,7 +102,7 @@ function formatJsonProperty(name) {
|
|||
|
||||
function formatAddQueryParam(param) {
|
||||
const k = `"${param.name}"`;
|
||||
const name = changeCase.snakeCase(param.name);
|
||||
const name = normalizePropName(param.name);
|
||||
const condStart = param.required ? '' : `mut request = request; if let Some(${name}) = ${name} { `;
|
||||
const condEnd = param.required ? '' : ' }'
|
||||
const prop = param.schema;
|
||||
|
|
|
@ -137,7 +137,7 @@ impl<'a> {{= endpoint }}<'a> {
|
|||
const required = paramList === pathParams;
|
||||
for (const param of paramList)
|
||||
{
|
||||
argBuilder.push(', ', dotUtils.changeCase.snakeCase(param.name), ': ',
|
||||
argBuilder.push(', ', dotUtils.normalizePropName(param.name), ': ',
|
||||
dotUtils.stringifyType(param.schema, { endpoint, optional: !(required || param.required), owned: false }));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue