mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 11:23:58 +00:00
Use baseName instead of paramName when generating APIs
This commit is contained in:
parent
336d80cbf3
commit
785136e991
@ -76,9 +76,9 @@ public class {{classname}}: APIBase {
|
|||||||
{{#bodyParam}}
|
{{#bodyParam}}
|
||||||
let parameters = {{paramName}}{{^required}}?{{/required}}.encodeToJSON() as? [String:AnyObject]{{/bodyParam}}{{^bodyParam}}
|
let parameters = {{paramName}}{{^required}}?{{/required}}.encodeToJSON() as? [String:AnyObject]{{/bodyParam}}{{^bodyParam}}
|
||||||
let nillableParameters: [String:AnyObject?] = {{^queryParams}}{{^formParams}}[:]{{/formParams}}{{#formParams}}{{^secondaryParam}}[{{/secondaryParam}}
|
let nillableParameters: [String:AnyObject?] = {{^queryParams}}{{^formParams}}[:]{{/formParams}}{{#formParams}}{{^secondaryParam}}[{{/secondaryParam}}
|
||||||
"{{paramName}}": {{paramName}}{{#hasMore}},{{/hasMore}}{{^hasMore}}
|
"{{baseName}}": {{paramName}}{{#hasMore}},{{/hasMore}}{{^hasMore}}
|
||||||
]{{/hasMore}}{{/formParams}}{{/queryParams}}{{#queryParams}}{{^secondaryParam}}[{{/secondaryParam}}
|
]{{/hasMore}}{{/formParams}}{{/queryParams}}{{#queryParams}}{{^secondaryParam}}[{{/secondaryParam}}
|
||||||
"{{paramName}}": {{paramName}}{{#hasMore}},{{/hasMore}}{{^hasMore}}
|
"{{baseName}}": {{paramName}}{{#hasMore}},{{/hasMore}}{{^hasMore}}
|
||||||
]{{/hasMore}}{{/queryParams}}
|
]{{/hasMore}}{{/queryParams}}
|
||||||
let parameters = APIHelper.rejectNil(nillableParameters){{/bodyParam}}
|
let parameters = APIHelper.rejectNil(nillableParameters){{/bodyParam}}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user