mirror of
https://github.com/jlengrand/openapi-generator.git
synced 2026-05-16 08:31:26 +00:00
fixed ordering
This commit is contained in:
@@ -22,20 +22,11 @@ void
|
||||
QString fullPath;
|
||||
fullPath.append(this->host).append(this->basePath).append("{{path}}");
|
||||
|
||||
HttpRequestWorker *worker = new HttpRequestWorker();
|
||||
HttpRequestInput input(fullPath, "{{httpMethod}}");
|
||||
|
||||
{{#pathParams}}
|
||||
QString {{paramName}}PathParam("{"); {{paramName}}PathParam.append("{{paramName}}").append("}");
|
||||
fullPath.replace({{paramName}}PathParam, stringValue({{paramName}}));
|
||||
{{/pathParams}}
|
||||
|
||||
{{#formParams}}{{^isFile}}
|
||||
if({{paramName}} != NULL) {
|
||||
input.add_var("{{paramName}}", *{{paramName}});
|
||||
}
|
||||
{{/isFile}}{{/formParams}}
|
||||
|
||||
{{#queryParams}}
|
||||
{{^collectionFormat}}
|
||||
if(fullPath.indexOf("?") > 0)
|
||||
@@ -91,6 +82,16 @@ void
|
||||
|
||||
{{/collectionFormat}}
|
||||
{{/queryParams}}
|
||||
|
||||
HttpRequestWorker *worker = new HttpRequestWorker();
|
||||
HttpRequestInput input(fullPath, "{{httpMethod}}");
|
||||
|
||||
{{#formParams}}{{^isFile}}
|
||||
if({{paramName}} != NULL) {
|
||||
input.add_var("{{paramName}}", *{{paramName}});
|
||||
}
|
||||
{{/isFile}}{{/formParams}}
|
||||
|
||||
{{#bodyParams}}
|
||||
{{#isContainer}}
|
||||
QJsonArray* {{paramName}}Array = new QJsonArray();
|
||||
@@ -104,7 +105,6 @@ void
|
||||
{{^isContainer}}
|
||||
QString output = {{paramName}}.asJson();
|
||||
input.request_body.append(output);
|
||||
|
||||
{{/isContainer}}{{/bodyParams}}
|
||||
|
||||
{{#headerParams}}
|
||||
|
||||
Reference in New Issue
Block a user