Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions modules/swagger-codegen/src/main/resources/flash/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down