Skip to content

Commit

Permalink
Fix 7511: [Ada] Client call is not correct with multiple parameters a…
Browse files Browse the repository at this point in the history
…nd application/x-www-urlencoded (#7512)

* Fix calling the 'Call' procedure to submit the request for the Ada client when a request
has form parameters

* Rebuild the files by running bin/ada-petstore.sh
  • Loading branch information
stcarrez authored and wing328 committed Jan 28, 2018
1 parent 3035bc6 commit 4bd8fc6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ package body {{package}}.Clients is
URI.Add_Param ("{{baseName}}", {{paramName}});{{/isDateTime}}{{/isQueryParam}}{{/queryParams}}
URI.Set_Path ("{{path}}");{{#pathParams}}
URI.Set_Path_Param ("{{baseName}}", {{^isString}}Swagger.To_String ({{/isString}}{{paramName}}{{^isString}}){{/isString}});{{/pathParams}}
Client.Call (Swagger.Clients.{{httpMethod}}, URI{{#hasBodyParam}}, Req{{/hasBodyParam}}{{#returnType}}, Reply{{/returnType}});{{#returnType}}{{#vendorExtensions.x-codegen-response.isString}}
Client.Call (Swagger.Clients.{{httpMethod}}, URI{{#hasBodyParam}}, Req{{/hasBodyParam}}{{#hasFormParams}}, Req{{/hasFormParams}}{{#returnType}}, Reply{{/returnType}});{{#returnType}}{{#vendorExtensions.x-codegen-response.isString}}
Swagger.Streams.Deserialize (Reply, "", Result);{{/vendorExtensions.x-codegen-response.isString}}{{^vendorExtensions.x-codegen-response.isString}}{{#returnTypeIsPrimitive}}
Swagger.Streams.Deserialize (Reply, "", Result);{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}
{{package}}.Models.Deserialize (Reply, "", Result);{{/returnTypeIsPrimitive}}{{/vendorExtensions.x-codegen-response.isString}}{{/returnType}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ package body Samples.Petstore.Clients is

URI.Set_Path ("/pet/{petId}");
URI.Set_Path_Param ("petId", Swagger.To_String (Pet_Id));
Client.Call (Swagger.Clients.POST, URI);
Client.Call (Swagger.Clients.POST, URI, Req);
end Update_Pet_With_Form;

-- uploads an image
Expand All @@ -151,7 +151,7 @@ package body Samples.Petstore.Clients is

URI.Set_Path ("/pet/{petId}/uploadImage");
URI.Set_Path_Param ("petId", Swagger.To_String (Pet_Id));
Client.Call (Swagger.Clients.POST, URI, Reply);
Client.Call (Swagger.Clients.POST, URI, Req, Reply);
Samples.Petstore.Models.Deserialize (Reply, "", Result);
end Upload_File;

Expand Down

0 comments on commit 4bd8fc6

Please sign in to comment.