forked from loafle/openapi-generator-original
* 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:
parent
a201b01adc
commit
16adc7b373
@ -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);
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user