Skip to content

Commit

Permalink
[R][Client] fix brackets for httr2 file_params (OpenAPITools#18142)
Browse files Browse the repository at this point in the history
* fix brackets for httr2 file_params

* added additional braces to baseName of httr2 file_params
  • Loading branch information
joXemMx authored and zapodot committed Mar 21, 2024
1 parent 4537c49 commit b63a1a7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@
file_params["{{baseName}}"] <- httr::upload_file(`{{paramName}}`)
{{/isHttr2}}
{{#isHttr2}}
file_params["{{baseName}}"] <- curl::form_file(`{{paramName}}`)
file_params[["{{{baseName}}}"]] <- curl::form_file(`{{paramName}}`)
{{/isHttr2}}
{{/isFile}}
{{/formParams}}
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/R-httr2-wrapper/R/pet_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,7 @@ PetApi <- R6::R6Class(


form_params["additionalMetadata"] <- `additional_metadata`
file_params["file"] <- curl::form_file(`file`)
file_params[["file"]] <- curl::form_file(`file`)
local_var_url_path <- "/pet/{petId}/uploadImage"
if (!missing(`pet_id`)) {
local_var_url_path <- gsub("\\{petId\\}", URLencode(as.character(`pet_id`), reserved = TRUE), local_var_url_path)
Expand Down
2 changes: 1 addition & 1 deletion samples/client/petstore/R-httr2/R/pet_api.R
Original file line number Diff line number Diff line change
Expand Up @@ -1807,7 +1807,7 @@ PetApi <- R6::R6Class(


form_params["additionalMetadata"] <- `additional_metadata`
file_params["file"] <- curl::form_file(`file`)
file_params[["file"]] <- curl::form_file(`file`)
local_var_url_path <- "/pet/{petId}/uploadImage"
if (!missing(`pet_id`)) {
local_var_url_path <- gsub("\\{petId\\}", URLencode(as.character(`pet_id`), reserved = TRUE), local_var_url_path)
Expand Down

0 comments on commit b63a1a7

Please sign in to comment.