diff --git a/modules/swagger-codegen/src/main/resources/flash/api.mustache b/modules/swagger-codegen/src/main/resources/flash/api.mustache index b1312a339d4..439eaed1629 100644 --- a/modules/swagger-codegen/src/main/resources/flash/api.mustache +++ b/modules/swagger-codegen/src/main/resources/flash/api.mustache @@ -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); diff --git a/samples/client/petstore/flash/flash/src/io/swagger/client/api/PetApi.as b/samples/client/petstore/flash/flash/src/io/swagger/client/api/PetApi.as index 34b1b7a395d..55c861c7e59 100644 --- a/samples/client/petstore/flash/flash/src/io/swagger/client/api/PetApi.as +++ b/samples/client/petstore/flash/flash/src/io/swagger/client/api/PetApi.as @@ -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);