Fix (partially) #4898 for flash (#5022)

* Fix (partially) #4898 for flash.

This fixes path, query and header parameters.

* Update samples for flash (after partial fix for #4898).
This commit is contained in:
Paŭlo Ebermann 2017-03-12 09:53:18 +01:00 committed by wing328
parent a201b01adc
commit 16adc7b373
2 changed files with 4 additions and 4 deletions

View File

@ -36,7 +36,7 @@ public class {{classname}} extends SwaggerApi {
*/
public function {{nickname}} ({{#allParams}}{{paramName}}: {{{dataType}}}{{#hasMore}}, {{/hasMore}}{{/allParams}}): String {
// create path and map variables
var path: String = "{{path}}".replace(/{format}/g,"xml"){{#pathParams}}.replace("{" + "{{paramName}}" + "}", getApiInvoker().escapeString({{{paramName}}})){{/pathParams}};
var path: String = "{{path}}".replace(/{format}/g,"xml"){{#pathParams}}.replace("{" + "{{baseName}}" + "}", getApiInvoker().escapeString({{{paramName}}})){{/pathParams}};
// query params
var queryParams: Dictionary = new Dictionary();
@ -50,10 +50,10 @@ public class {{classname}} extends SwaggerApi {
{{/allParams}}
{{#queryParams}}if("null" != String({{paramName}}))
queryParams["{{paramName}}"] = toPathValue({{paramName}});
queryParams["{{baseName}}"] = toPathValue({{paramName}});
{{/queryParams}}
{{#headerParams}}headerParams["{{paramName}}"] = toPathValue({{paramName}});
{{#headerParams}}headerParams["{{baseName}}"] = toPathValue({{paramName}});
{{/headerParams}}
var token:AsyncToken = getApiInvoker().invokeAPI(path, "{{httpMethod}}", queryParams, {{#bodyParam}}{{paramName}}{{/bodyParam}}{{^bodyParam}}null{{/bodyParam}}, headerParams);

View File

@ -86,7 +86,7 @@ public class PetApi extends SwaggerApi {
}
headerParams["apiKey"] = toPathValue(apiKey);
headerParams["api_key"] = toPathValue(apiKey);
var token:AsyncToken = getApiInvoker().invokeAPI(path, "DELETE", queryParams, null, headerParams);