From 14925f464862344a00f5d3d1b8483c17c6d674ba Mon Sep 17 00:00:00 2001 From: Matthew Pollock Date: Thu, 15 Jan 2026 12:09:44 -0500 Subject: [PATCH 1/5] optionally skip parsing responses to R6 objects --- .../src/main/resources/r/api.mustache | 12 +- samples/client/echo_api/r/R/auth_api.R | 24 +++- samples/client/echo_api/r/R/body_api.R | 120 ++++++++++++---- samples/client/echo_api/r/R/form_api.R | 36 +++-- samples/client/echo_api/r/R/header_api.R | 12 +- samples/client/echo_api/r/R/path_api.R | 12 +- samples/client/echo_api/r/R/query_api.R | 132 +++++++++++++----- .../petstore/R-httr2-wrapper/R/fake_api.R | 39 ++++-- .../petstore/R-httr2-wrapper/R/pet_api.R | 106 ++++++++++---- .../petstore/R-httr2-wrapper/R/store_api.R | 41 ++++-- .../petstore/R-httr2-wrapper/R/user_api.R | 54 ++++--- samples/client/petstore/R-httr2/R/fake_api.R | 39 ++++-- samples/client/petstore/R-httr2/R/pet_api.R | 106 ++++++++++---- samples/client/petstore/R-httr2/R/store_api.R | 41 ++++-- samples/client/petstore/R-httr2/R/user_api.R | 54 ++++--- samples/client/petstore/R/R/fake_api.R | 39 ++++-- samples/client/petstore/R/R/pet_api.R | 106 ++++++++++---- samples/client/petstore/R/R/store_api.R | 41 ++++-- samples/client/petstore/R/R/user_api.R | 54 ++++--- 19 files changed, 774 insertions(+), 294 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/r/api.mustache b/modules/openapi-generator/src/main/resources/r/api.mustache index 1297561f3973..588e6e77e185 100644 --- a/modules/openapi-generator/src/main/resources/r/api.mustache +++ b/modules/openapi-generator/src/main/resources/r/api.mustache @@ -142,10 +142,11 @@ #' @param data_file (optional) name of the data file to save the result {{/returnType}} #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return {{{returnType}}}{{^returnType}}void{{/returnType}} - {{{operationId}}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}} = {{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}{{#vendorExtensions.x-streaming}}stream_callback = NULL, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = NULL, {{/returnType}}...) { - local_var_response <- self${{{operationId}}}{{WithHttpInfo}}({{#allParams}}{{paramName}}, {{/allParams}}{{#vendorExtensions.x-streaming}}stream_callback = stream_callback, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = data_file, {{/returnType}}...) + {{{operationId}}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}} = {{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}{{#vendorExtensions.x-streaming}}stream_callback = NULL, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = NULL, {{/returnType}}..., parse = TRUE) { + local_var_response <- self${{{operationId}}}{{WithHttpInfo}}({{#allParams}}{{paramName}}, {{/allParams}}{{#vendorExtensions.x-streaming}}stream_callback = stream_callback, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = data_file, {{/returnType}}..., parse = parse) {{#vendorExtensions.x-streaming}} if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) @@ -181,7 +182,7 @@ #' @param ... Other optional arguments #' #' @return API response ({{{returnType}}}{{^returnType}}void{{/returnType}}) with additional information such as HTTP status code, headers - {{{operationId}}}{{WithHttpInfo}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}} = {{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}{{#vendorExtensions.x-streaming}}stream_callback = NULL, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = NULL, {{/returnType}}...) { + {{{operationId}}}{{WithHttpInfo}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}} = {{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}{{#vendorExtensions.x-streaming}}stream_callback = NULL, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = NULL, parse = TRUE, {{/returnType}}...) { args <- list(...) query_params <- list() header_params <- c() @@ -569,6 +570,11 @@ self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "{{returnType}}"), error = function(e) { diff --git a/samples/client/echo_api/r/R/auth_api.R b/samples/client/echo_api/r/R/auth_api.R index 8b2999b3758e..ade3f510f758 100644 --- a/samples/client/echo_api/r/R/auth_api.R +++ b/samples/client/echo_api/r/R/auth_api.R @@ -73,10 +73,11 @@ AuthApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestAuthHttpBasic = function(data_file = NULL, ...) { - local_var_response <- self$TestAuthHttpBasicWithHttpInfo(data_file = data_file, ...) + TestAuthHttpBasic = function(data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestAuthHttpBasicWithHttpInfo(data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -95,7 +96,7 @@ AuthApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestAuthHttpBasicWithHttpInfo = function(data_file = NULL, ...) { + TestAuthHttpBasicWithHttpInfo = function(data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -136,6 +137,11 @@ AuthApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -164,10 +170,11 @@ AuthApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestAuthHttpBearer = function(data_file = NULL, ...) { - local_var_response <- self$TestAuthHttpBearerWithHttpInfo(data_file = data_file, ...) + TestAuthHttpBearer = function(data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestAuthHttpBearerWithHttpInfo(data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -186,7 +193,7 @@ AuthApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestAuthHttpBearerWithHttpInfo = function(data_file = NULL, ...) { + TestAuthHttpBearerWithHttpInfo = function(data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -227,6 +234,11 @@ AuthApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { diff --git a/samples/client/echo_api/r/R/body_api.R b/samples/client/echo_api/r/R/body_api.R index e9213e0dc94f..c22cda7be2e4 100644 --- a/samples/client/echo_api/r/R/body_api.R +++ b/samples/client/echo_api/r/R/body_api.R @@ -179,10 +179,11 @@ BodyApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return data.frame - TestBinaryGif = function(data_file = NULL, ...) { - local_var_response <- self$TestBinaryGifWithHttpInfo(data_file = data_file, ...) + TestBinaryGif = function(data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestBinaryGifWithHttpInfo(data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -201,7 +202,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (data.frame) with additional information such as HTTP status code, headers - TestBinaryGifWithHttpInfo = function(data_file = NULL, ...) { + TestBinaryGifWithHttpInfo = function(data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -238,6 +239,11 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "data.frame"), error = function(e) { @@ -267,10 +273,11 @@ BodyApi <- R6::R6Class( #' @param body (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestBodyApplicationOctetstreamBinary = function(body = NULL, data_file = NULL, ...) { - local_var_response <- self$TestBodyApplicationOctetstreamBinaryWithHttpInfo(body, data_file = data_file, ...) + TestBodyApplicationOctetstreamBinary = function(body = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestBodyApplicationOctetstreamBinaryWithHttpInfo(body, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -290,7 +297,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestBodyApplicationOctetstreamBinaryWithHttpInfo = function(body = NULL, data_file = NULL, ...) { + TestBodyApplicationOctetstreamBinaryWithHttpInfo = function(body = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -337,6 +344,11 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -366,10 +378,11 @@ BodyApi <- R6::R6Class( #' @param files #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestBodyMultipartFormdataArrayOfBinary = function(files, data_file = NULL, ...) { - local_var_response <- self$TestBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files, data_file = data_file, ...) + TestBodyMultipartFormdataArrayOfBinary = function(files, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -389,7 +402,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestBodyMultipartFormdataArrayOfBinaryWithHttpInfo = function(files, data_file = NULL, ...) { + TestBodyMultipartFormdataArrayOfBinaryWithHttpInfo = function(files, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -435,6 +448,11 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -464,10 +482,11 @@ BodyApi <- R6::R6Class( #' @param my_file (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestBodyMultipartFormdataSingleBinary = function(my_file = NULL, data_file = NULL, ...) { - local_var_response <- self$TestBodyMultipartFormdataSingleBinaryWithHttpInfo(my_file, data_file = data_file, ...) + TestBodyMultipartFormdataSingleBinary = function(my_file = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestBodyMultipartFormdataSingleBinaryWithHttpInfo(my_file, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -487,7 +506,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestBodyMultipartFormdataSingleBinaryWithHttpInfo = function(my_file = NULL, data_file = NULL, ...) { + TestBodyMultipartFormdataSingleBinaryWithHttpInfo = function(my_file = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -529,6 +548,11 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -558,10 +582,11 @@ BodyApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - TestEchoBodyAllOfPet = function(pet = NULL, data_file = NULL, ...) { - local_var_response <- self$TestEchoBodyAllOfPetWithHttpInfo(pet, data_file = data_file, ...) + TestEchoBodyAllOfPet = function(pet = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestEchoBodyAllOfPetWithHttpInfo(pet, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -581,7 +606,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - TestEchoBodyAllOfPetWithHttpInfo = function(pet = NULL, data_file = NULL, ...) { + TestEchoBodyAllOfPetWithHttpInfo = function(pet = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -628,6 +653,11 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -657,10 +687,11 @@ BodyApi <- R6::R6Class( #' @param body (optional) Free form object #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestEchoBodyFreeFormObjectResponseString = function(body = NULL, data_file = NULL, ...) { - local_var_response <- self$TestEchoBodyFreeFormObjectResponseStringWithHttpInfo(body, data_file = data_file, ...) + TestEchoBodyFreeFormObjectResponseString = function(body = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestEchoBodyFreeFormObjectResponseStringWithHttpInfo(body, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -680,7 +711,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestEchoBodyFreeFormObjectResponseStringWithHttpInfo = function(body = NULL, data_file = NULL, ...) { + TestEchoBodyFreeFormObjectResponseStringWithHttpInfo = function(body = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -727,6 +758,11 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -756,10 +792,11 @@ BodyApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - TestEchoBodyPet = function(pet = NULL, data_file = NULL, ...) { - local_var_response <- self$TestEchoBodyPetWithHttpInfo(pet, data_file = data_file, ...) + TestEchoBodyPet = function(pet = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestEchoBodyPetWithHttpInfo(pet, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -779,7 +816,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - TestEchoBodyPetWithHttpInfo = function(pet = NULL, data_file = NULL, ...) { + TestEchoBodyPetWithHttpInfo = function(pet = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -826,6 +863,11 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -855,10 +897,11 @@ BodyApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestEchoBodyPetResponseString = function(pet = NULL, data_file = NULL, ...) { - local_var_response <- self$TestEchoBodyPetResponseStringWithHttpInfo(pet, data_file = data_file, ...) + TestEchoBodyPetResponseString = function(pet = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestEchoBodyPetResponseStringWithHttpInfo(pet, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -878,7 +921,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestEchoBodyPetResponseStringWithHttpInfo = function(pet = NULL, data_file = NULL, ...) { + TestEchoBodyPetResponseStringWithHttpInfo = function(pet = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -925,6 +968,11 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -954,10 +1002,11 @@ BodyApi <- R6::R6Class( #' @param body (optional) String enum #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return StringEnumRef - TestEchoBodyStringEnum = function(body = NULL, data_file = NULL, ...) { - local_var_response <- self$TestEchoBodyStringEnumWithHttpInfo(body, data_file = data_file, ...) + TestEchoBodyStringEnum = function(body = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestEchoBodyStringEnumWithHttpInfo(body, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -977,7 +1026,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (StringEnumRef) with additional information such as HTTP status code, headers - TestEchoBodyStringEnumWithHttpInfo = function(body = NULL, data_file = NULL, ...) { + TestEchoBodyStringEnumWithHttpInfo = function(body = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1024,6 +1073,11 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "StringEnumRef"), error = function(e) { @@ -1053,10 +1107,11 @@ BodyApi <- R6::R6Class( #' @param tag (optional) Tag object #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestEchoBodyTagResponseString = function(tag = NULL, data_file = NULL, ...) { - local_var_response <- self$TestEchoBodyTagResponseStringWithHttpInfo(tag, data_file = data_file, ...) + TestEchoBodyTagResponseString = function(tag = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestEchoBodyTagResponseStringWithHttpInfo(tag, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1076,7 +1131,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestEchoBodyTagResponseStringWithHttpInfo = function(tag = NULL, data_file = NULL, ...) { + TestEchoBodyTagResponseStringWithHttpInfo = function(tag = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1123,6 +1178,11 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { diff --git a/samples/client/echo_api/r/R/form_api.R b/samples/client/echo_api/r/R/form_api.R index 1278ba0b2ade..d7bca95ba4a7 100644 --- a/samples/client/echo_api/r/R/form_api.R +++ b/samples/client/echo_api/r/R/form_api.R @@ -92,10 +92,11 @@ FormApi <- R6::R6Class( #' @param string_form (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestFormIntegerBooleanString = function(integer_form = NULL, boolean_form = NULL, string_form = NULL, data_file = NULL, ...) { - local_var_response <- self$TestFormIntegerBooleanStringWithHttpInfo(integer_form, boolean_form, string_form, data_file = data_file, ...) + TestFormIntegerBooleanString = function(integer_form = NULL, boolean_form = NULL, string_form = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestFormIntegerBooleanStringWithHttpInfo(integer_form, boolean_form, string_form, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -117,7 +118,7 @@ FormApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestFormIntegerBooleanStringWithHttpInfo = function(integer_form = NULL, boolean_form = NULL, string_form = NULL, data_file = NULL, ...) { + TestFormIntegerBooleanStringWithHttpInfo = function(integer_form = NULL, boolean_form = NULL, string_form = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -169,6 +170,11 @@ FormApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -198,10 +204,11 @@ FormApi <- R6::R6Class( #' @param marker #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestFormObjectMultipart = function(marker, data_file = NULL, ...) { - local_var_response <- self$TestFormObjectMultipartWithHttpInfo(marker, data_file = data_file, ...) + TestFormObjectMultipart = function(marker, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestFormObjectMultipartWithHttpInfo(marker, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -221,7 +228,7 @@ FormApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestFormObjectMultipartWithHttpInfo = function(marker, data_file = NULL, ...) { + TestFormObjectMultipartWithHttpInfo = function(marker, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -267,6 +274,11 @@ FormApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -301,10 +313,11 @@ FormApi <- R6::R6Class( #' @param name (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestFormOneof = function(form1 = NULL, form2 = NULL, form3 = NULL, form4 = NULL, id = NULL, name = NULL, data_file = NULL, ...) { - local_var_response <- self$TestFormOneofWithHttpInfo(form1, form2, form3, form4, id, name, data_file = data_file, ...) + TestFormOneof = function(form1 = NULL, form2 = NULL, form3 = NULL, form4 = NULL, id = NULL, name = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestFormOneofWithHttpInfo(form1, form2, form3, form4, id, name, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -329,7 +342,7 @@ FormApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestFormOneofWithHttpInfo = function(form1 = NULL, form2 = NULL, form3 = NULL, form4 = NULL, id = NULL, name = NULL, data_file = NULL, ...) { + TestFormOneofWithHttpInfo = function(form1 = NULL, form2 = NULL, form3 = NULL, form4 = NULL, id = NULL, name = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -396,6 +409,11 @@ FormApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { diff --git a/samples/client/echo_api/r/R/header_api.R b/samples/client/echo_api/r/R/header_api.R index 21280ce6b645..9ee96a46a6c5 100644 --- a/samples/client/echo_api/r/R/header_api.R +++ b/samples/client/echo_api/r/R/header_api.R @@ -63,10 +63,11 @@ HeaderApi <- R6::R6Class( #' @param enum_ref_string_header (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestHeaderIntegerBooleanStringEnums = function(integer_header = NULL, boolean_header = NULL, string_header = NULL, enum_nonref_string_header = NULL, enum_ref_string_header = NULL, data_file = NULL, ...) { - local_var_response <- self$TestHeaderIntegerBooleanStringEnumsWithHttpInfo(integer_header, boolean_header, string_header, enum_nonref_string_header, enum_ref_string_header, data_file = data_file, ...) + TestHeaderIntegerBooleanStringEnums = function(integer_header = NULL, boolean_header = NULL, string_header = NULL, enum_nonref_string_header = NULL, enum_ref_string_header = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestHeaderIntegerBooleanStringEnumsWithHttpInfo(integer_header, boolean_header, string_header, enum_nonref_string_header, enum_ref_string_header, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -90,7 +91,7 @@ HeaderApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestHeaderIntegerBooleanStringEnumsWithHttpInfo = function(integer_header = NULL, boolean_header = NULL, string_header = NULL, enum_nonref_string_header = NULL, enum_ref_string_header = NULL, data_file = NULL, ...) { + TestHeaderIntegerBooleanStringEnumsWithHttpInfo = function(integer_header = NULL, boolean_header = NULL, string_header = NULL, enum_nonref_string_header = NULL, enum_ref_string_header = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -157,6 +158,11 @@ HeaderApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { diff --git a/samples/client/echo_api/r/R/path_api.R b/samples/client/echo_api/r/R/path_api.R index afe0a36107d0..0ed8956b54e3 100644 --- a/samples/client/echo_api/r/R/path_api.R +++ b/samples/client/echo_api/r/R/path_api.R @@ -61,10 +61,11 @@ PathApi <- R6::R6Class( #' @param enum_ref_string_path #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath = function(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, data_file = NULL, ...) { - local_var_response <- self$TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, data_file = data_file, ...) + TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath = function(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -87,7 +88,7 @@ PathApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo = function(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, data_file = NULL, ...) { + TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo = function(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -172,6 +173,11 @@ PathApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { diff --git a/samples/client/echo_api/r/R/query_api.R b/samples/client/echo_api/r/R/query_api.R index 7afbf45a2908..b6d0ecbc05d4 100644 --- a/samples/client/echo_api/r/R/query_api.R +++ b/samples/client/echo_api/r/R/query_api.R @@ -202,10 +202,11 @@ QueryApi <- R6::R6Class( #' @param enum_ref_string_query (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestEnumRefString = function(enum_nonref_string_query = NULL, enum_ref_string_query = NULL, data_file = NULL, ...) { - local_var_response <- self$TestEnumRefStringWithHttpInfo(enum_nonref_string_query, enum_ref_string_query, data_file = data_file, ...) + TestEnumRefString = function(enum_nonref_string_query = NULL, enum_ref_string_query = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestEnumRefStringWithHttpInfo(enum_nonref_string_query, enum_ref_string_query, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -226,7 +227,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestEnumRefStringWithHttpInfo = function(enum_nonref_string_query = NULL, enum_ref_string_query = NULL, data_file = NULL, ...) { + TestEnumRefStringWithHttpInfo = function(enum_nonref_string_query = NULL, enum_ref_string_query = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -278,6 +279,11 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -309,10 +315,11 @@ QueryApi <- R6::R6Class( #' @param string_query (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryDatetimeDateString = function(datetime_query = NULL, date_query = NULL, string_query = NULL, data_file = NULL, ...) { - local_var_response <- self$TestQueryDatetimeDateStringWithHttpInfo(datetime_query, date_query, string_query, data_file = data_file, ...) + TestQueryDatetimeDateString = function(datetime_query = NULL, date_query = NULL, string_query = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestQueryDatetimeDateStringWithHttpInfo(datetime_query, date_query, string_query, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -334,7 +341,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryDatetimeDateStringWithHttpInfo = function(datetime_query = NULL, date_query = NULL, string_query = NULL, data_file = NULL, ...) { + TestQueryDatetimeDateStringWithHttpInfo = function(datetime_query = NULL, date_query = NULL, string_query = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -389,6 +396,11 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -420,10 +432,11 @@ QueryApi <- R6::R6Class( #' @param string_query (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryIntegerBooleanString = function(integer_query = NULL, boolean_query = NULL, string_query = NULL, data_file = NULL, ...) { - local_var_response <- self$TestQueryIntegerBooleanStringWithHttpInfo(integer_query, boolean_query, string_query, data_file = data_file, ...) + TestQueryIntegerBooleanString = function(integer_query = NULL, boolean_query = NULL, string_query = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestQueryIntegerBooleanStringWithHttpInfo(integer_query, boolean_query, string_query, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -445,7 +458,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryIntegerBooleanStringWithHttpInfo = function(integer_query = NULL, boolean_query = NULL, string_query = NULL, data_file = NULL, ...) { + TestQueryIntegerBooleanStringWithHttpInfo = function(integer_query = NULL, boolean_query = NULL, string_query = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -500,6 +513,11 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -529,10 +547,11 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleDeepObjectExplodeTrueObject = function(query_object = NULL, data_file = NULL, ...) { - local_var_response <- self$TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(query_object, data_file = data_file, ...) + TestQueryStyleDeepObjectExplodeTrueObject = function(query_object = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(query_object, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -552,7 +571,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo = function(query_object = NULL, data_file = NULL, ...) { + TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo = function(query_object = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -595,6 +614,11 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -624,10 +648,11 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleDeepObjectExplodeTrueObjectAllOf = function(query_object = NULL, data_file = NULL, ...) { - local_var_response <- self$TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(query_object, data_file = data_file, ...) + TestQueryStyleDeepObjectExplodeTrueObjectAllOf = function(query_object = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(query_object, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -647,7 +672,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo = function(query_object = NULL, data_file = NULL, ...) { + TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo = function(query_object = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -690,6 +715,11 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -719,10 +749,11 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleFormExplodeFalseArrayInteger = function(query_object = NULL, data_file = NULL, ...) { - local_var_response <- self$TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(query_object, data_file = data_file, ...) + TestQueryStyleFormExplodeFalseArrayInteger = function(query_object = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(query_object, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -742,7 +773,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo = function(query_object = NULL, data_file = NULL, ...) { + TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo = function(query_object = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -786,6 +817,11 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -815,10 +851,11 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleFormExplodeFalseArrayString = function(query_object = NULL, data_file = NULL, ...) { - local_var_response <- self$TestQueryStyleFormExplodeFalseArrayStringWithHttpInfo(query_object, data_file = data_file, ...) + TestQueryStyleFormExplodeFalseArrayString = function(query_object = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestQueryStyleFormExplodeFalseArrayStringWithHttpInfo(query_object, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -838,7 +875,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleFormExplodeFalseArrayStringWithHttpInfo = function(query_object = NULL, data_file = NULL, ...) { + TestQueryStyleFormExplodeFalseArrayStringWithHttpInfo = function(query_object = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -882,6 +919,11 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -911,10 +953,11 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleFormExplodeTrueArrayString = function(query_object = NULL, data_file = NULL, ...) { - local_var_response <- self$TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo(query_object, data_file = data_file, ...) + TestQueryStyleFormExplodeTrueArrayString = function(query_object = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo(query_object, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -934,7 +977,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo = function(query_object = NULL, data_file = NULL, ...) { + TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo = function(query_object = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -977,6 +1020,11 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -1006,10 +1054,11 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleFormExplodeTrueObject = function(query_object = NULL, data_file = NULL, ...) { - local_var_response <- self$TestQueryStyleFormExplodeTrueObjectWithHttpInfo(query_object, data_file = data_file, ...) + TestQueryStyleFormExplodeTrueObject = function(query_object = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestQueryStyleFormExplodeTrueObjectWithHttpInfo(query_object, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1029,7 +1078,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleFormExplodeTrueObjectWithHttpInfo = function(query_object = NULL, data_file = NULL, ...) { + TestQueryStyleFormExplodeTrueObjectWithHttpInfo = function(query_object = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1072,6 +1121,11 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -1101,10 +1155,11 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleFormExplodeTrueObjectAllOf = function(query_object = NULL, data_file = NULL, ...) { - local_var_response <- self$TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(query_object, data_file = data_file, ...) + TestQueryStyleFormExplodeTrueObjectAllOf = function(query_object = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(query_object, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1124,7 +1179,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo = function(query_object = NULL, data_file = NULL, ...) { + TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo = function(query_object = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1167,6 +1222,11 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -1197,10 +1257,11 @@ QueryApi <- R6::R6Class( #' @param json_serialized_object_array_ref_string_query (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleJsonSerializationObject = function(json_serialized_object_ref_string_query = NULL, json_serialized_object_array_ref_string_query = NULL, data_file = NULL, ...) { - local_var_response <- self$TestQueryStyleJsonSerializationObjectWithHttpInfo(json_serialized_object_ref_string_query, json_serialized_object_array_ref_string_query, data_file = data_file, ...) + TestQueryStyleJsonSerializationObject = function(json_serialized_object_ref_string_query = NULL, json_serialized_object_array_ref_string_query = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestQueryStyleJsonSerializationObjectWithHttpInfo(json_serialized_object_ref_string_query, json_serialized_object_array_ref_string_query, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1221,7 +1282,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleJsonSerializationObjectWithHttpInfo = function(json_serialized_object_ref_string_query = NULL, json_serialized_object_array_ref_string_query = NULL, data_file = NULL, ...) { + TestQueryStyleJsonSerializationObjectWithHttpInfo = function(json_serialized_object_ref_string_query = NULL, json_serialized_object_array_ref_string_query = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1271,6 +1332,11 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { diff --git a/samples/client/petstore/R-httr2-wrapper/R/fake_api.R b/samples/client/petstore/R-httr2-wrapper/R/fake_api.R index 9210f42424b2..9d5566d6a995 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/fake_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/fake_api.R @@ -188,10 +188,11 @@ FakeApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - add_pet_optional = function(pet = NULL, data_file = NULL, ...) { - local_var_response <- self$add_pet_optional_with_http_info(pet, data_file = data_file, ...) + add_pet_optional = function(pet = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$add_pet_optional_with_http_info(pet, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -211,7 +212,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - add_pet_optional_with_http_info = function(pet = NULL, data_file = NULL, ...) { + add_pet_optional_with_http_info = function(pet = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -265,6 +266,11 @@ FakeApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -310,10 +316,11 @@ FakeApi <- R6::R6Class( #' @param var_data_file (optional) header data file #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return User - fake_data_file = function(dummy, var_data_file = NULL, data_file = NULL, ...) { - local_var_response <- self$fake_data_file_with_http_info(dummy, var_data_file, data_file = data_file, ...) + fake_data_file = function(dummy, var_data_file = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$fake_data_file_with_http_info(dummy, var_data_file, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -334,7 +341,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (User) with additional information such as HTTP status code, headers - fake_data_file_with_http_info = function(dummy, var_data_file = NULL, data_file = NULL, ...) { + fake_data_file_with_http_info = function(dummy, var_data_file = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -396,6 +403,11 @@ FakeApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), error = function(e) { @@ -439,10 +451,11 @@ FakeApi <- R6::R6Class( #' #' @param path_array dummy path parameter #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_path_array = function(path_array, ...) { - local_var_response <- self$fake_path_array_with_http_info(path_array, ...) + fake_path_array = function(path_array, ..., parse = TRUE) { + local_var_response <- self$fake_path_array_with_http_info(path_array, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -546,10 +559,11 @@ FakeApi <- R6::R6Class( #' #' @param reg_exp_test dummy required parameter #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_regular_expression = function(reg_exp_test, ...) { - local_var_response <- self$fake_regular_expression_with_http_info(reg_exp_test, ...) + fake_regular_expression = function(reg_exp_test, ..., parse = TRUE) { + local_var_response <- self$fake_regular_expression_with_http_info(reg_exp_test, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -658,10 +672,11 @@ FakeApi <- R6::R6Class( #' @param set_dummy set query #' @param array_dummy array query #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_set_query = function(set_dummy, array_dummy, ...) { - local_var_response <- self$fake_set_query_with_http_info(set_dummy, array_dummy, ...) + fake_set_query = function(set_dummy, array_dummy, ..., parse = TRUE) { + local_var_response <- self$fake_set_query_with_http_info(set_dummy, array_dummy, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { diff --git a/samples/client/petstore/R-httr2-wrapper/R/pet_api.R b/samples/client/petstore/R-httr2-wrapper/R/pet_api.R index 83b4a7141c28..d8788ea2f4c7 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/pet_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/pet_api.R @@ -391,10 +391,11 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - add_pet = function(pet, data_file = NULL, ...) { - local_var_response <- self$add_pet_with_http_info(pet, data_file = data_file, ...) + add_pet = function(pet, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$add_pet_with_http_info(pet, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -414,7 +415,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - add_pet_with_http_info = function(pet, data_file = NULL, ...) { + add_pet_with_http_info = function(pet, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -475,6 +476,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -519,10 +525,11 @@ PetApi <- R6::R6Class( #' @param pet_id Pet id to delete #' @param api_key (optional) No description #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_pet = function(pet_id, api_key = NULL, ...) { - local_var_response <- self$delete_pet_with_http_info(pet_id, api_key, ...) + delete_pet = function(pet_id, api_key = NULL, ..., parse = TRUE) { + local_var_response <- self$delete_pet_with_http_info(pet_id, api_key, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -640,10 +647,11 @@ PetApi <- R6::R6Class( #' @param status Status values that need to be considered for filter #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return array[Pet] - find_pets_by_status = function(status, data_file = NULL, ...) { - local_var_response <- self$find_pets_by_status_with_http_info(status, data_file = data_file, ...) + find_pets_by_status = function(status, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$find_pets_by_status_with_http_info(status, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -663,7 +671,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers - find_pets_by_status_with_http_info = function(status, data_file = NULL, ...) { + find_pets_by_status_with_http_info = function(status, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -729,6 +737,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), error = function(e) { @@ -773,10 +786,11 @@ PetApi <- R6::R6Class( #' @param tags Tags to filter by #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return array[Pet] - find_pets_by_tags = function(tags, data_file = NULL, ...) { - local_var_response <- self$find_pets_by_tags_with_http_info(tags, data_file = data_file, ...) + find_pets_by_tags = function(tags, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$find_pets_by_tags_with_http_info(tags, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -796,7 +810,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers - find_pets_by_tags_with_http_info = function(tags, data_file = NULL, ...) { + find_pets_by_tags_with_http_info = function(tags, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -850,6 +864,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), error = function(e) { @@ -894,10 +913,11 @@ PetApi <- R6::R6Class( #' @param pet_id ID of pet to return #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - get_pet_by_id = function(pet_id, data_file = NULL, ...) { - local_var_response <- self$get_pet_by_id_with_http_info(pet_id, data_file = data_file, ...) + get_pet_by_id = function(pet_id, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$get_pet_by_id_with_http_info(pet_id, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -917,7 +937,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - get_pet_by_id_with_http_info = function(pet_id, data_file = NULL, ...) { + get_pet_by_id_with_http_info = function(pet_id, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -976,6 +996,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1021,10 +1046,11 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - get_pet_by_id_streaming = function(pet_id, stream_callback = NULL, data_file = NULL, ...) { - local_var_response <- self$get_pet_by_id_streaming_with_http_info(pet_id, stream_callback = stream_callback, data_file = data_file, ...) + get_pet_by_id_streaming = function(pet_id, stream_callback = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$get_pet_by_id_streaming_with_http_info(pet_id, stream_callback = stream_callback, data_file = data_file, ..., parse = parse) if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) } @@ -1049,7 +1075,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - get_pet_by_id_streaming_with_http_info = function(pet_id, stream_callback = NULL, data_file = NULL, ...) { + get_pet_by_id_streaming_with_http_info = function(pet_id, stream_callback = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1113,6 +1139,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1158,10 +1189,11 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - test_header = function(header_test_int, stream_callback = NULL, data_file = NULL, ...) { - local_var_response <- self$test_header_with_http_info(header_test_int, stream_callback = stream_callback, data_file = data_file, ...) + test_header = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$test_header_with_http_info(header_test_int, stream_callback = stream_callback, data_file = data_file, ..., parse = parse) if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) } @@ -1186,7 +1218,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - test_header_with_http_info = function(header_test_int, stream_callback = NULL, data_file = NULL, ...) { + test_header_with_http_info = function(header_test_int, stream_callback = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1248,6 +1280,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1292,10 +1329,11 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - update_pet = function(pet, data_file = NULL, ...) { - local_var_response <- self$update_pet_with_http_info(pet, data_file = data_file, ...) + update_pet = function(pet, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$update_pet_with_http_info(pet, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1315,7 +1353,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - update_pet_with_http_info = function(pet, data_file = NULL, ...) { + update_pet_with_http_info = function(pet, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1375,6 +1413,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1420,10 +1463,11 @@ PetApi <- R6::R6Class( #' @param name (optional) Updated name of the pet #' @param status (optional) Updated status of the pet #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - update_pet_with_form = function(pet_id, name = NULL, status = NULL, ...) { - local_var_response <- self$update_pet_with_form_with_http_info(pet_id, name, status, ...) + update_pet_with_form = function(pet_id, name = NULL, status = NULL, ..., parse = TRUE) { + local_var_response <- self$update_pet_with_form_with_http_info(pet_id, name, status, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1548,10 +1592,11 @@ PetApi <- R6::R6Class( #' @param file (optional) file to upload #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return ModelApiResponse - upload_file = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ...) { - local_var_response <- self$upload_file_with_http_info(pet_id, additional_metadata, file, data_file = data_file, ...) + upload_file = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$upload_file_with_http_info(pet_id, additional_metadata, file, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1573,7 +1618,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (ModelApiResponse) with additional information such as HTTP status code, headers - upload_file_with_http_info = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ...) { + upload_file_with_http_info = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1647,6 +1692,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "ModelApiResponse"), error = function(e) { diff --git a/samples/client/petstore/R-httr2-wrapper/R/store_api.R b/samples/client/petstore/R-httr2-wrapper/R/store_api.R index 1ea684f97270..b11f22341714 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/store_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/store_api.R @@ -166,10 +166,11 @@ StoreApi <- R6::R6Class( #' #' @param order_id ID of the order that needs to be deleted #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_order = function(order_id, ...) { - local_var_response <- self$delete_order_with_http_info(order_id, ...) + delete_order = function(order_id, ..., parse = TRUE) { + local_var_response <- self$delete_order_with_http_info(order_id, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -273,10 +274,11 @@ StoreApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return map(integer) - get_inventory = function(data_file = NULL, ...) { - local_var_response <- self$get_inventory_with_http_info(data_file = data_file, ...) + get_inventory = function(data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$get_inventory_with_http_info(data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -295,7 +297,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (map(integer)) with additional information such as HTTP status code, headers - get_inventory_with_http_info = function(data_file = NULL, ...) { + get_inventory_with_http_info = function(data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -336,6 +338,11 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "map(integer)"), error = function(e) { @@ -380,10 +387,11 @@ StoreApi <- R6::R6Class( #' @param order_id ID of pet that needs to be fetched #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Order - get_order_by_id = function(order_id, data_file = NULL, ...) { - local_var_response <- self$get_order_by_id_with_http_info(order_id, data_file = data_file, ...) + get_order_by_id = function(order_id, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$get_order_by_id_with_http_info(order_id, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -403,7 +411,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Order) with additional information such as HTTP status code, headers - get_order_by_id_with_http_info = function(order_id, data_file = NULL, ...) { + get_order_by_id_with_http_info = function(order_id, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -470,6 +478,11 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), error = function(e) { @@ -514,10 +527,11 @@ StoreApi <- R6::R6Class( #' @param order order placed for purchasing the pet #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Order - place_order = function(order, data_file = NULL, ...) { - local_var_response <- self$place_order_with_http_info(order, data_file = data_file, ...) + place_order = function(order, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$place_order_with_http_info(order, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -537,7 +551,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Order) with additional information such as HTTP status code, headers - place_order_with_http_info = function(order, data_file = NULL, ...) { + place_order_with_http_info = function(order, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -594,6 +608,11 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), error = function(e) { diff --git a/samples/client/petstore/R-httr2-wrapper/R/user_api.R b/samples/client/petstore/R-httr2-wrapper/R/user_api.R index 5b56f8ae3677..88b0ae0b5b1c 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/user_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/user_api.R @@ -275,10 +275,11 @@ UserApi <- R6::R6Class( #' #' @param user Created user object #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_user = function(user, ...) { - local_var_response <- self$create_user_with_http_info(user, ...) + create_user = function(user, ..., parse = TRUE) { + local_var_response <- self$create_user_with_http_info(user, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -388,10 +389,11 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_users_with_array_input = function(user, ...) { - local_var_response <- self$create_users_with_array_input_with_http_info(user, ...) + create_users_with_array_input = function(user, ..., parse = TRUE) { + local_var_response <- self$create_users_with_array_input_with_http_info(user, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -504,10 +506,11 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_users_with_list_input = function(user, ...) { - local_var_response <- self$create_users_with_list_input_with_http_info(user, ...) + create_users_with_list_input = function(user, ..., parse = TRUE) { + local_var_response <- self$create_users_with_list_input_with_http_info(user, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -620,10 +623,11 @@ UserApi <- R6::R6Class( #' #' @param username The name that needs to be deleted #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_user = function(username, ...) { - local_var_response <- self$delete_user_with_http_info(username, ...) + delete_user = function(username, ..., parse = TRUE) { + local_var_response <- self$delete_user_with_http_info(username, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -732,10 +736,11 @@ UserApi <- R6::R6Class( #' @param username The name that needs to be fetched. Use user1 for testing. #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return User - get_user_by_name = function(username, data_file = NULL, ...) { - local_var_response <- self$get_user_by_name_with_http_info(username, data_file = data_file, ...) + get_user_by_name = function(username, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$get_user_by_name_with_http_info(username, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -755,7 +760,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (User) with additional information such as HTTP status code, headers - get_user_by_name_with_http_info = function(username, data_file = NULL, ...) { + get_user_by_name_with_http_info = function(username, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -810,6 +815,11 @@ UserApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), error = function(e) { @@ -855,10 +865,11 @@ UserApi <- R6::R6Class( #' @param password The password for login in clear text #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - login_user = function(username, password, data_file = NULL, ...) { - local_var_response <- self$login_user_with_http_info(username, password, data_file = data_file, ...) + login_user = function(username, password, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$login_user_with_http_info(username, password, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -879,7 +890,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - login_user_with_http_info = function(username, password, data_file = NULL, ...) { + login_user_with_http_info = function(username, password, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -954,6 +965,11 @@ UserApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -996,10 +1012,11 @@ UserApi <- R6::R6Class( #' Logs out current logged in user session #' #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - logout_user = function(...) { - local_var_response <- self$logout_user_with_http_info(...) + logout_user = function(..., parse = TRUE) { + local_var_response <- self$logout_user_with_http_info(..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1089,10 +1106,11 @@ UserApi <- R6::R6Class( #' @param username name that need to be deleted #' @param user Updated user object #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - update_user = function(username, user, ...) { - local_var_response <- self$update_user_with_http_info(username, user, ...) + update_user = function(username, user, ..., parse = TRUE) { + local_var_response <- self$update_user_with_http_info(username, user, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { diff --git a/samples/client/petstore/R-httr2/R/fake_api.R b/samples/client/petstore/R-httr2/R/fake_api.R index 664ffceb021e..db6412d52c65 100644 --- a/samples/client/petstore/R-httr2/R/fake_api.R +++ b/samples/client/petstore/R-httr2/R/fake_api.R @@ -188,10 +188,11 @@ FakeApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - add_pet_optional = function(pet = NULL, data_file = NULL, ...) { - local_var_response <- self$add_pet_optional_with_http_info(pet, data_file = data_file, ...) + add_pet_optional = function(pet = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$add_pet_optional_with_http_info(pet, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -211,7 +212,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - add_pet_optional_with_http_info = function(pet = NULL, data_file = NULL, ...) { + add_pet_optional_with_http_info = function(pet = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -265,6 +266,11 @@ FakeApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -310,10 +316,11 @@ FakeApi <- R6::R6Class( #' @param var_data_file (optional) header data file #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return User - fake_data_file = function(dummy, var_data_file = NULL, data_file = NULL, ...) { - local_var_response <- self$fake_data_file_with_http_info(dummy, var_data_file, data_file = data_file, ...) + fake_data_file = function(dummy, var_data_file = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$fake_data_file_with_http_info(dummy, var_data_file, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -334,7 +341,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (User) with additional information such as HTTP status code, headers - fake_data_file_with_http_info = function(dummy, var_data_file = NULL, data_file = NULL, ...) { + fake_data_file_with_http_info = function(dummy, var_data_file = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -396,6 +403,11 @@ FakeApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), error = function(e) { @@ -439,10 +451,11 @@ FakeApi <- R6::R6Class( #' #' @param path_array_parameter dummy path parameter #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_path_array = function(path_array_parameter, ...) { - local_var_response <- self$fake_path_array_with_http_info(path_array_parameter, ...) + fake_path_array = function(path_array_parameter, ..., parse = TRUE) { + local_var_response <- self$fake_path_array_with_http_info(path_array_parameter, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -546,10 +559,11 @@ FakeApi <- R6::R6Class( #' #' @param reg_exp_test dummy required parameter #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_regular_expression = function(reg_exp_test, ...) { - local_var_response <- self$fake_regular_expression_with_http_info(reg_exp_test, ...) + fake_regular_expression = function(reg_exp_test, ..., parse = TRUE) { + local_var_response <- self$fake_regular_expression_with_http_info(reg_exp_test, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -658,10 +672,11 @@ FakeApi <- R6::R6Class( #' @param set_dummy set query #' @param array_dummy array query #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_set_query = function(set_dummy, array_dummy, ...) { - local_var_response <- self$fake_set_query_with_http_info(set_dummy, array_dummy, ...) + fake_set_query = function(set_dummy, array_dummy, ..., parse = TRUE) { + local_var_response <- self$fake_set_query_with_http_info(set_dummy, array_dummy, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { diff --git a/samples/client/petstore/R-httr2/R/pet_api.R b/samples/client/petstore/R-httr2/R/pet_api.R index b60f15378597..8a3ed661c0f2 100644 --- a/samples/client/petstore/R-httr2/R/pet_api.R +++ b/samples/client/petstore/R-httr2/R/pet_api.R @@ -391,10 +391,11 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - add_pet = function(pet, data_file = NULL, ...) { - local_var_response <- self$add_pet_with_http_info(pet, data_file = data_file, ...) + add_pet = function(pet, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$add_pet_with_http_info(pet, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -414,7 +415,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - add_pet_with_http_info = function(pet, data_file = NULL, ...) { + add_pet_with_http_info = function(pet, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -475,6 +476,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -519,10 +525,11 @@ PetApi <- R6::R6Class( #' @param pet_id Pet id to delete #' @param api_key (optional) No description #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_pet = function(pet_id, api_key = NULL, ...) { - local_var_response <- self$delete_pet_with_http_info(pet_id, api_key, ...) + delete_pet = function(pet_id, api_key = NULL, ..., parse = TRUE) { + local_var_response <- self$delete_pet_with_http_info(pet_id, api_key, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -640,10 +647,11 @@ PetApi <- R6::R6Class( #' @param status Status values that need to be considered for filter #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return array[Pet] - find_pets_by_status = function(status, data_file = NULL, ...) { - local_var_response <- self$find_pets_by_status_with_http_info(status, data_file = data_file, ...) + find_pets_by_status = function(status, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$find_pets_by_status_with_http_info(status, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -663,7 +671,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers - find_pets_by_status_with_http_info = function(status, data_file = NULL, ...) { + find_pets_by_status_with_http_info = function(status, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -729,6 +737,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), error = function(e) { @@ -773,10 +786,11 @@ PetApi <- R6::R6Class( #' @param tags Tags to filter by #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return array[Pet] - find_pets_by_tags = function(tags, data_file = NULL, ...) { - local_var_response <- self$find_pets_by_tags_with_http_info(tags, data_file = data_file, ...) + find_pets_by_tags = function(tags, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$find_pets_by_tags_with_http_info(tags, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -796,7 +810,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers - find_pets_by_tags_with_http_info = function(tags, data_file = NULL, ...) { + find_pets_by_tags_with_http_info = function(tags, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -850,6 +864,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), error = function(e) { @@ -894,10 +913,11 @@ PetApi <- R6::R6Class( #' @param pet_id ID of pet to return #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - get_pet_by_id = function(pet_id, data_file = NULL, ...) { - local_var_response <- self$get_pet_by_id_with_http_info(pet_id, data_file = data_file, ...) + get_pet_by_id = function(pet_id, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$get_pet_by_id_with_http_info(pet_id, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -917,7 +937,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - get_pet_by_id_with_http_info = function(pet_id, data_file = NULL, ...) { + get_pet_by_id_with_http_info = function(pet_id, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -976,6 +996,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1021,10 +1046,11 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - get_pet_by_id_streaming = function(pet_id, stream_callback = NULL, data_file = NULL, ...) { - local_var_response <- self$get_pet_by_id_streaming_with_http_info(pet_id, stream_callback = stream_callback, data_file = data_file, ...) + get_pet_by_id_streaming = function(pet_id, stream_callback = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$get_pet_by_id_streaming_with_http_info(pet_id, stream_callback = stream_callback, data_file = data_file, ..., parse = parse) if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) } @@ -1049,7 +1075,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - get_pet_by_id_streaming_with_http_info = function(pet_id, stream_callback = NULL, data_file = NULL, ...) { + get_pet_by_id_streaming_with_http_info = function(pet_id, stream_callback = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1113,6 +1139,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1158,10 +1189,11 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - test_header = function(header_test_int, stream_callback = NULL, data_file = NULL, ...) { - local_var_response <- self$test_header_with_http_info(header_test_int, stream_callback = stream_callback, data_file = data_file, ...) + test_header = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$test_header_with_http_info(header_test_int, stream_callback = stream_callback, data_file = data_file, ..., parse = parse) if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) } @@ -1186,7 +1218,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - test_header_with_http_info = function(header_test_int, stream_callback = NULL, data_file = NULL, ...) { + test_header_with_http_info = function(header_test_int, stream_callback = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1248,6 +1280,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1292,10 +1329,11 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - update_pet = function(pet, data_file = NULL, ...) { - local_var_response <- self$update_pet_with_http_info(pet, data_file = data_file, ...) + update_pet = function(pet, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$update_pet_with_http_info(pet, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1315,7 +1353,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - update_pet_with_http_info = function(pet, data_file = NULL, ...) { + update_pet_with_http_info = function(pet, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1375,6 +1413,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1420,10 +1463,11 @@ PetApi <- R6::R6Class( #' @param name (optional) Updated name of the pet #' @param status (optional) Updated status of the pet #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - update_pet_with_form = function(pet_id, name = NULL, status = NULL, ...) { - local_var_response <- self$update_pet_with_form_with_http_info(pet_id, name, status, ...) + update_pet_with_form = function(pet_id, name = NULL, status = NULL, ..., parse = TRUE) { + local_var_response <- self$update_pet_with_form_with_http_info(pet_id, name, status, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1548,10 +1592,11 @@ PetApi <- R6::R6Class( #' @param file (optional) file to upload #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return ModelApiResponse - upload_file = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ...) { - local_var_response <- self$upload_file_with_http_info(pet_id, additional_metadata, file, data_file = data_file, ...) + upload_file = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$upload_file_with_http_info(pet_id, additional_metadata, file, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1573,7 +1618,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (ModelApiResponse) with additional information such as HTTP status code, headers - upload_file_with_http_info = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ...) { + upload_file_with_http_info = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1647,6 +1692,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "ModelApiResponse"), error = function(e) { diff --git a/samples/client/petstore/R-httr2/R/store_api.R b/samples/client/petstore/R-httr2/R/store_api.R index ec454c8d78cc..72364d52c6f5 100644 --- a/samples/client/petstore/R-httr2/R/store_api.R +++ b/samples/client/petstore/R-httr2/R/store_api.R @@ -166,10 +166,11 @@ StoreApi <- R6::R6Class( #' #' @param order_id ID of the order that needs to be deleted #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_order = function(order_id, ...) { - local_var_response <- self$delete_order_with_http_info(order_id, ...) + delete_order = function(order_id, ..., parse = TRUE) { + local_var_response <- self$delete_order_with_http_info(order_id, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -273,10 +274,11 @@ StoreApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return map(integer) - get_inventory = function(data_file = NULL, ...) { - local_var_response <- self$get_inventory_with_http_info(data_file = data_file, ...) + get_inventory = function(data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$get_inventory_with_http_info(data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -295,7 +297,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (map(integer)) with additional information such as HTTP status code, headers - get_inventory_with_http_info = function(data_file = NULL, ...) { + get_inventory_with_http_info = function(data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -336,6 +338,11 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "map(integer)"), error = function(e) { @@ -380,10 +387,11 @@ StoreApi <- R6::R6Class( #' @param order_id ID of pet that needs to be fetched #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Order - get_order_by_id = function(order_id, data_file = NULL, ...) { - local_var_response <- self$get_order_by_id_with_http_info(order_id, data_file = data_file, ...) + get_order_by_id = function(order_id, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$get_order_by_id_with_http_info(order_id, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -403,7 +411,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Order) with additional information such as HTTP status code, headers - get_order_by_id_with_http_info = function(order_id, data_file = NULL, ...) { + get_order_by_id_with_http_info = function(order_id, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -470,6 +478,11 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), error = function(e) { @@ -514,10 +527,11 @@ StoreApi <- R6::R6Class( #' @param order order placed for purchasing the pet #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Order - place_order = function(order, data_file = NULL, ...) { - local_var_response <- self$place_order_with_http_info(order, data_file = data_file, ...) + place_order = function(order, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$place_order_with_http_info(order, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -537,7 +551,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Order) with additional information such as HTTP status code, headers - place_order_with_http_info = function(order, data_file = NULL, ...) { + place_order_with_http_info = function(order, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -594,6 +608,11 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), error = function(e) { diff --git a/samples/client/petstore/R-httr2/R/user_api.R b/samples/client/petstore/R-httr2/R/user_api.R index 242077c4b1e3..4e81600af64c 100644 --- a/samples/client/petstore/R-httr2/R/user_api.R +++ b/samples/client/petstore/R-httr2/R/user_api.R @@ -275,10 +275,11 @@ UserApi <- R6::R6Class( #' #' @param user Created user object #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_user = function(user, ...) { - local_var_response <- self$create_user_with_http_info(user, ...) + create_user = function(user, ..., parse = TRUE) { + local_var_response <- self$create_user_with_http_info(user, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -388,10 +389,11 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_users_with_array_input = function(user, ...) { - local_var_response <- self$create_users_with_array_input_with_http_info(user, ...) + create_users_with_array_input = function(user, ..., parse = TRUE) { + local_var_response <- self$create_users_with_array_input_with_http_info(user, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -504,10 +506,11 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_users_with_list_input = function(user, ...) { - local_var_response <- self$create_users_with_list_input_with_http_info(user, ...) + create_users_with_list_input = function(user, ..., parse = TRUE) { + local_var_response <- self$create_users_with_list_input_with_http_info(user, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -620,10 +623,11 @@ UserApi <- R6::R6Class( #' #' @param username The name that needs to be deleted #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_user = function(username, ...) { - local_var_response <- self$delete_user_with_http_info(username, ...) + delete_user = function(username, ..., parse = TRUE) { + local_var_response <- self$delete_user_with_http_info(username, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -732,10 +736,11 @@ UserApi <- R6::R6Class( #' @param username The name that needs to be fetched. Use user1 for testing. #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return User - get_user_by_name = function(username, data_file = NULL, ...) { - local_var_response <- self$get_user_by_name_with_http_info(username, data_file = data_file, ...) + get_user_by_name = function(username, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$get_user_by_name_with_http_info(username, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -755,7 +760,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (User) with additional information such as HTTP status code, headers - get_user_by_name_with_http_info = function(username, data_file = NULL, ...) { + get_user_by_name_with_http_info = function(username, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -810,6 +815,11 @@ UserApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), error = function(e) { @@ -855,10 +865,11 @@ UserApi <- R6::R6Class( #' @param password The password for login in clear text #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - login_user = function(username, password, data_file = NULL, ...) { - local_var_response <- self$login_user_with_http_info(username, password, data_file = data_file, ...) + login_user = function(username, password, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$login_user_with_http_info(username, password, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -879,7 +890,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - login_user_with_http_info = function(username, password, data_file = NULL, ...) { + login_user_with_http_info = function(username, password, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -954,6 +965,11 @@ UserApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -996,10 +1012,11 @@ UserApi <- R6::R6Class( #' Logs out current logged in user session #' #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - logout_user = function(...) { - local_var_response <- self$logout_user_with_http_info(...) + logout_user = function(..., parse = TRUE) { + local_var_response <- self$logout_user_with_http_info(..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1089,10 +1106,11 @@ UserApi <- R6::R6Class( #' @param username name that need to be deleted #' @param user Updated user object #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - update_user = function(username, user, ...) { - local_var_response <- self$update_user_with_http_info(username, user, ...) + update_user = function(username, user, ..., parse = TRUE) { + local_var_response <- self$update_user_with_http_info(username, user, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { diff --git a/samples/client/petstore/R/R/fake_api.R b/samples/client/petstore/R/R/fake_api.R index c113579eb032..4a3c768f4feb 100644 --- a/samples/client/petstore/R/R/fake_api.R +++ b/samples/client/petstore/R/R/fake_api.R @@ -188,10 +188,11 @@ FakeApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - AddPetOptional = function(pet = NULL, data_file = NULL, ...) { - local_var_response <- self$AddPetOptionalWithHttpInfo(pet, data_file = data_file, ...) + AddPetOptional = function(pet = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$AddPetOptionalWithHttpInfo(pet, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -211,7 +212,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - AddPetOptionalWithHttpInfo = function(pet = NULL, data_file = NULL, ...) { + AddPetOptionalWithHttpInfo = function(pet = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -265,6 +266,11 @@ FakeApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -310,10 +316,11 @@ FakeApi <- R6::R6Class( #' @param var_data_file (optional) header data file #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return User - FakeDataFile = function(dummy, var_data_file = NULL, data_file = NULL, ...) { - local_var_response <- self$FakeDataFileWithHttpInfo(dummy, var_data_file, data_file = data_file, ...) + FakeDataFile = function(dummy, var_data_file = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$FakeDataFileWithHttpInfo(dummy, var_data_file, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -334,7 +341,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (User) with additional information such as HTTP status code, headers - FakeDataFileWithHttpInfo = function(dummy, var_data_file = NULL, data_file = NULL, ...) { + FakeDataFileWithHttpInfo = function(dummy, var_data_file = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -396,6 +403,11 @@ FakeApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), error = function(e) { @@ -439,10 +451,11 @@ FakeApi <- R6::R6Class( #' #' @param path_array dummy path parameter #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - FakePathArray = function(path_array, ...) { - local_var_response <- self$FakePathArrayWithHttpInfo(path_array, ...) + FakePathArray = function(path_array, ..., parse = TRUE) { + local_var_response <- self$FakePathArrayWithHttpInfo(path_array, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -546,10 +559,11 @@ FakeApi <- R6::R6Class( #' #' @param reg_exp_test dummy required parameter #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - FakeRegularExpression = function(reg_exp_test, ...) { - local_var_response <- self$FakeRegularExpressionWithHttpInfo(reg_exp_test, ...) + FakeRegularExpression = function(reg_exp_test, ..., parse = TRUE) { + local_var_response <- self$FakeRegularExpressionWithHttpInfo(reg_exp_test, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -658,10 +672,11 @@ FakeApi <- R6::R6Class( #' @param set_dummy set query #' @param array_dummy array query #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - FakeSetQuery = function(set_dummy, array_dummy, ...) { - local_var_response <- self$FakeSetQueryWithHttpInfo(set_dummy, array_dummy, ...) + FakeSetQuery = function(set_dummy, array_dummy, ..., parse = TRUE) { + local_var_response <- self$FakeSetQueryWithHttpInfo(set_dummy, array_dummy, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { diff --git a/samples/client/petstore/R/R/pet_api.R b/samples/client/petstore/R/R/pet_api.R index 40cfdabc2271..83f658d1298b 100644 --- a/samples/client/petstore/R/R/pet_api.R +++ b/samples/client/petstore/R/R/pet_api.R @@ -391,10 +391,11 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - AddPet = function(pet, data_file = NULL, ...) { - local_var_response <- self$AddPetWithHttpInfo(pet, data_file = data_file, ...) + AddPet = function(pet, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$AddPetWithHttpInfo(pet, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -414,7 +415,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - AddPetWithHttpInfo = function(pet, data_file = NULL, ...) { + AddPetWithHttpInfo = function(pet, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -475,6 +476,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -519,10 +525,11 @@ PetApi <- R6::R6Class( #' @param pet_id Pet id to delete #' @param api_key (optional) No description #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - DeletePet = function(pet_id, api_key = NULL, ...) { - local_var_response <- self$DeletePetWithHttpInfo(pet_id, api_key, ...) + DeletePet = function(pet_id, api_key = NULL, ..., parse = TRUE) { + local_var_response <- self$DeletePetWithHttpInfo(pet_id, api_key, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -640,10 +647,11 @@ PetApi <- R6::R6Class( #' @param status Status values that need to be considered for filter #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return array[Pet] - FindPetsByStatus = function(status, data_file = NULL, ...) { - local_var_response <- self$FindPetsByStatusWithHttpInfo(status, data_file = data_file, ...) + FindPetsByStatus = function(status, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$FindPetsByStatusWithHttpInfo(status, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -663,7 +671,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers - FindPetsByStatusWithHttpInfo = function(status, data_file = NULL, ...) { + FindPetsByStatusWithHttpInfo = function(status, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -729,6 +737,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), error = function(e) { @@ -773,10 +786,11 @@ PetApi <- R6::R6Class( #' @param tags Tags to filter by #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return array[Pet] - FindPetsByTags = function(tags, data_file = NULL, ...) { - local_var_response <- self$FindPetsByTagsWithHttpInfo(tags, data_file = data_file, ...) + FindPetsByTags = function(tags, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$FindPetsByTagsWithHttpInfo(tags, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -796,7 +810,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers - FindPetsByTagsWithHttpInfo = function(tags, data_file = NULL, ...) { + FindPetsByTagsWithHttpInfo = function(tags, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -850,6 +864,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), error = function(e) { @@ -894,10 +913,11 @@ PetApi <- R6::R6Class( #' @param pet_id ID of pet to return #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - GetPetById = function(pet_id, data_file = NULL, ...) { - local_var_response <- self$GetPetByIdWithHttpInfo(pet_id, data_file = data_file, ...) + GetPetById = function(pet_id, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$GetPetByIdWithHttpInfo(pet_id, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -917,7 +937,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - GetPetByIdWithHttpInfo = function(pet_id, data_file = NULL, ...) { + GetPetByIdWithHttpInfo = function(pet_id, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -976,6 +996,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1021,10 +1046,11 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - GetPetByIdStreaming = function(pet_id, stream_callback = NULL, data_file = NULL, ...) { - local_var_response <- self$GetPetByIdStreamingWithHttpInfo(pet_id, stream_callback = stream_callback, data_file = data_file, ...) + GetPetByIdStreaming = function(pet_id, stream_callback = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$GetPetByIdStreamingWithHttpInfo(pet_id, stream_callback = stream_callback, data_file = data_file, ..., parse = parse) if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) } @@ -1049,7 +1075,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - GetPetByIdStreamingWithHttpInfo = function(pet_id, stream_callback = NULL, data_file = NULL, ...) { + GetPetByIdStreamingWithHttpInfo = function(pet_id, stream_callback = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1113,6 +1139,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1158,10 +1189,11 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - TestHeader = function(header_test_int, stream_callback = NULL, data_file = NULL, ...) { - local_var_response <- self$TestHeaderWithHttpInfo(header_test_int, stream_callback = stream_callback, data_file = data_file, ...) + TestHeader = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$TestHeaderWithHttpInfo(header_test_int, stream_callback = stream_callback, data_file = data_file, ..., parse = parse) if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) } @@ -1186,7 +1218,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - TestHeaderWithHttpInfo = function(header_test_int, stream_callback = NULL, data_file = NULL, ...) { + TestHeaderWithHttpInfo = function(header_test_int, stream_callback = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1248,6 +1280,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1292,10 +1329,11 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - UpdatePet = function(pet, data_file = NULL, ...) { - local_var_response <- self$UpdatePetWithHttpInfo(pet, data_file = data_file, ...) + UpdatePet = function(pet, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$UpdatePetWithHttpInfo(pet, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1315,7 +1353,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - UpdatePetWithHttpInfo = function(pet, data_file = NULL, ...) { + UpdatePetWithHttpInfo = function(pet, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1375,6 +1413,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1420,10 +1463,11 @@ PetApi <- R6::R6Class( #' @param name (optional) Updated name of the pet #' @param status (optional) Updated status of the pet #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - UpdatePetWithForm = function(pet_id, name = NULL, status = NULL, ...) { - local_var_response <- self$UpdatePetWithFormWithHttpInfo(pet_id, name, status, ...) + UpdatePetWithForm = function(pet_id, name = NULL, status = NULL, ..., parse = TRUE) { + local_var_response <- self$UpdatePetWithFormWithHttpInfo(pet_id, name, status, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1548,10 +1592,11 @@ PetApi <- R6::R6Class( #' @param file (optional) file to upload #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return ModelApiResponse - UploadFile = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ...) { - local_var_response <- self$UploadFileWithHttpInfo(pet_id, additional_metadata, file, data_file = data_file, ...) + UploadFile = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$UploadFileWithHttpInfo(pet_id, additional_metadata, file, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1573,7 +1618,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (ModelApiResponse) with additional information such as HTTP status code, headers - UploadFileWithHttpInfo = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ...) { + UploadFileWithHttpInfo = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1647,6 +1692,11 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "ModelApiResponse"), error = function(e) { diff --git a/samples/client/petstore/R/R/store_api.R b/samples/client/petstore/R/R/store_api.R index ebb1fde28a4f..0f92c1b50aa9 100644 --- a/samples/client/petstore/R/R/store_api.R +++ b/samples/client/petstore/R/R/store_api.R @@ -166,10 +166,11 @@ StoreApi <- R6::R6Class( #' #' @param order_id ID of the order that needs to be deleted #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - DeleteOrder = function(order_id, ...) { - local_var_response <- self$DeleteOrderWithHttpInfo(order_id, ...) + DeleteOrder = function(order_id, ..., parse = TRUE) { + local_var_response <- self$DeleteOrderWithHttpInfo(order_id, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -273,10 +274,11 @@ StoreApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return map(integer) - GetInventory = function(data_file = NULL, ...) { - local_var_response <- self$GetInventoryWithHttpInfo(data_file = data_file, ...) + GetInventory = function(data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$GetInventoryWithHttpInfo(data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -295,7 +297,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (map(integer)) with additional information such as HTTP status code, headers - GetInventoryWithHttpInfo = function(data_file = NULL, ...) { + GetInventoryWithHttpInfo = function(data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -336,6 +338,11 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "map(integer)"), error = function(e) { @@ -380,10 +387,11 @@ StoreApi <- R6::R6Class( #' @param order_id ID of pet that needs to be fetched #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Order - GetOrderById = function(order_id, data_file = NULL, ...) { - local_var_response <- self$GetOrderByIdWithHttpInfo(order_id, data_file = data_file, ...) + GetOrderById = function(order_id, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$GetOrderByIdWithHttpInfo(order_id, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -403,7 +411,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Order) with additional information such as HTTP status code, headers - GetOrderByIdWithHttpInfo = function(order_id, data_file = NULL, ...) { + GetOrderByIdWithHttpInfo = function(order_id, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -470,6 +478,11 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), error = function(e) { @@ -514,10 +527,11 @@ StoreApi <- R6::R6Class( #' @param order order placed for purchasing the pet #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Order - PlaceOrder = function(order, data_file = NULL, ...) { - local_var_response <- self$PlaceOrderWithHttpInfo(order, data_file = data_file, ...) + PlaceOrder = function(order, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$PlaceOrderWithHttpInfo(order, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -537,7 +551,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Order) with additional information such as HTTP status code, headers - PlaceOrderWithHttpInfo = function(order, data_file = NULL, ...) { + PlaceOrderWithHttpInfo = function(order, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -594,6 +608,11 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), error = function(e) { diff --git a/samples/client/petstore/R/R/user_api.R b/samples/client/petstore/R/R/user_api.R index ca366d7eb130..c0dc877631e3 100644 --- a/samples/client/petstore/R/R/user_api.R +++ b/samples/client/petstore/R/R/user_api.R @@ -275,10 +275,11 @@ UserApi <- R6::R6Class( #' #' @param user Created user object #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - CreateUser = function(user, ...) { - local_var_response <- self$CreateUserWithHttpInfo(user, ...) + CreateUser = function(user, ..., parse = TRUE) { + local_var_response <- self$CreateUserWithHttpInfo(user, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -388,10 +389,11 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - CreateUsersWithArrayInput = function(user, ...) { - local_var_response <- self$CreateUsersWithArrayInputWithHttpInfo(user, ...) + CreateUsersWithArrayInput = function(user, ..., parse = TRUE) { + local_var_response <- self$CreateUsersWithArrayInputWithHttpInfo(user, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -504,10 +506,11 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - CreateUsersWithListInput = function(user, ...) { - local_var_response <- self$CreateUsersWithListInputWithHttpInfo(user, ...) + CreateUsersWithListInput = function(user, ..., parse = TRUE) { + local_var_response <- self$CreateUsersWithListInputWithHttpInfo(user, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -620,10 +623,11 @@ UserApi <- R6::R6Class( #' #' @param username The name that needs to be deleted #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - DeleteUser = function(username, ...) { - local_var_response <- self$DeleteUserWithHttpInfo(username, ...) + DeleteUser = function(username, ..., parse = TRUE) { + local_var_response <- self$DeleteUserWithHttpInfo(username, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -732,10 +736,11 @@ UserApi <- R6::R6Class( #' @param username The name that needs to be fetched. Use user1 for testing. #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return User - GetUserByName = function(username, data_file = NULL, ...) { - local_var_response <- self$GetUserByNameWithHttpInfo(username, data_file = data_file, ...) + GetUserByName = function(username, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$GetUserByNameWithHttpInfo(username, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -755,7 +760,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (User) with additional information such as HTTP status code, headers - GetUserByNameWithHttpInfo = function(username, data_file = NULL, ...) { + GetUserByNameWithHttpInfo = function(username, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -810,6 +815,11 @@ UserApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), error = function(e) { @@ -855,10 +865,11 @@ UserApi <- R6::R6Class( #' @param password The password for login in clear text #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - LoginUser = function(username, password, data_file = NULL, ...) { - local_var_response <- self$LoginUserWithHttpInfo(username, password, data_file = data_file, ...) + LoginUser = function(username, password, data_file = NULL, ..., parse = TRUE) { + local_var_response <- self$LoginUserWithHttpInfo(username, password, data_file = data_file, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -879,7 +890,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - LoginUserWithHttpInfo = function(username, password, data_file = NULL, ...) { + LoginUserWithHttpInfo = function(username, password, data_file = NULL, parse = TRUE, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -954,6 +965,11 @@ UserApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } + if (!parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -996,10 +1012,11 @@ UserApi <- R6::R6Class( #' Logs out current logged in user session #' #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - LogoutUser = function(...) { - local_var_response <- self$LogoutUserWithHttpInfo(...) + LogoutUser = function(..., parse = TRUE) { + local_var_response <- self$LogoutUserWithHttpInfo(..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1089,10 +1106,11 @@ UserApi <- R6::R6Class( #' @param username name that need to be deleted #' @param user Updated user object #' @param ... Other optional arguments + #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - UpdateUser = function(username, user, ...) { - local_var_response <- self$UpdateUserWithHttpInfo(username, user, ...) + UpdateUser = function(username, user, ..., parse = TRUE) { + local_var_response <- self$UpdateUserWithHttpInfo(username, user, ..., parse = parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { From a7244cb1c516817aac4df41b3c9ae0b6be47eb56 Mon Sep 17 00:00:00 2001 From: Matthew Pollock Date: Thu, 15 Jan 2026 13:10:25 -0500 Subject: [PATCH 2/5] parse -> .parse --- .../src/main/resources/r/api.mustache | 10 +- samples/client/echo_api/r/R/auth_api.R | 20 ++-- samples/client/echo_api/r/R/body_api.R | 100 ++++++++-------- samples/client/echo_api/r/R/form_api.R | 30 ++--- samples/client/echo_api/r/R/header_api.R | 10 +- samples/client/echo_api/r/R/path_api.R | 10 +- samples/client/echo_api/r/R/query_api.R | 110 +++++++++--------- .../petstore/R-httr2-wrapper/R/fake_api.R | 44 +++---- .../petstore/R-httr2-wrapper/R/pet_api.R | 96 +++++++-------- .../petstore/R-httr2-wrapper/R/store_api.R | 38 +++--- .../petstore/R-httr2-wrapper/R/user_api.R | 68 +++++------ samples/client/petstore/R-httr2/R/fake_api.R | 44 +++---- samples/client/petstore/R-httr2/R/pet_api.R | 96 +++++++-------- samples/client/petstore/R-httr2/R/store_api.R | 38 +++--- samples/client/petstore/R-httr2/R/user_api.R | 68 +++++------ samples/client/petstore/R/R/fake_api.R | 44 +++---- samples/client/petstore/R/R/pet_api.R | 96 +++++++-------- samples/client/petstore/R/R/store_api.R | 38 +++--- samples/client/petstore/R/R/user_api.R | 68 +++++------ 19 files changed, 514 insertions(+), 514 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/r/api.mustache b/modules/openapi-generator/src/main/resources/r/api.mustache index 588e6e77e185..b297492099fa 100644 --- a/modules/openapi-generator/src/main/resources/r/api.mustache +++ b/modules/openapi-generator/src/main/resources/r/api.mustache @@ -142,11 +142,11 @@ #' @param data_file (optional) name of the data file to save the result {{/returnType}} #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return {{{returnType}}}{{^returnType}}void{{/returnType}} - {{{operationId}}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}} = {{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}{{#vendorExtensions.x-streaming}}stream_callback = NULL, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = NULL, {{/returnType}}..., parse = TRUE) { - local_var_response <- self${{{operationId}}}{{WithHttpInfo}}({{#allParams}}{{paramName}}, {{/allParams}}{{#vendorExtensions.x-streaming}}stream_callback = stream_callback, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = data_file, {{/returnType}}..., parse = parse) + {{{operationId}}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}} = {{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}{{#vendorExtensions.x-streaming}}stream_callback = NULL, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = NULL, {{/returnType}}..., .parse = TRUE) { + local_var_response <- self${{{operationId}}}{{WithHttpInfo}}({{#allParams}}{{paramName}}, {{/allParams}}{{#vendorExtensions.x-streaming}}stream_callback = stream_callback, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = data_file, {{/returnType}}..., .parse = .parse) {{#vendorExtensions.x-streaming}} if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) @@ -182,7 +182,7 @@ #' @param ... Other optional arguments #' #' @return API response ({{{returnType}}}{{^returnType}}void{{/returnType}}) with additional information such as HTTP status code, headers - {{{operationId}}}{{WithHttpInfo}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}} = {{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}{{#vendorExtensions.x-streaming}}stream_callback = NULL, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = NULL, parse = TRUE, {{/returnType}}...) { + {{{operationId}}}{{WithHttpInfo}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}} = {{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}{{#vendorExtensions.x-streaming}}stream_callback = NULL, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = NULL, {{/returnType}}..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -570,7 +570,7 @@ self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } diff --git a/samples/client/echo_api/r/R/auth_api.R b/samples/client/echo_api/r/R/auth_api.R index ade3f510f758..346f7a5fed18 100644 --- a/samples/client/echo_api/r/R/auth_api.R +++ b/samples/client/echo_api/r/R/auth_api.R @@ -73,11 +73,11 @@ AuthApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestAuthHttpBasic = function(data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestAuthHttpBasicWithHttpInfo(data_file = data_file, ..., parse = parse) + TestAuthHttpBasic = function(data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestAuthHttpBasicWithHttpInfo(data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -96,7 +96,7 @@ AuthApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestAuthHttpBasicWithHttpInfo = function(data_file = NULL, parse = TRUE, ...) { + TestAuthHttpBasicWithHttpInfo = function(data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -137,7 +137,7 @@ AuthApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -170,11 +170,11 @@ AuthApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestAuthHttpBearer = function(data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestAuthHttpBearerWithHttpInfo(data_file = data_file, ..., parse = parse) + TestAuthHttpBearer = function(data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestAuthHttpBearerWithHttpInfo(data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -193,7 +193,7 @@ AuthApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestAuthHttpBearerWithHttpInfo = function(data_file = NULL, parse = TRUE, ...) { + TestAuthHttpBearerWithHttpInfo = function(data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -234,7 +234,7 @@ AuthApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } diff --git a/samples/client/echo_api/r/R/body_api.R b/samples/client/echo_api/r/R/body_api.R index c22cda7be2e4..fbd7c24f3161 100644 --- a/samples/client/echo_api/r/R/body_api.R +++ b/samples/client/echo_api/r/R/body_api.R @@ -179,11 +179,11 @@ BodyApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return data.frame - TestBinaryGif = function(data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestBinaryGifWithHttpInfo(data_file = data_file, ..., parse = parse) + TestBinaryGif = function(data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestBinaryGifWithHttpInfo(data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -202,7 +202,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (data.frame) with additional information such as HTTP status code, headers - TestBinaryGifWithHttpInfo = function(data_file = NULL, parse = TRUE, ...) { + TestBinaryGifWithHttpInfo = function(data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -239,7 +239,7 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -273,11 +273,11 @@ BodyApi <- R6::R6Class( #' @param body (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestBodyApplicationOctetstreamBinary = function(body = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestBodyApplicationOctetstreamBinaryWithHttpInfo(body, data_file = data_file, ..., parse = parse) + TestBodyApplicationOctetstreamBinary = function(body = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestBodyApplicationOctetstreamBinaryWithHttpInfo(body, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -297,7 +297,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestBodyApplicationOctetstreamBinaryWithHttpInfo = function(body = NULL, data_file = NULL, parse = TRUE, ...) { + TestBodyApplicationOctetstreamBinaryWithHttpInfo = function(body = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -344,7 +344,7 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -378,11 +378,11 @@ BodyApi <- R6::R6Class( #' @param files #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestBodyMultipartFormdataArrayOfBinary = function(files, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files, data_file = data_file, ..., parse = parse) + TestBodyMultipartFormdataArrayOfBinary = function(files, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestBodyMultipartFormdataArrayOfBinaryWithHttpInfo(files, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -402,7 +402,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestBodyMultipartFormdataArrayOfBinaryWithHttpInfo = function(files, data_file = NULL, parse = TRUE, ...) { + TestBodyMultipartFormdataArrayOfBinaryWithHttpInfo = function(files, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -448,7 +448,7 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -482,11 +482,11 @@ BodyApi <- R6::R6Class( #' @param my_file (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestBodyMultipartFormdataSingleBinary = function(my_file = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestBodyMultipartFormdataSingleBinaryWithHttpInfo(my_file, data_file = data_file, ..., parse = parse) + TestBodyMultipartFormdataSingleBinary = function(my_file = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestBodyMultipartFormdataSingleBinaryWithHttpInfo(my_file, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -506,7 +506,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestBodyMultipartFormdataSingleBinaryWithHttpInfo = function(my_file = NULL, data_file = NULL, parse = TRUE, ...) { + TestBodyMultipartFormdataSingleBinaryWithHttpInfo = function(my_file = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -548,7 +548,7 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -582,11 +582,11 @@ BodyApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - TestEchoBodyAllOfPet = function(pet = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestEchoBodyAllOfPetWithHttpInfo(pet, data_file = data_file, ..., parse = parse) + TestEchoBodyAllOfPet = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestEchoBodyAllOfPetWithHttpInfo(pet, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -606,7 +606,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - TestEchoBodyAllOfPetWithHttpInfo = function(pet = NULL, data_file = NULL, parse = TRUE, ...) { + TestEchoBodyAllOfPetWithHttpInfo = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -653,7 +653,7 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -687,11 +687,11 @@ BodyApi <- R6::R6Class( #' @param body (optional) Free form object #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestEchoBodyFreeFormObjectResponseString = function(body = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestEchoBodyFreeFormObjectResponseStringWithHttpInfo(body, data_file = data_file, ..., parse = parse) + TestEchoBodyFreeFormObjectResponseString = function(body = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestEchoBodyFreeFormObjectResponseStringWithHttpInfo(body, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -711,7 +711,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestEchoBodyFreeFormObjectResponseStringWithHttpInfo = function(body = NULL, data_file = NULL, parse = TRUE, ...) { + TestEchoBodyFreeFormObjectResponseStringWithHttpInfo = function(body = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -758,7 +758,7 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -792,11 +792,11 @@ BodyApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - TestEchoBodyPet = function(pet = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestEchoBodyPetWithHttpInfo(pet, data_file = data_file, ..., parse = parse) + TestEchoBodyPet = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestEchoBodyPetWithHttpInfo(pet, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -816,7 +816,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - TestEchoBodyPetWithHttpInfo = function(pet = NULL, data_file = NULL, parse = TRUE, ...) { + TestEchoBodyPetWithHttpInfo = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -863,7 +863,7 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -897,11 +897,11 @@ BodyApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestEchoBodyPetResponseString = function(pet = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestEchoBodyPetResponseStringWithHttpInfo(pet, data_file = data_file, ..., parse = parse) + TestEchoBodyPetResponseString = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestEchoBodyPetResponseStringWithHttpInfo(pet, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -921,7 +921,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestEchoBodyPetResponseStringWithHttpInfo = function(pet = NULL, data_file = NULL, parse = TRUE, ...) { + TestEchoBodyPetResponseStringWithHttpInfo = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -968,7 +968,7 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1002,11 +1002,11 @@ BodyApi <- R6::R6Class( #' @param body (optional) String enum #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return StringEnumRef - TestEchoBodyStringEnum = function(body = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestEchoBodyStringEnumWithHttpInfo(body, data_file = data_file, ..., parse = parse) + TestEchoBodyStringEnum = function(body = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestEchoBodyStringEnumWithHttpInfo(body, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1026,7 +1026,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (StringEnumRef) with additional information such as HTTP status code, headers - TestEchoBodyStringEnumWithHttpInfo = function(body = NULL, data_file = NULL, parse = TRUE, ...) { + TestEchoBodyStringEnumWithHttpInfo = function(body = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1073,7 +1073,7 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1107,11 +1107,11 @@ BodyApi <- R6::R6Class( #' @param tag (optional) Tag object #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestEchoBodyTagResponseString = function(tag = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestEchoBodyTagResponseStringWithHttpInfo(tag, data_file = data_file, ..., parse = parse) + TestEchoBodyTagResponseString = function(tag = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestEchoBodyTagResponseStringWithHttpInfo(tag, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1131,7 +1131,7 @@ BodyApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestEchoBodyTagResponseStringWithHttpInfo = function(tag = NULL, data_file = NULL, parse = TRUE, ...) { + TestEchoBodyTagResponseStringWithHttpInfo = function(tag = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1178,7 +1178,7 @@ BodyApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } diff --git a/samples/client/echo_api/r/R/form_api.R b/samples/client/echo_api/r/R/form_api.R index d7bca95ba4a7..bee3ea6fd8dd 100644 --- a/samples/client/echo_api/r/R/form_api.R +++ b/samples/client/echo_api/r/R/form_api.R @@ -92,11 +92,11 @@ FormApi <- R6::R6Class( #' @param string_form (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestFormIntegerBooleanString = function(integer_form = NULL, boolean_form = NULL, string_form = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestFormIntegerBooleanStringWithHttpInfo(integer_form, boolean_form, string_form, data_file = data_file, ..., parse = parse) + TestFormIntegerBooleanString = function(integer_form = NULL, boolean_form = NULL, string_form = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestFormIntegerBooleanStringWithHttpInfo(integer_form, boolean_form, string_form, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -118,7 +118,7 @@ FormApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestFormIntegerBooleanStringWithHttpInfo = function(integer_form = NULL, boolean_form = NULL, string_form = NULL, data_file = NULL, parse = TRUE, ...) { + TestFormIntegerBooleanStringWithHttpInfo = function(integer_form = NULL, boolean_form = NULL, string_form = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -170,7 +170,7 @@ FormApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -204,11 +204,11 @@ FormApi <- R6::R6Class( #' @param marker #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestFormObjectMultipart = function(marker, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestFormObjectMultipartWithHttpInfo(marker, data_file = data_file, ..., parse = parse) + TestFormObjectMultipart = function(marker, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestFormObjectMultipartWithHttpInfo(marker, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -228,7 +228,7 @@ FormApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestFormObjectMultipartWithHttpInfo = function(marker, data_file = NULL, parse = TRUE, ...) { + TestFormObjectMultipartWithHttpInfo = function(marker, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -274,7 +274,7 @@ FormApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -313,11 +313,11 @@ FormApi <- R6::R6Class( #' @param name (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestFormOneof = function(form1 = NULL, form2 = NULL, form3 = NULL, form4 = NULL, id = NULL, name = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestFormOneofWithHttpInfo(form1, form2, form3, form4, id, name, data_file = data_file, ..., parse = parse) + TestFormOneof = function(form1 = NULL, form2 = NULL, form3 = NULL, form4 = NULL, id = NULL, name = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestFormOneofWithHttpInfo(form1, form2, form3, form4, id, name, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -342,7 +342,7 @@ FormApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestFormOneofWithHttpInfo = function(form1 = NULL, form2 = NULL, form3 = NULL, form4 = NULL, id = NULL, name = NULL, data_file = NULL, parse = TRUE, ...) { + TestFormOneofWithHttpInfo = function(form1 = NULL, form2 = NULL, form3 = NULL, form4 = NULL, id = NULL, name = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -409,7 +409,7 @@ FormApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } diff --git a/samples/client/echo_api/r/R/header_api.R b/samples/client/echo_api/r/R/header_api.R index 9ee96a46a6c5..d073ea61d575 100644 --- a/samples/client/echo_api/r/R/header_api.R +++ b/samples/client/echo_api/r/R/header_api.R @@ -63,11 +63,11 @@ HeaderApi <- R6::R6Class( #' @param enum_ref_string_header (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestHeaderIntegerBooleanStringEnums = function(integer_header = NULL, boolean_header = NULL, string_header = NULL, enum_nonref_string_header = NULL, enum_ref_string_header = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestHeaderIntegerBooleanStringEnumsWithHttpInfo(integer_header, boolean_header, string_header, enum_nonref_string_header, enum_ref_string_header, data_file = data_file, ..., parse = parse) + TestHeaderIntegerBooleanStringEnums = function(integer_header = NULL, boolean_header = NULL, string_header = NULL, enum_nonref_string_header = NULL, enum_ref_string_header = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestHeaderIntegerBooleanStringEnumsWithHttpInfo(integer_header, boolean_header, string_header, enum_nonref_string_header, enum_ref_string_header, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -91,7 +91,7 @@ HeaderApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestHeaderIntegerBooleanStringEnumsWithHttpInfo = function(integer_header = NULL, boolean_header = NULL, string_header = NULL, enum_nonref_string_header = NULL, enum_ref_string_header = NULL, data_file = NULL, parse = TRUE, ...) { + TestHeaderIntegerBooleanStringEnumsWithHttpInfo = function(integer_header = NULL, boolean_header = NULL, string_header = NULL, enum_nonref_string_header = NULL, enum_ref_string_header = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -158,7 +158,7 @@ HeaderApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } diff --git a/samples/client/echo_api/r/R/path_api.R b/samples/client/echo_api/r/R/path_api.R index 0ed8956b54e3..fc19608ae728 100644 --- a/samples/client/echo_api/r/R/path_api.R +++ b/samples/client/echo_api/r/R/path_api.R @@ -61,11 +61,11 @@ PathApi <- R6::R6Class( #' @param enum_ref_string_path #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath = function(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, data_file = data_file, ..., parse = parse) + TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath = function(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -88,7 +88,7 @@ PathApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo = function(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, data_file = NULL, parse = TRUE, ...) { + TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo = function(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -173,7 +173,7 @@ PathApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } diff --git a/samples/client/echo_api/r/R/query_api.R b/samples/client/echo_api/r/R/query_api.R index b6d0ecbc05d4..92ba08acbf68 100644 --- a/samples/client/echo_api/r/R/query_api.R +++ b/samples/client/echo_api/r/R/query_api.R @@ -202,11 +202,11 @@ QueryApi <- R6::R6Class( #' @param enum_ref_string_query (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestEnumRefString = function(enum_nonref_string_query = NULL, enum_ref_string_query = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestEnumRefStringWithHttpInfo(enum_nonref_string_query, enum_ref_string_query, data_file = data_file, ..., parse = parse) + TestEnumRefString = function(enum_nonref_string_query = NULL, enum_ref_string_query = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestEnumRefStringWithHttpInfo(enum_nonref_string_query, enum_ref_string_query, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -227,7 +227,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestEnumRefStringWithHttpInfo = function(enum_nonref_string_query = NULL, enum_ref_string_query = NULL, data_file = NULL, parse = TRUE, ...) { + TestEnumRefStringWithHttpInfo = function(enum_nonref_string_query = NULL, enum_ref_string_query = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -279,7 +279,7 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -315,11 +315,11 @@ QueryApi <- R6::R6Class( #' @param string_query (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryDatetimeDateString = function(datetime_query = NULL, date_query = NULL, string_query = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestQueryDatetimeDateStringWithHttpInfo(datetime_query, date_query, string_query, data_file = data_file, ..., parse = parse) + TestQueryDatetimeDateString = function(datetime_query = NULL, date_query = NULL, string_query = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestQueryDatetimeDateStringWithHttpInfo(datetime_query, date_query, string_query, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -341,7 +341,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryDatetimeDateStringWithHttpInfo = function(datetime_query = NULL, date_query = NULL, string_query = NULL, data_file = NULL, parse = TRUE, ...) { + TestQueryDatetimeDateStringWithHttpInfo = function(datetime_query = NULL, date_query = NULL, string_query = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -396,7 +396,7 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -432,11 +432,11 @@ QueryApi <- R6::R6Class( #' @param string_query (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryIntegerBooleanString = function(integer_query = NULL, boolean_query = NULL, string_query = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestQueryIntegerBooleanStringWithHttpInfo(integer_query, boolean_query, string_query, data_file = data_file, ..., parse = parse) + TestQueryIntegerBooleanString = function(integer_query = NULL, boolean_query = NULL, string_query = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestQueryIntegerBooleanStringWithHttpInfo(integer_query, boolean_query, string_query, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -458,7 +458,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryIntegerBooleanStringWithHttpInfo = function(integer_query = NULL, boolean_query = NULL, string_query = NULL, data_file = NULL, parse = TRUE, ...) { + TestQueryIntegerBooleanStringWithHttpInfo = function(integer_query = NULL, boolean_query = NULL, string_query = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -513,7 +513,7 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -547,11 +547,11 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleDeepObjectExplodeTrueObject = function(query_object = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(query_object, data_file = data_file, ..., parse = parse) + TestQueryStyleDeepObjectExplodeTrueObject = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo(query_object, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -571,7 +571,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo = function(query_object = NULL, data_file = NULL, parse = TRUE, ...) { + TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -614,7 +614,7 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -648,11 +648,11 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleDeepObjectExplodeTrueObjectAllOf = function(query_object = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(query_object, data_file = data_file, ..., parse = parse) + TestQueryStyleDeepObjectExplodeTrueObjectAllOf = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo(query_object, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -672,7 +672,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo = function(query_object = NULL, data_file = NULL, parse = TRUE, ...) { + TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -715,7 +715,7 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -749,11 +749,11 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleFormExplodeFalseArrayInteger = function(query_object = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(query_object, data_file = data_file, ..., parse = parse) + TestQueryStyleFormExplodeFalseArrayInteger = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo(query_object, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -773,7 +773,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo = function(query_object = NULL, data_file = NULL, parse = TRUE, ...) { + TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -817,7 +817,7 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -851,11 +851,11 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleFormExplodeFalseArrayString = function(query_object = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestQueryStyleFormExplodeFalseArrayStringWithHttpInfo(query_object, data_file = data_file, ..., parse = parse) + TestQueryStyleFormExplodeFalseArrayString = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestQueryStyleFormExplodeFalseArrayStringWithHttpInfo(query_object, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -875,7 +875,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleFormExplodeFalseArrayStringWithHttpInfo = function(query_object = NULL, data_file = NULL, parse = TRUE, ...) { + TestQueryStyleFormExplodeFalseArrayStringWithHttpInfo = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -919,7 +919,7 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -953,11 +953,11 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleFormExplodeTrueArrayString = function(query_object = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo(query_object, data_file = data_file, ..., parse = parse) + TestQueryStyleFormExplodeTrueArrayString = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo(query_object, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -977,7 +977,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo = function(query_object = NULL, data_file = NULL, parse = TRUE, ...) { + TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1020,7 +1020,7 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1054,11 +1054,11 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleFormExplodeTrueObject = function(query_object = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestQueryStyleFormExplodeTrueObjectWithHttpInfo(query_object, data_file = data_file, ..., parse = parse) + TestQueryStyleFormExplodeTrueObject = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestQueryStyleFormExplodeTrueObjectWithHttpInfo(query_object, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1078,7 +1078,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleFormExplodeTrueObjectWithHttpInfo = function(query_object = NULL, data_file = NULL, parse = TRUE, ...) { + TestQueryStyleFormExplodeTrueObjectWithHttpInfo = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1121,7 +1121,7 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1155,11 +1155,11 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleFormExplodeTrueObjectAllOf = function(query_object = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(query_object, data_file = data_file, ..., parse = parse) + TestQueryStyleFormExplodeTrueObjectAllOf = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo(query_object, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1179,7 +1179,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo = function(query_object = NULL, data_file = NULL, parse = TRUE, ...) { + TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1222,7 +1222,7 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1257,11 +1257,11 @@ QueryApi <- R6::R6Class( #' @param json_serialized_object_array_ref_string_query (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - TestQueryStyleJsonSerializationObject = function(json_serialized_object_ref_string_query = NULL, json_serialized_object_array_ref_string_query = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestQueryStyleJsonSerializationObjectWithHttpInfo(json_serialized_object_ref_string_query, json_serialized_object_array_ref_string_query, data_file = data_file, ..., parse = parse) + TestQueryStyleJsonSerializationObject = function(json_serialized_object_ref_string_query = NULL, json_serialized_object_array_ref_string_query = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestQueryStyleJsonSerializationObjectWithHttpInfo(json_serialized_object_ref_string_query, json_serialized_object_array_ref_string_query, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1282,7 +1282,7 @@ QueryApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - TestQueryStyleJsonSerializationObjectWithHttpInfo = function(json_serialized_object_ref_string_query = NULL, json_serialized_object_array_ref_string_query = NULL, data_file = NULL, parse = TRUE, ...) { + TestQueryStyleJsonSerializationObjectWithHttpInfo = function(json_serialized_object_ref_string_query = NULL, json_serialized_object_array_ref_string_query = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1332,7 +1332,7 @@ QueryApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } diff --git a/samples/client/petstore/R-httr2-wrapper/R/fake_api.R b/samples/client/petstore/R-httr2-wrapper/R/fake_api.R index 9d5566d6a995..8d8f46432120 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/fake_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/fake_api.R @@ -188,11 +188,11 @@ FakeApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - add_pet_optional = function(pet = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$add_pet_optional_with_http_info(pet, data_file = data_file, ..., parse = parse) + add_pet_optional = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$add_pet_optional_with_http_info(pet, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -212,7 +212,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - add_pet_optional_with_http_info = function(pet = NULL, data_file = NULL, parse = TRUE, ...) { + add_pet_optional_with_http_info = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -266,7 +266,7 @@ FakeApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -316,11 +316,11 @@ FakeApi <- R6::R6Class( #' @param var_data_file (optional) header data file #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return User - fake_data_file = function(dummy, var_data_file = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$fake_data_file_with_http_info(dummy, var_data_file, data_file = data_file, ..., parse = parse) + fake_data_file = function(dummy, var_data_file = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$fake_data_file_with_http_info(dummy, var_data_file, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -341,7 +341,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (User) with additional information such as HTTP status code, headers - fake_data_file_with_http_info = function(dummy, var_data_file = NULL, data_file = NULL, parse = TRUE, ...) { + fake_data_file_with_http_info = function(dummy, var_data_file = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -403,7 +403,7 @@ FakeApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -451,11 +451,11 @@ FakeApi <- R6::R6Class( #' #' @param path_array dummy path parameter #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_path_array = function(path_array, ..., parse = TRUE) { - local_var_response <- self$fake_path_array_with_http_info(path_array, ..., parse = parse) + fake_path_array = function(path_array, ..., .parse = TRUE) { + local_var_response <- self$fake_path_array_with_http_info(path_array, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -474,7 +474,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - fake_path_array_with_http_info = function(path_array, ...) { + fake_path_array_with_http_info = function(path_array, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -559,11 +559,11 @@ FakeApi <- R6::R6Class( #' #' @param reg_exp_test dummy required parameter #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_regular_expression = function(reg_exp_test, ..., parse = TRUE) { - local_var_response <- self$fake_regular_expression_with_http_info(reg_exp_test, ..., parse = parse) + fake_regular_expression = function(reg_exp_test, ..., .parse = TRUE) { + local_var_response <- self$fake_regular_expression_with_http_info(reg_exp_test, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -582,7 +582,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - fake_regular_expression_with_http_info = function(reg_exp_test, ...) { + fake_regular_expression_with_http_info = function(reg_exp_test, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -672,11 +672,11 @@ FakeApi <- R6::R6Class( #' @param set_dummy set query #' @param array_dummy array query #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_set_query = function(set_dummy, array_dummy, ..., parse = TRUE) { - local_var_response <- self$fake_set_query_with_http_info(set_dummy, array_dummy, ..., parse = parse) + fake_set_query = function(set_dummy, array_dummy, ..., .parse = TRUE) { + local_var_response <- self$fake_set_query_with_http_info(set_dummy, array_dummy, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -696,7 +696,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - fake_set_query_with_http_info = function(set_dummy, array_dummy, ...) { + fake_set_query_with_http_info = function(set_dummy, array_dummy, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() diff --git a/samples/client/petstore/R-httr2-wrapper/R/pet_api.R b/samples/client/petstore/R-httr2-wrapper/R/pet_api.R index d8788ea2f4c7..2f78dfa9dce5 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/pet_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/pet_api.R @@ -391,11 +391,11 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - add_pet = function(pet, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$add_pet_with_http_info(pet, data_file = data_file, ..., parse = parse) + add_pet = function(pet, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$add_pet_with_http_info(pet, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -415,7 +415,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - add_pet_with_http_info = function(pet, data_file = NULL, parse = TRUE, ...) { + add_pet_with_http_info = function(pet, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -476,7 +476,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -525,11 +525,11 @@ PetApi <- R6::R6Class( #' @param pet_id Pet id to delete #' @param api_key (optional) No description #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_pet = function(pet_id, api_key = NULL, ..., parse = TRUE) { - local_var_response <- self$delete_pet_with_http_info(pet_id, api_key, ..., parse = parse) + delete_pet = function(pet_id, api_key = NULL, ..., .parse = TRUE) { + local_var_response <- self$delete_pet_with_http_info(pet_id, api_key, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -549,7 +549,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - delete_pet_with_http_info = function(pet_id, api_key = NULL, ...) { + delete_pet_with_http_info = function(pet_id, api_key = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -647,11 +647,11 @@ PetApi <- R6::R6Class( #' @param status Status values that need to be considered for filter #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return array[Pet] - find_pets_by_status = function(status, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$find_pets_by_status_with_http_info(status, data_file = data_file, ..., parse = parse) + find_pets_by_status = function(status, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$find_pets_by_status_with_http_info(status, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -671,7 +671,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers - find_pets_by_status_with_http_info = function(status, data_file = NULL, parse = TRUE, ...) { + find_pets_by_status_with_http_info = function(status, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -737,7 +737,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -786,11 +786,11 @@ PetApi <- R6::R6Class( #' @param tags Tags to filter by #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return array[Pet] - find_pets_by_tags = function(tags, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$find_pets_by_tags_with_http_info(tags, data_file = data_file, ..., parse = parse) + find_pets_by_tags = function(tags, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$find_pets_by_tags_with_http_info(tags, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -810,7 +810,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers - find_pets_by_tags_with_http_info = function(tags, data_file = NULL, parse = TRUE, ...) { + find_pets_by_tags_with_http_info = function(tags, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -864,7 +864,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -913,11 +913,11 @@ PetApi <- R6::R6Class( #' @param pet_id ID of pet to return #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - get_pet_by_id = function(pet_id, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$get_pet_by_id_with_http_info(pet_id, data_file = data_file, ..., parse = parse) + get_pet_by_id = function(pet_id, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$get_pet_by_id_with_http_info(pet_id, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -937,7 +937,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - get_pet_by_id_with_http_info = function(pet_id, data_file = NULL, parse = TRUE, ...) { + get_pet_by_id_with_http_info = function(pet_id, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -996,7 +996,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1046,11 +1046,11 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - get_pet_by_id_streaming = function(pet_id, stream_callback = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$get_pet_by_id_streaming_with_http_info(pet_id, stream_callback = stream_callback, data_file = data_file, ..., parse = parse) + get_pet_by_id_streaming = function(pet_id, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$get_pet_by_id_streaming_with_http_info(pet_id, stream_callback = stream_callback, data_file = data_file, ..., .parse = .parse) if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) } @@ -1075,7 +1075,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - get_pet_by_id_streaming_with_http_info = function(pet_id, stream_callback = NULL, data_file = NULL, parse = TRUE, ...) { + get_pet_by_id_streaming_with_http_info = function(pet_id, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1139,7 +1139,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1189,11 +1189,11 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - test_header = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$test_header_with_http_info(header_test_int, stream_callback = stream_callback, data_file = data_file, ..., parse = parse) + test_header = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$test_header_with_http_info(header_test_int, stream_callback = stream_callback, data_file = data_file, ..., .parse = .parse) if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) } @@ -1218,7 +1218,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - test_header_with_http_info = function(header_test_int, stream_callback = NULL, data_file = NULL, parse = TRUE, ...) { + test_header_with_http_info = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1280,7 +1280,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1329,11 +1329,11 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - update_pet = function(pet, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$update_pet_with_http_info(pet, data_file = data_file, ..., parse = parse) + update_pet = function(pet, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$update_pet_with_http_info(pet, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1353,7 +1353,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - update_pet_with_http_info = function(pet, data_file = NULL, parse = TRUE, ...) { + update_pet_with_http_info = function(pet, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1413,7 +1413,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1463,11 +1463,11 @@ PetApi <- R6::R6Class( #' @param name (optional) Updated name of the pet #' @param status (optional) Updated status of the pet #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - update_pet_with_form = function(pet_id, name = NULL, status = NULL, ..., parse = TRUE) { - local_var_response <- self$update_pet_with_form_with_http_info(pet_id, name, status, ..., parse = parse) + update_pet_with_form = function(pet_id, name = NULL, status = NULL, ..., .parse = TRUE) { + local_var_response <- self$update_pet_with_form_with_http_info(pet_id, name, status, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1488,7 +1488,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - update_pet_with_form_with_http_info = function(pet_id, name = NULL, status = NULL, ...) { + update_pet_with_form_with_http_info = function(pet_id, name = NULL, status = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1592,11 +1592,11 @@ PetApi <- R6::R6Class( #' @param file (optional) file to upload #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return ModelApiResponse - upload_file = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$upload_file_with_http_info(pet_id, additional_metadata, file, data_file = data_file, ..., parse = parse) + upload_file = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$upload_file_with_http_info(pet_id, additional_metadata, file, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1618,7 +1618,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (ModelApiResponse) with additional information such as HTTP status code, headers - upload_file_with_http_info = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, parse = TRUE, ...) { + upload_file_with_http_info = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1692,7 +1692,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } diff --git a/samples/client/petstore/R-httr2-wrapper/R/store_api.R b/samples/client/petstore/R-httr2-wrapper/R/store_api.R index b11f22341714..c2554c6b6bdf 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/store_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/store_api.R @@ -166,11 +166,11 @@ StoreApi <- R6::R6Class( #' #' @param order_id ID of the order that needs to be deleted #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_order = function(order_id, ..., parse = TRUE) { - local_var_response <- self$delete_order_with_http_info(order_id, ..., parse = parse) + delete_order = function(order_id, ..., .parse = TRUE) { + local_var_response <- self$delete_order_with_http_info(order_id, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -189,7 +189,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - delete_order_with_http_info = function(order_id, ...) { + delete_order_with_http_info = function(order_id, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -274,11 +274,11 @@ StoreApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return map(integer) - get_inventory = function(data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$get_inventory_with_http_info(data_file = data_file, ..., parse = parse) + get_inventory = function(data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$get_inventory_with_http_info(data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -297,7 +297,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (map(integer)) with additional information such as HTTP status code, headers - get_inventory_with_http_info = function(data_file = NULL, parse = TRUE, ...) { + get_inventory_with_http_info = function(data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -338,7 +338,7 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -387,11 +387,11 @@ StoreApi <- R6::R6Class( #' @param order_id ID of pet that needs to be fetched #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Order - get_order_by_id = function(order_id, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$get_order_by_id_with_http_info(order_id, data_file = data_file, ..., parse = parse) + get_order_by_id = function(order_id, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$get_order_by_id_with_http_info(order_id, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -411,7 +411,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Order) with additional information such as HTTP status code, headers - get_order_by_id_with_http_info = function(order_id, data_file = NULL, parse = TRUE, ...) { + get_order_by_id_with_http_info = function(order_id, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -478,7 +478,7 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -527,11 +527,11 @@ StoreApi <- R6::R6Class( #' @param order order placed for purchasing the pet #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Order - place_order = function(order, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$place_order_with_http_info(order, data_file = data_file, ..., parse = parse) + place_order = function(order, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$place_order_with_http_info(order, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -551,7 +551,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Order) with additional information such as HTTP status code, headers - place_order_with_http_info = function(order, data_file = NULL, parse = TRUE, ...) { + place_order_with_http_info = function(order, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -608,7 +608,7 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } diff --git a/samples/client/petstore/R-httr2-wrapper/R/user_api.R b/samples/client/petstore/R-httr2-wrapper/R/user_api.R index 88b0ae0b5b1c..0f257899ddc9 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/user_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/user_api.R @@ -275,11 +275,11 @@ UserApi <- R6::R6Class( #' #' @param user Created user object #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_user = function(user, ..., parse = TRUE) { - local_var_response <- self$create_user_with_http_info(user, ..., parse = parse) + create_user = function(user, ..., .parse = TRUE) { + local_var_response <- self$create_user_with_http_info(user, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -298,7 +298,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - create_user_with_http_info = function(user, ...) { + create_user_with_http_info = function(user, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -389,11 +389,11 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_users_with_array_input = function(user, ..., parse = TRUE) { - local_var_response <- self$create_users_with_array_input_with_http_info(user, ..., parse = parse) + create_users_with_array_input = function(user, ..., .parse = TRUE) { + local_var_response <- self$create_users_with_array_input_with_http_info(user, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -412,7 +412,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - create_users_with_array_input_with_http_info = function(user, ...) { + create_users_with_array_input_with_http_info = function(user, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -506,11 +506,11 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_users_with_list_input = function(user, ..., parse = TRUE) { - local_var_response <- self$create_users_with_list_input_with_http_info(user, ..., parse = parse) + create_users_with_list_input = function(user, ..., .parse = TRUE) { + local_var_response <- self$create_users_with_list_input_with_http_info(user, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -529,7 +529,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - create_users_with_list_input_with_http_info = function(user, ...) { + create_users_with_list_input_with_http_info = function(user, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -623,11 +623,11 @@ UserApi <- R6::R6Class( #' #' @param username The name that needs to be deleted #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_user = function(username, ..., parse = TRUE) { - local_var_response <- self$delete_user_with_http_info(username, ..., parse = parse) + delete_user = function(username, ..., .parse = TRUE) { + local_var_response <- self$delete_user_with_http_info(username, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -646,7 +646,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - delete_user_with_http_info = function(username, ...) { + delete_user_with_http_info = function(username, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -736,11 +736,11 @@ UserApi <- R6::R6Class( #' @param username The name that needs to be fetched. Use user1 for testing. #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return User - get_user_by_name = function(username, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$get_user_by_name_with_http_info(username, data_file = data_file, ..., parse = parse) + get_user_by_name = function(username, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$get_user_by_name_with_http_info(username, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -760,7 +760,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (User) with additional information such as HTTP status code, headers - get_user_by_name_with_http_info = function(username, data_file = NULL, parse = TRUE, ...) { + get_user_by_name_with_http_info = function(username, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -815,7 +815,7 @@ UserApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -865,11 +865,11 @@ UserApi <- R6::R6Class( #' @param password The password for login in clear text #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - login_user = function(username, password, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$login_user_with_http_info(username, password, data_file = data_file, ..., parse = parse) + login_user = function(username, password, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$login_user_with_http_info(username, password, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -890,7 +890,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - login_user_with_http_info = function(username, password, data_file = NULL, parse = TRUE, ...) { + login_user_with_http_info = function(username, password, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -965,7 +965,7 @@ UserApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1012,11 +1012,11 @@ UserApi <- R6::R6Class( #' Logs out current logged in user session #' #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - logout_user = function(..., parse = TRUE) { - local_var_response <- self$logout_user_with_http_info(..., parse = parse) + logout_user = function(..., .parse = TRUE) { + local_var_response <- self$logout_user_with_http_info(..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1034,7 +1034,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - logout_user_with_http_info = function(...) { + logout_user_with_http_info = function(..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1106,11 +1106,11 @@ UserApi <- R6::R6Class( #' @param username name that need to be deleted #' @param user Updated user object #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - update_user = function(username, user, ..., parse = TRUE) { - local_var_response <- self$update_user_with_http_info(username, user, ..., parse = parse) + update_user = function(username, user, ..., .parse = TRUE) { + local_var_response <- self$update_user_with_http_info(username, user, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1130,7 +1130,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - update_user_with_http_info = function(username, user, ...) { + update_user_with_http_info = function(username, user, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() diff --git a/samples/client/petstore/R-httr2/R/fake_api.R b/samples/client/petstore/R-httr2/R/fake_api.R index db6412d52c65..79edc8ad284c 100644 --- a/samples/client/petstore/R-httr2/R/fake_api.R +++ b/samples/client/petstore/R-httr2/R/fake_api.R @@ -188,11 +188,11 @@ FakeApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - add_pet_optional = function(pet = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$add_pet_optional_with_http_info(pet, data_file = data_file, ..., parse = parse) + add_pet_optional = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$add_pet_optional_with_http_info(pet, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -212,7 +212,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - add_pet_optional_with_http_info = function(pet = NULL, data_file = NULL, parse = TRUE, ...) { + add_pet_optional_with_http_info = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -266,7 +266,7 @@ FakeApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -316,11 +316,11 @@ FakeApi <- R6::R6Class( #' @param var_data_file (optional) header data file #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return User - fake_data_file = function(dummy, var_data_file = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$fake_data_file_with_http_info(dummy, var_data_file, data_file = data_file, ..., parse = parse) + fake_data_file = function(dummy, var_data_file = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$fake_data_file_with_http_info(dummy, var_data_file, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -341,7 +341,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (User) with additional information such as HTTP status code, headers - fake_data_file_with_http_info = function(dummy, var_data_file = NULL, data_file = NULL, parse = TRUE, ...) { + fake_data_file_with_http_info = function(dummy, var_data_file = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -403,7 +403,7 @@ FakeApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -451,11 +451,11 @@ FakeApi <- R6::R6Class( #' #' @param path_array_parameter dummy path parameter #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_path_array = function(path_array_parameter, ..., parse = TRUE) { - local_var_response <- self$fake_path_array_with_http_info(path_array_parameter, ..., parse = parse) + fake_path_array = function(path_array_parameter, ..., .parse = TRUE) { + local_var_response <- self$fake_path_array_with_http_info(path_array_parameter, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -474,7 +474,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - fake_path_array_with_http_info = function(path_array_parameter, ...) { + fake_path_array_with_http_info = function(path_array_parameter, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -559,11 +559,11 @@ FakeApi <- R6::R6Class( #' #' @param reg_exp_test dummy required parameter #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_regular_expression = function(reg_exp_test, ..., parse = TRUE) { - local_var_response <- self$fake_regular_expression_with_http_info(reg_exp_test, ..., parse = parse) + fake_regular_expression = function(reg_exp_test, ..., .parse = TRUE) { + local_var_response <- self$fake_regular_expression_with_http_info(reg_exp_test, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -582,7 +582,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - fake_regular_expression_with_http_info = function(reg_exp_test, ...) { + fake_regular_expression_with_http_info = function(reg_exp_test, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -672,11 +672,11 @@ FakeApi <- R6::R6Class( #' @param set_dummy set query #' @param array_dummy array query #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_set_query = function(set_dummy, array_dummy, ..., parse = TRUE) { - local_var_response <- self$fake_set_query_with_http_info(set_dummy, array_dummy, ..., parse = parse) + fake_set_query = function(set_dummy, array_dummy, ..., .parse = TRUE) { + local_var_response <- self$fake_set_query_with_http_info(set_dummy, array_dummy, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -696,7 +696,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - fake_set_query_with_http_info = function(set_dummy, array_dummy, ...) { + fake_set_query_with_http_info = function(set_dummy, array_dummy, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() diff --git a/samples/client/petstore/R-httr2/R/pet_api.R b/samples/client/petstore/R-httr2/R/pet_api.R index 8a3ed661c0f2..f94abedee245 100644 --- a/samples/client/petstore/R-httr2/R/pet_api.R +++ b/samples/client/petstore/R-httr2/R/pet_api.R @@ -391,11 +391,11 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - add_pet = function(pet, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$add_pet_with_http_info(pet, data_file = data_file, ..., parse = parse) + add_pet = function(pet, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$add_pet_with_http_info(pet, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -415,7 +415,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - add_pet_with_http_info = function(pet, data_file = NULL, parse = TRUE, ...) { + add_pet_with_http_info = function(pet, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -476,7 +476,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -525,11 +525,11 @@ PetApi <- R6::R6Class( #' @param pet_id Pet id to delete #' @param api_key (optional) No description #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_pet = function(pet_id, api_key = NULL, ..., parse = TRUE) { - local_var_response <- self$delete_pet_with_http_info(pet_id, api_key, ..., parse = parse) + delete_pet = function(pet_id, api_key = NULL, ..., .parse = TRUE) { + local_var_response <- self$delete_pet_with_http_info(pet_id, api_key, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -549,7 +549,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - delete_pet_with_http_info = function(pet_id, api_key = NULL, ...) { + delete_pet_with_http_info = function(pet_id, api_key = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -647,11 +647,11 @@ PetApi <- R6::R6Class( #' @param status Status values that need to be considered for filter #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return array[Pet] - find_pets_by_status = function(status, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$find_pets_by_status_with_http_info(status, data_file = data_file, ..., parse = parse) + find_pets_by_status = function(status, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$find_pets_by_status_with_http_info(status, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -671,7 +671,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers - find_pets_by_status_with_http_info = function(status, data_file = NULL, parse = TRUE, ...) { + find_pets_by_status_with_http_info = function(status, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -737,7 +737,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -786,11 +786,11 @@ PetApi <- R6::R6Class( #' @param tags Tags to filter by #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return array[Pet] - find_pets_by_tags = function(tags, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$find_pets_by_tags_with_http_info(tags, data_file = data_file, ..., parse = parse) + find_pets_by_tags = function(tags, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$find_pets_by_tags_with_http_info(tags, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -810,7 +810,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers - find_pets_by_tags_with_http_info = function(tags, data_file = NULL, parse = TRUE, ...) { + find_pets_by_tags_with_http_info = function(tags, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -864,7 +864,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -913,11 +913,11 @@ PetApi <- R6::R6Class( #' @param pet_id ID of pet to return #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - get_pet_by_id = function(pet_id, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$get_pet_by_id_with_http_info(pet_id, data_file = data_file, ..., parse = parse) + get_pet_by_id = function(pet_id, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$get_pet_by_id_with_http_info(pet_id, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -937,7 +937,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - get_pet_by_id_with_http_info = function(pet_id, data_file = NULL, parse = TRUE, ...) { + get_pet_by_id_with_http_info = function(pet_id, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -996,7 +996,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1046,11 +1046,11 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - get_pet_by_id_streaming = function(pet_id, stream_callback = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$get_pet_by_id_streaming_with_http_info(pet_id, stream_callback = stream_callback, data_file = data_file, ..., parse = parse) + get_pet_by_id_streaming = function(pet_id, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$get_pet_by_id_streaming_with_http_info(pet_id, stream_callback = stream_callback, data_file = data_file, ..., .parse = .parse) if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) } @@ -1075,7 +1075,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - get_pet_by_id_streaming_with_http_info = function(pet_id, stream_callback = NULL, data_file = NULL, parse = TRUE, ...) { + get_pet_by_id_streaming_with_http_info = function(pet_id, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1139,7 +1139,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1189,11 +1189,11 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - test_header = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$test_header_with_http_info(header_test_int, stream_callback = stream_callback, data_file = data_file, ..., parse = parse) + test_header = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$test_header_with_http_info(header_test_int, stream_callback = stream_callback, data_file = data_file, ..., .parse = .parse) if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) } @@ -1218,7 +1218,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - test_header_with_http_info = function(header_test_int, stream_callback = NULL, data_file = NULL, parse = TRUE, ...) { + test_header_with_http_info = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1280,7 +1280,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1329,11 +1329,11 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - update_pet = function(pet, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$update_pet_with_http_info(pet, data_file = data_file, ..., parse = parse) + update_pet = function(pet, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$update_pet_with_http_info(pet, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1353,7 +1353,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - update_pet_with_http_info = function(pet, data_file = NULL, parse = TRUE, ...) { + update_pet_with_http_info = function(pet, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1413,7 +1413,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1463,11 +1463,11 @@ PetApi <- R6::R6Class( #' @param name (optional) Updated name of the pet #' @param status (optional) Updated status of the pet #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - update_pet_with_form = function(pet_id, name = NULL, status = NULL, ..., parse = TRUE) { - local_var_response <- self$update_pet_with_form_with_http_info(pet_id, name, status, ..., parse = parse) + update_pet_with_form = function(pet_id, name = NULL, status = NULL, ..., .parse = TRUE) { + local_var_response <- self$update_pet_with_form_with_http_info(pet_id, name, status, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1488,7 +1488,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - update_pet_with_form_with_http_info = function(pet_id, name = NULL, status = NULL, ...) { + update_pet_with_form_with_http_info = function(pet_id, name = NULL, status = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1592,11 +1592,11 @@ PetApi <- R6::R6Class( #' @param file (optional) file to upload #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return ModelApiResponse - upload_file = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$upload_file_with_http_info(pet_id, additional_metadata, file, data_file = data_file, ..., parse = parse) + upload_file = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$upload_file_with_http_info(pet_id, additional_metadata, file, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1618,7 +1618,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (ModelApiResponse) with additional information such as HTTP status code, headers - upload_file_with_http_info = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, parse = TRUE, ...) { + upload_file_with_http_info = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1692,7 +1692,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } diff --git a/samples/client/petstore/R-httr2/R/store_api.R b/samples/client/petstore/R-httr2/R/store_api.R index 72364d52c6f5..711bd25283e1 100644 --- a/samples/client/petstore/R-httr2/R/store_api.R +++ b/samples/client/petstore/R-httr2/R/store_api.R @@ -166,11 +166,11 @@ StoreApi <- R6::R6Class( #' #' @param order_id ID of the order that needs to be deleted #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_order = function(order_id, ..., parse = TRUE) { - local_var_response <- self$delete_order_with_http_info(order_id, ..., parse = parse) + delete_order = function(order_id, ..., .parse = TRUE) { + local_var_response <- self$delete_order_with_http_info(order_id, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -189,7 +189,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - delete_order_with_http_info = function(order_id, ...) { + delete_order_with_http_info = function(order_id, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -274,11 +274,11 @@ StoreApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return map(integer) - get_inventory = function(data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$get_inventory_with_http_info(data_file = data_file, ..., parse = parse) + get_inventory = function(data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$get_inventory_with_http_info(data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -297,7 +297,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (map(integer)) with additional information such as HTTP status code, headers - get_inventory_with_http_info = function(data_file = NULL, parse = TRUE, ...) { + get_inventory_with_http_info = function(data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -338,7 +338,7 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -387,11 +387,11 @@ StoreApi <- R6::R6Class( #' @param order_id ID of pet that needs to be fetched #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Order - get_order_by_id = function(order_id, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$get_order_by_id_with_http_info(order_id, data_file = data_file, ..., parse = parse) + get_order_by_id = function(order_id, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$get_order_by_id_with_http_info(order_id, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -411,7 +411,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Order) with additional information such as HTTP status code, headers - get_order_by_id_with_http_info = function(order_id, data_file = NULL, parse = TRUE, ...) { + get_order_by_id_with_http_info = function(order_id, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -478,7 +478,7 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -527,11 +527,11 @@ StoreApi <- R6::R6Class( #' @param order order placed for purchasing the pet #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Order - place_order = function(order, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$place_order_with_http_info(order, data_file = data_file, ..., parse = parse) + place_order = function(order, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$place_order_with_http_info(order, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -551,7 +551,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Order) with additional information such as HTTP status code, headers - place_order_with_http_info = function(order, data_file = NULL, parse = TRUE, ...) { + place_order_with_http_info = function(order, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -608,7 +608,7 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } diff --git a/samples/client/petstore/R-httr2/R/user_api.R b/samples/client/petstore/R-httr2/R/user_api.R index 4e81600af64c..3a138a044a07 100644 --- a/samples/client/petstore/R-httr2/R/user_api.R +++ b/samples/client/petstore/R-httr2/R/user_api.R @@ -275,11 +275,11 @@ UserApi <- R6::R6Class( #' #' @param user Created user object #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_user = function(user, ..., parse = TRUE) { - local_var_response <- self$create_user_with_http_info(user, ..., parse = parse) + create_user = function(user, ..., .parse = TRUE) { + local_var_response <- self$create_user_with_http_info(user, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -298,7 +298,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - create_user_with_http_info = function(user, ...) { + create_user_with_http_info = function(user, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -389,11 +389,11 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_users_with_array_input = function(user, ..., parse = TRUE) { - local_var_response <- self$create_users_with_array_input_with_http_info(user, ..., parse = parse) + create_users_with_array_input = function(user, ..., .parse = TRUE) { + local_var_response <- self$create_users_with_array_input_with_http_info(user, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -412,7 +412,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - create_users_with_array_input_with_http_info = function(user, ...) { + create_users_with_array_input_with_http_info = function(user, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -506,11 +506,11 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_users_with_list_input = function(user, ..., parse = TRUE) { - local_var_response <- self$create_users_with_list_input_with_http_info(user, ..., parse = parse) + create_users_with_list_input = function(user, ..., .parse = TRUE) { + local_var_response <- self$create_users_with_list_input_with_http_info(user, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -529,7 +529,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - create_users_with_list_input_with_http_info = function(user, ...) { + create_users_with_list_input_with_http_info = function(user, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -623,11 +623,11 @@ UserApi <- R6::R6Class( #' #' @param username The name that needs to be deleted #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_user = function(username, ..., parse = TRUE) { - local_var_response <- self$delete_user_with_http_info(username, ..., parse = parse) + delete_user = function(username, ..., .parse = TRUE) { + local_var_response <- self$delete_user_with_http_info(username, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -646,7 +646,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - delete_user_with_http_info = function(username, ...) { + delete_user_with_http_info = function(username, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -736,11 +736,11 @@ UserApi <- R6::R6Class( #' @param username The name that needs to be fetched. Use user1 for testing. #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return User - get_user_by_name = function(username, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$get_user_by_name_with_http_info(username, data_file = data_file, ..., parse = parse) + get_user_by_name = function(username, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$get_user_by_name_with_http_info(username, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -760,7 +760,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (User) with additional information such as HTTP status code, headers - get_user_by_name_with_http_info = function(username, data_file = NULL, parse = TRUE, ...) { + get_user_by_name_with_http_info = function(username, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -815,7 +815,7 @@ UserApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -865,11 +865,11 @@ UserApi <- R6::R6Class( #' @param password The password for login in clear text #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - login_user = function(username, password, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$login_user_with_http_info(username, password, data_file = data_file, ..., parse = parse) + login_user = function(username, password, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$login_user_with_http_info(username, password, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -890,7 +890,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - login_user_with_http_info = function(username, password, data_file = NULL, parse = TRUE, ...) { + login_user_with_http_info = function(username, password, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -965,7 +965,7 @@ UserApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1012,11 +1012,11 @@ UserApi <- R6::R6Class( #' Logs out current logged in user session #' #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - logout_user = function(..., parse = TRUE) { - local_var_response <- self$logout_user_with_http_info(..., parse = parse) + logout_user = function(..., .parse = TRUE) { + local_var_response <- self$logout_user_with_http_info(..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1034,7 +1034,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - logout_user_with_http_info = function(...) { + logout_user_with_http_info = function(..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1106,11 +1106,11 @@ UserApi <- R6::R6Class( #' @param username name that need to be deleted #' @param user Updated user object #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - update_user = function(username, user, ..., parse = TRUE) { - local_var_response <- self$update_user_with_http_info(username, user, ..., parse = parse) + update_user = function(username, user, ..., .parse = TRUE) { + local_var_response <- self$update_user_with_http_info(username, user, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1130,7 +1130,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - update_user_with_http_info = function(username, user, ...) { + update_user_with_http_info = function(username, user, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() diff --git a/samples/client/petstore/R/R/fake_api.R b/samples/client/petstore/R/R/fake_api.R index 4a3c768f4feb..a454aed8ee10 100644 --- a/samples/client/petstore/R/R/fake_api.R +++ b/samples/client/petstore/R/R/fake_api.R @@ -188,11 +188,11 @@ FakeApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - AddPetOptional = function(pet = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$AddPetOptionalWithHttpInfo(pet, data_file = data_file, ..., parse = parse) + AddPetOptional = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$AddPetOptionalWithHttpInfo(pet, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -212,7 +212,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - AddPetOptionalWithHttpInfo = function(pet = NULL, data_file = NULL, parse = TRUE, ...) { + AddPetOptionalWithHttpInfo = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -266,7 +266,7 @@ FakeApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -316,11 +316,11 @@ FakeApi <- R6::R6Class( #' @param var_data_file (optional) header data file #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return User - FakeDataFile = function(dummy, var_data_file = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$FakeDataFileWithHttpInfo(dummy, var_data_file, data_file = data_file, ..., parse = parse) + FakeDataFile = function(dummy, var_data_file = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$FakeDataFileWithHttpInfo(dummy, var_data_file, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -341,7 +341,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (User) with additional information such as HTTP status code, headers - FakeDataFileWithHttpInfo = function(dummy, var_data_file = NULL, data_file = NULL, parse = TRUE, ...) { + FakeDataFileWithHttpInfo = function(dummy, var_data_file = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -403,7 +403,7 @@ FakeApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -451,11 +451,11 @@ FakeApi <- R6::R6Class( #' #' @param path_array dummy path parameter #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - FakePathArray = function(path_array, ..., parse = TRUE) { - local_var_response <- self$FakePathArrayWithHttpInfo(path_array, ..., parse = parse) + FakePathArray = function(path_array, ..., .parse = TRUE) { + local_var_response <- self$FakePathArrayWithHttpInfo(path_array, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -474,7 +474,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - FakePathArrayWithHttpInfo = function(path_array, ...) { + FakePathArrayWithHttpInfo = function(path_array, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -559,11 +559,11 @@ FakeApi <- R6::R6Class( #' #' @param reg_exp_test dummy required parameter #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - FakeRegularExpression = function(reg_exp_test, ..., parse = TRUE) { - local_var_response <- self$FakeRegularExpressionWithHttpInfo(reg_exp_test, ..., parse = parse) + FakeRegularExpression = function(reg_exp_test, ..., .parse = TRUE) { + local_var_response <- self$FakeRegularExpressionWithHttpInfo(reg_exp_test, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -582,7 +582,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - FakeRegularExpressionWithHttpInfo = function(reg_exp_test, ...) { + FakeRegularExpressionWithHttpInfo = function(reg_exp_test, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -672,11 +672,11 @@ FakeApi <- R6::R6Class( #' @param set_dummy set query #' @param array_dummy array query #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - FakeSetQuery = function(set_dummy, array_dummy, ..., parse = TRUE) { - local_var_response <- self$FakeSetQueryWithHttpInfo(set_dummy, array_dummy, ..., parse = parse) + FakeSetQuery = function(set_dummy, array_dummy, ..., .parse = TRUE) { + local_var_response <- self$FakeSetQueryWithHttpInfo(set_dummy, array_dummy, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -696,7 +696,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - FakeSetQueryWithHttpInfo = function(set_dummy, array_dummy, ...) { + FakeSetQueryWithHttpInfo = function(set_dummy, array_dummy, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() diff --git a/samples/client/petstore/R/R/pet_api.R b/samples/client/petstore/R/R/pet_api.R index 83f658d1298b..10ea468deefd 100644 --- a/samples/client/petstore/R/R/pet_api.R +++ b/samples/client/petstore/R/R/pet_api.R @@ -391,11 +391,11 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - AddPet = function(pet, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$AddPetWithHttpInfo(pet, data_file = data_file, ..., parse = parse) + AddPet = function(pet, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$AddPetWithHttpInfo(pet, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -415,7 +415,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - AddPetWithHttpInfo = function(pet, data_file = NULL, parse = TRUE, ...) { + AddPetWithHttpInfo = function(pet, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -476,7 +476,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -525,11 +525,11 @@ PetApi <- R6::R6Class( #' @param pet_id Pet id to delete #' @param api_key (optional) No description #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - DeletePet = function(pet_id, api_key = NULL, ..., parse = TRUE) { - local_var_response <- self$DeletePetWithHttpInfo(pet_id, api_key, ..., parse = parse) + DeletePet = function(pet_id, api_key = NULL, ..., .parse = TRUE) { + local_var_response <- self$DeletePetWithHttpInfo(pet_id, api_key, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -549,7 +549,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - DeletePetWithHttpInfo = function(pet_id, api_key = NULL, ...) { + DeletePetWithHttpInfo = function(pet_id, api_key = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -647,11 +647,11 @@ PetApi <- R6::R6Class( #' @param status Status values that need to be considered for filter #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return array[Pet] - FindPetsByStatus = function(status, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$FindPetsByStatusWithHttpInfo(status, data_file = data_file, ..., parse = parse) + FindPetsByStatus = function(status, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$FindPetsByStatusWithHttpInfo(status, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -671,7 +671,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers - FindPetsByStatusWithHttpInfo = function(status, data_file = NULL, parse = TRUE, ...) { + FindPetsByStatusWithHttpInfo = function(status, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -737,7 +737,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -786,11 +786,11 @@ PetApi <- R6::R6Class( #' @param tags Tags to filter by #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return array[Pet] - FindPetsByTags = function(tags, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$FindPetsByTagsWithHttpInfo(tags, data_file = data_file, ..., parse = parse) + FindPetsByTags = function(tags, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$FindPetsByTagsWithHttpInfo(tags, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -810,7 +810,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers - FindPetsByTagsWithHttpInfo = function(tags, data_file = NULL, parse = TRUE, ...) { + FindPetsByTagsWithHttpInfo = function(tags, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -864,7 +864,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -913,11 +913,11 @@ PetApi <- R6::R6Class( #' @param pet_id ID of pet to return #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - GetPetById = function(pet_id, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$GetPetByIdWithHttpInfo(pet_id, data_file = data_file, ..., parse = parse) + GetPetById = function(pet_id, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$GetPetByIdWithHttpInfo(pet_id, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -937,7 +937,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - GetPetByIdWithHttpInfo = function(pet_id, data_file = NULL, parse = TRUE, ...) { + GetPetByIdWithHttpInfo = function(pet_id, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -996,7 +996,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1046,11 +1046,11 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - GetPetByIdStreaming = function(pet_id, stream_callback = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$GetPetByIdStreamingWithHttpInfo(pet_id, stream_callback = stream_callback, data_file = data_file, ..., parse = parse) + GetPetByIdStreaming = function(pet_id, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$GetPetByIdStreamingWithHttpInfo(pet_id, stream_callback = stream_callback, data_file = data_file, ..., .parse = .parse) if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) } @@ -1075,7 +1075,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - GetPetByIdStreamingWithHttpInfo = function(pet_id, stream_callback = NULL, data_file = NULL, parse = TRUE, ...) { + GetPetByIdStreamingWithHttpInfo = function(pet_id, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1139,7 +1139,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1189,11 +1189,11 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - TestHeader = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$TestHeaderWithHttpInfo(header_test_int, stream_callback = stream_callback, data_file = data_file, ..., parse = parse) + TestHeader = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$TestHeaderWithHttpInfo(header_test_int, stream_callback = stream_callback, data_file = data_file, ..., .parse = .parse) if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) } @@ -1218,7 +1218,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - TestHeaderWithHttpInfo = function(header_test_int, stream_callback = NULL, data_file = NULL, parse = TRUE, ...) { + TestHeaderWithHttpInfo = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1280,7 +1280,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1329,11 +1329,11 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Pet - UpdatePet = function(pet, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$UpdatePetWithHttpInfo(pet, data_file = data_file, ..., parse = parse) + UpdatePet = function(pet, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$UpdatePetWithHttpInfo(pet, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1353,7 +1353,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Pet) with additional information such as HTTP status code, headers - UpdatePetWithHttpInfo = function(pet, data_file = NULL, parse = TRUE, ...) { + UpdatePetWithHttpInfo = function(pet, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1413,7 +1413,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1463,11 +1463,11 @@ PetApi <- R6::R6Class( #' @param name (optional) Updated name of the pet #' @param status (optional) Updated status of the pet #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - UpdatePetWithForm = function(pet_id, name = NULL, status = NULL, ..., parse = TRUE) { - local_var_response <- self$UpdatePetWithFormWithHttpInfo(pet_id, name, status, ..., parse = parse) + UpdatePetWithForm = function(pet_id, name = NULL, status = NULL, ..., .parse = TRUE) { + local_var_response <- self$UpdatePetWithFormWithHttpInfo(pet_id, name, status, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1488,7 +1488,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - UpdatePetWithFormWithHttpInfo = function(pet_id, name = NULL, status = NULL, ...) { + UpdatePetWithFormWithHttpInfo = function(pet_id, name = NULL, status = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1592,11 +1592,11 @@ PetApi <- R6::R6Class( #' @param file (optional) file to upload #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return ModelApiResponse - UploadFile = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$UploadFileWithHttpInfo(pet_id, additional_metadata, file, data_file = data_file, ..., parse = parse) + UploadFile = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$UploadFileWithHttpInfo(pet_id, additional_metadata, file, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1618,7 +1618,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (ModelApiResponse) with additional information such as HTTP status code, headers - UploadFileWithHttpInfo = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, parse = TRUE, ...) { + UploadFileWithHttpInfo = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1692,7 +1692,7 @@ PetApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } diff --git a/samples/client/petstore/R/R/store_api.R b/samples/client/petstore/R/R/store_api.R index 0f92c1b50aa9..d45b85e9986f 100644 --- a/samples/client/petstore/R/R/store_api.R +++ b/samples/client/petstore/R/R/store_api.R @@ -166,11 +166,11 @@ StoreApi <- R6::R6Class( #' #' @param order_id ID of the order that needs to be deleted #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - DeleteOrder = function(order_id, ..., parse = TRUE) { - local_var_response <- self$DeleteOrderWithHttpInfo(order_id, ..., parse = parse) + DeleteOrder = function(order_id, ..., .parse = TRUE) { + local_var_response <- self$DeleteOrderWithHttpInfo(order_id, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -189,7 +189,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - DeleteOrderWithHttpInfo = function(order_id, ...) { + DeleteOrderWithHttpInfo = function(order_id, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -274,11 +274,11 @@ StoreApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return map(integer) - GetInventory = function(data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$GetInventoryWithHttpInfo(data_file = data_file, ..., parse = parse) + GetInventory = function(data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$GetInventoryWithHttpInfo(data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -297,7 +297,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (map(integer)) with additional information such as HTTP status code, headers - GetInventoryWithHttpInfo = function(data_file = NULL, parse = TRUE, ...) { + GetInventoryWithHttpInfo = function(data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -338,7 +338,7 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -387,11 +387,11 @@ StoreApi <- R6::R6Class( #' @param order_id ID of pet that needs to be fetched #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Order - GetOrderById = function(order_id, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$GetOrderByIdWithHttpInfo(order_id, data_file = data_file, ..., parse = parse) + GetOrderById = function(order_id, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$GetOrderByIdWithHttpInfo(order_id, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -411,7 +411,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Order) with additional information such as HTTP status code, headers - GetOrderByIdWithHttpInfo = function(order_id, data_file = NULL, parse = TRUE, ...) { + GetOrderByIdWithHttpInfo = function(order_id, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -478,7 +478,7 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -527,11 +527,11 @@ StoreApi <- R6::R6Class( #' @param order order placed for purchasing the pet #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return Order - PlaceOrder = function(order, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$PlaceOrderWithHttpInfo(order, data_file = data_file, ..., parse = parse) + PlaceOrder = function(order, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$PlaceOrderWithHttpInfo(order, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -551,7 +551,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (Order) with additional information such as HTTP status code, headers - PlaceOrderWithHttpInfo = function(order, data_file = NULL, parse = TRUE, ...) { + PlaceOrderWithHttpInfo = function(order, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -608,7 +608,7 @@ StoreApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } diff --git a/samples/client/petstore/R/R/user_api.R b/samples/client/petstore/R/R/user_api.R index c0dc877631e3..1c7b804337b2 100644 --- a/samples/client/petstore/R/R/user_api.R +++ b/samples/client/petstore/R/R/user_api.R @@ -275,11 +275,11 @@ UserApi <- R6::R6Class( #' #' @param user Created user object #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - CreateUser = function(user, ..., parse = TRUE) { - local_var_response <- self$CreateUserWithHttpInfo(user, ..., parse = parse) + CreateUser = function(user, ..., .parse = TRUE) { + local_var_response <- self$CreateUserWithHttpInfo(user, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -298,7 +298,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - CreateUserWithHttpInfo = function(user, ...) { + CreateUserWithHttpInfo = function(user, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -389,11 +389,11 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - CreateUsersWithArrayInput = function(user, ..., parse = TRUE) { - local_var_response <- self$CreateUsersWithArrayInputWithHttpInfo(user, ..., parse = parse) + CreateUsersWithArrayInput = function(user, ..., .parse = TRUE) { + local_var_response <- self$CreateUsersWithArrayInputWithHttpInfo(user, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -412,7 +412,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - CreateUsersWithArrayInputWithHttpInfo = function(user, ...) { + CreateUsersWithArrayInputWithHttpInfo = function(user, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -506,11 +506,11 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - CreateUsersWithListInput = function(user, ..., parse = TRUE) { - local_var_response <- self$CreateUsersWithListInputWithHttpInfo(user, ..., parse = parse) + CreateUsersWithListInput = function(user, ..., .parse = TRUE) { + local_var_response <- self$CreateUsersWithListInputWithHttpInfo(user, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -529,7 +529,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - CreateUsersWithListInputWithHttpInfo = function(user, ...) { + CreateUsersWithListInputWithHttpInfo = function(user, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -623,11 +623,11 @@ UserApi <- R6::R6Class( #' #' @param username The name that needs to be deleted #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - DeleteUser = function(username, ..., parse = TRUE) { - local_var_response <- self$DeleteUserWithHttpInfo(username, ..., parse = parse) + DeleteUser = function(username, ..., .parse = TRUE) { + local_var_response <- self$DeleteUserWithHttpInfo(username, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -646,7 +646,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - DeleteUserWithHttpInfo = function(username, ...) { + DeleteUserWithHttpInfo = function(username, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -736,11 +736,11 @@ UserApi <- R6::R6Class( #' @param username The name that needs to be fetched. Use user1 for testing. #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return User - GetUserByName = function(username, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$GetUserByNameWithHttpInfo(username, data_file = data_file, ..., parse = parse) + GetUserByName = function(username, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$GetUserByNameWithHttpInfo(username, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -760,7 +760,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (User) with additional information such as HTTP status code, headers - GetUserByNameWithHttpInfo = function(username, data_file = NULL, parse = TRUE, ...) { + GetUserByNameWithHttpInfo = function(username, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -815,7 +815,7 @@ UserApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -865,11 +865,11 @@ UserApi <- R6::R6Class( #' @param password The password for login in clear text #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return character - LoginUser = function(username, password, data_file = NULL, ..., parse = TRUE) { - local_var_response <- self$LoginUserWithHttpInfo(username, password, data_file = data_file, ..., parse = parse) + LoginUser = function(username, password, data_file = NULL, ..., .parse = TRUE) { + local_var_response <- self$LoginUserWithHttpInfo(username, password, data_file = data_file, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -890,7 +890,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (character) with additional information such as HTTP status code, headers - LoginUserWithHttpInfo = function(username, password, data_file = NULL, parse = TRUE, ...) { + LoginUserWithHttpInfo = function(username, password, data_file = NULL, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -965,7 +965,7 @@ UserApi <- R6::R6Class( self$api_client$WriteFile(local_var_resp, data_file) } - if (!parse) { + if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } @@ -1012,11 +1012,11 @@ UserApi <- R6::R6Class( #' Logs out current logged in user session #' #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - LogoutUser = function(..., parse = TRUE) { - local_var_response <- self$LogoutUserWithHttpInfo(..., parse = parse) + LogoutUser = function(..., .parse = TRUE) { + local_var_response <- self$LogoutUserWithHttpInfo(..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1034,7 +1034,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - LogoutUserWithHttpInfo = function(...) { + LogoutUserWithHttpInfo = function(..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() @@ -1106,11 +1106,11 @@ UserApi <- R6::R6Class( #' @param username name that need to be deleted #' @param user Updated user object #' @param ... Other optional arguments - #' @param parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - UpdateUser = function(username, user, ..., parse = TRUE) { - local_var_response <- self$UpdateUserWithHttpInfo(username, user, ..., parse = parse) + UpdateUser = function(username, user, ..., .parse = TRUE) { + local_var_response <- self$UpdateUserWithHttpInfo(username, user, ..., .parse = .parse) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1130,7 +1130,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - UpdateUserWithHttpInfo = function(username, user, ...) { + UpdateUserWithHttpInfo = function(username, user, ..., .parse = TRUE) { args <- list(...) query_params <- list() header_params <- c() From 95f14b291977dc58489495aafb87227a9d446192 Mon Sep 17 00:00:00 2001 From: Matthew Pollock Date: Thu, 15 Jan 2026 13:45:47 -0500 Subject: [PATCH 3/5] scope .parse to endpoints that return data --- .../src/main/resources/r/api.mustache | 13 ++++-- samples/client/echo_api/r/R/auth_api.R | 2 + samples/client/echo_api/r/R/body_api.R | 10 +++++ samples/client/echo_api/r/R/form_api.R | 3 ++ samples/client/echo_api/r/R/header_api.R | 1 + samples/client/echo_api/r/R/path_api.R | 1 + samples/client/echo_api/r/R/query_api.R | 11 +++++ .../petstore/R-httr2-wrapper/R/fake_api.R | 23 +++++----- .../petstore/R-httr2-wrapper/R/pet_api.R | 22 ++++++---- .../petstore/R-httr2-wrapper/R/store_api.R | 10 +++-- .../petstore/R-httr2-wrapper/R/user_api.R | 44 +++++++++---------- samples/client/petstore/R-httr2/R/fake_api.R | 23 +++++----- samples/client/petstore/R-httr2/R/pet_api.R | 22 ++++++---- samples/client/petstore/R-httr2/R/store_api.R | 10 +++-- samples/client/petstore/R-httr2/R/user_api.R | 44 +++++++++---------- samples/client/petstore/R/R/fake_api.R | 23 +++++----- samples/client/petstore/R/R/pet_api.R | 22 ++++++---- samples/client/petstore/R/R/store_api.R | 10 +++-- samples/client/petstore/R/R/user_api.R | 44 +++++++++---------- 19 files changed, 191 insertions(+), 147 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/r/api.mustache b/modules/openapi-generator/src/main/resources/r/api.mustache index b297492099fa..42b8a80811c7 100644 --- a/modules/openapi-generator/src/main/resources/r/api.mustache +++ b/modules/openapi-generator/src/main/resources/r/api.mustache @@ -142,11 +142,13 @@ #' @param data_file (optional) name of the data file to save the result {{/returnType}} #' @param ... Other optional arguments + {{#returnType}} #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + {{/returnType}} #' #' @return {{{returnType}}}{{^returnType}}void{{/returnType}} - {{{operationId}}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}} = {{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}{{#vendorExtensions.x-streaming}}stream_callback = NULL, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = NULL, {{/returnType}}..., .parse = TRUE) { - local_var_response <- self${{{operationId}}}{{WithHttpInfo}}({{#allParams}}{{paramName}}, {{/allParams}}{{#vendorExtensions.x-streaming}}stream_callback = stream_callback, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = data_file, {{/returnType}}..., .parse = .parse) + {{{operationId}}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}} = {{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}{{#vendorExtensions.x-streaming}}stream_callback = NULL, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = NULL, {{/returnType}}...{{#returnType}}, .parse = TRUE{{/returnType}}) { + local_var_response <- self${{{operationId}}}{{WithHttpInfo}}({{#allParams}}{{paramName}}, {{/allParams}}{{#vendorExtensions.x-streaming}}stream_callback = stream_callback, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = data_file, {{/returnType}}...{{#returnType}}, .parse = .parse{{/returnType}}) {{#vendorExtensions.x-streaming}} if (typeof(stream_callback) == "closure") { # return void if streaming is enabled return(invisible(NULL)) @@ -180,9 +182,12 @@ #' @param data_file (optional) name of the data file to save the result {{/returnType}} #' @param ... Other optional arguments + {{#returnType}} + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. + {{/returnType}} #' #' @return API response ({{{returnType}}}{{^returnType}}void{{/returnType}}) with additional information such as HTTP status code, headers - {{{operationId}}}{{WithHttpInfo}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}} = {{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}{{#vendorExtensions.x-streaming}}stream_callback = NULL, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = NULL, {{/returnType}}..., .parse = TRUE) { + {{{operationId}}}{{WithHttpInfo}} = function({{#requiredParams}}{{paramName}}, {{/requiredParams}}{{#optionalParams}}{{paramName}} = {{^defaultValue}}NULL{{/defaultValue}}{{{defaultValue}}}, {{/optionalParams}}{{#vendorExtensions.x-streaming}}stream_callback = NULL, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = NULL, {{/returnType}}...{{#returnType}}, .parse = TRUE{{/returnType}}) { args <- list(...) query_params <- list() header_params <- c() @@ -570,10 +575,12 @@ self$api_client$WriteFile(local_var_resp, data_file) } + {{#returnType}} if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + {{/returnType}} deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "{{returnType}}"), diff --git a/samples/client/echo_api/r/R/auth_api.R b/samples/client/echo_api/r/R/auth_api.R index 346f7a5fed18..ccb26a035bf4 100644 --- a/samples/client/echo_api/r/R/auth_api.R +++ b/samples/client/echo_api/r/R/auth_api.R @@ -94,6 +94,7 @@ AuthApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestAuthHttpBasicWithHttpInfo = function(data_file = NULL, ..., .parse = TRUE) { @@ -191,6 +192,7 @@ AuthApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestAuthHttpBearerWithHttpInfo = function(data_file = NULL, ..., .parse = TRUE) { diff --git a/samples/client/echo_api/r/R/body_api.R b/samples/client/echo_api/r/R/body_api.R index fbd7c24f3161..9eaaeada3fc9 100644 --- a/samples/client/echo_api/r/R/body_api.R +++ b/samples/client/echo_api/r/R/body_api.R @@ -200,6 +200,7 @@ BodyApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (data.frame) with additional information such as HTTP status code, headers TestBinaryGifWithHttpInfo = function(data_file = NULL, ..., .parse = TRUE) { @@ -295,6 +296,7 @@ BodyApi <- R6::R6Class( #' @param body (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestBodyApplicationOctetstreamBinaryWithHttpInfo = function(body = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -400,6 +402,7 @@ BodyApi <- R6::R6Class( #' @param files #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestBodyMultipartFormdataArrayOfBinaryWithHttpInfo = function(files, data_file = NULL, ..., .parse = TRUE) { @@ -504,6 +507,7 @@ BodyApi <- R6::R6Class( #' @param my_file (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestBodyMultipartFormdataSingleBinaryWithHttpInfo = function(my_file = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -604,6 +608,7 @@ BodyApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers TestEchoBodyAllOfPetWithHttpInfo = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -709,6 +714,7 @@ BodyApi <- R6::R6Class( #' @param body (optional) Free form object #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestEchoBodyFreeFormObjectResponseStringWithHttpInfo = function(body = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -814,6 +820,7 @@ BodyApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers TestEchoBodyPetWithHttpInfo = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -919,6 +926,7 @@ BodyApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestEchoBodyPetResponseStringWithHttpInfo = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -1024,6 +1032,7 @@ BodyApi <- R6::R6Class( #' @param body (optional) String enum #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (StringEnumRef) with additional information such as HTTP status code, headers TestEchoBodyStringEnumWithHttpInfo = function(body = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -1129,6 +1138,7 @@ BodyApi <- R6::R6Class( #' @param tag (optional) Tag object #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestEchoBodyTagResponseStringWithHttpInfo = function(tag = NULL, data_file = NULL, ..., .parse = TRUE) { diff --git a/samples/client/echo_api/r/R/form_api.R b/samples/client/echo_api/r/R/form_api.R index bee3ea6fd8dd..51e7cfc95b66 100644 --- a/samples/client/echo_api/r/R/form_api.R +++ b/samples/client/echo_api/r/R/form_api.R @@ -116,6 +116,7 @@ FormApi <- R6::R6Class( #' @param string_form (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestFormIntegerBooleanStringWithHttpInfo = function(integer_form = NULL, boolean_form = NULL, string_form = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -226,6 +227,7 @@ FormApi <- R6::R6Class( #' @param marker #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestFormObjectMultipartWithHttpInfo = function(marker, data_file = NULL, ..., .parse = TRUE) { @@ -340,6 +342,7 @@ FormApi <- R6::R6Class( #' @param name (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestFormOneofWithHttpInfo = function(form1 = NULL, form2 = NULL, form3 = NULL, form4 = NULL, id = NULL, name = NULL, data_file = NULL, ..., .parse = TRUE) { diff --git a/samples/client/echo_api/r/R/header_api.R b/samples/client/echo_api/r/R/header_api.R index d073ea61d575..c13bb5d961bc 100644 --- a/samples/client/echo_api/r/R/header_api.R +++ b/samples/client/echo_api/r/R/header_api.R @@ -89,6 +89,7 @@ HeaderApi <- R6::R6Class( #' @param enum_ref_string_header (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestHeaderIntegerBooleanStringEnumsWithHttpInfo = function(integer_header = NULL, boolean_header = NULL, string_header = NULL, enum_nonref_string_header = NULL, enum_ref_string_header = NULL, data_file = NULL, ..., .parse = TRUE) { diff --git a/samples/client/echo_api/r/R/path_api.R b/samples/client/echo_api/r/R/path_api.R index fc19608ae728..bc074ca04e5b 100644 --- a/samples/client/echo_api/r/R/path_api.R +++ b/samples/client/echo_api/r/R/path_api.R @@ -86,6 +86,7 @@ PathApi <- R6::R6Class( #' @param enum_ref_string_path #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPathWithHttpInfo = function(path_string, path_integer, enum_nonref_string_path, enum_ref_string_path, data_file = NULL, ..., .parse = TRUE) { diff --git a/samples/client/echo_api/r/R/query_api.R b/samples/client/echo_api/r/R/query_api.R index 92ba08acbf68..4cec10e16229 100644 --- a/samples/client/echo_api/r/R/query_api.R +++ b/samples/client/echo_api/r/R/query_api.R @@ -225,6 +225,7 @@ QueryApi <- R6::R6Class( #' @param enum_ref_string_query (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestEnumRefStringWithHttpInfo = function(enum_nonref_string_query = NULL, enum_ref_string_query = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -339,6 +340,7 @@ QueryApi <- R6::R6Class( #' @param string_query (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestQueryDatetimeDateStringWithHttpInfo = function(datetime_query = NULL, date_query = NULL, string_query = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -456,6 +458,7 @@ QueryApi <- R6::R6Class( #' @param string_query (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestQueryIntegerBooleanStringWithHttpInfo = function(integer_query = NULL, boolean_query = NULL, string_query = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -569,6 +572,7 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestQueryStyleDeepObjectExplodeTrueObjectWithHttpInfo = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -670,6 +674,7 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestQueryStyleDeepObjectExplodeTrueObjectAllOfWithHttpInfo = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -771,6 +776,7 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestQueryStyleFormExplodeFalseArrayIntegerWithHttpInfo = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -873,6 +879,7 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestQueryStyleFormExplodeFalseArrayStringWithHttpInfo = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -975,6 +982,7 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestQueryStyleFormExplodeTrueArrayStringWithHttpInfo = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -1076,6 +1084,7 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestQueryStyleFormExplodeTrueObjectWithHttpInfo = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -1177,6 +1186,7 @@ QueryApi <- R6::R6Class( #' @param query_object (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestQueryStyleFormExplodeTrueObjectAllOfWithHttpInfo = function(query_object = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -1280,6 +1290,7 @@ QueryApi <- R6::R6Class( #' @param json_serialized_object_array_ref_string_query (optional) No description #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers TestQueryStyleJsonSerializationObjectWithHttpInfo = function(json_serialized_object_ref_string_query = NULL, json_serialized_object_array_ref_string_query = NULL, data_file = NULL, ..., .parse = TRUE) { diff --git a/samples/client/petstore/R-httr2-wrapper/R/fake_api.R b/samples/client/petstore/R-httr2-wrapper/R/fake_api.R index 8d8f46432120..2dd56dd187bf 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/fake_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/fake_api.R @@ -210,6 +210,7 @@ FakeApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers add_pet_optional_with_http_info = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -339,6 +340,7 @@ FakeApi <- R6::R6Class( #' @param var_data_file (optional) header data file #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (User) with additional information such as HTTP status code, headers fake_data_file_with_http_info = function(dummy, var_data_file = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -451,11 +453,10 @@ FakeApi <- R6::R6Class( #' #' @param path_array dummy path parameter #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_path_array = function(path_array, ..., .parse = TRUE) { - local_var_response <- self$fake_path_array_with_http_info(path_array, ..., .parse = .parse) + fake_path_array = function(path_array, ...) { + local_var_response <- self$fake_path_array_with_http_info(path_array, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -474,7 +475,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - fake_path_array_with_http_info = function(path_array, ..., .parse = TRUE) { + fake_path_array_with_http_info = function(path_array, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -559,11 +560,10 @@ FakeApi <- R6::R6Class( #' #' @param reg_exp_test dummy required parameter #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_regular_expression = function(reg_exp_test, ..., .parse = TRUE) { - local_var_response <- self$fake_regular_expression_with_http_info(reg_exp_test, ..., .parse = .parse) + fake_regular_expression = function(reg_exp_test, ...) { + local_var_response <- self$fake_regular_expression_with_http_info(reg_exp_test, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -582,7 +582,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - fake_regular_expression_with_http_info = function(reg_exp_test, ..., .parse = TRUE) { + fake_regular_expression_with_http_info = function(reg_exp_test, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -672,11 +672,10 @@ FakeApi <- R6::R6Class( #' @param set_dummy set query #' @param array_dummy array query #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_set_query = function(set_dummy, array_dummy, ..., .parse = TRUE) { - local_var_response <- self$fake_set_query_with_http_info(set_dummy, array_dummy, ..., .parse = .parse) + fake_set_query = function(set_dummy, array_dummy, ...) { + local_var_response <- self$fake_set_query_with_http_info(set_dummy, array_dummy, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -696,7 +695,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - fake_set_query_with_http_info = function(set_dummy, array_dummy, ..., .parse = TRUE) { + fake_set_query_with_http_info = function(set_dummy, array_dummy, ...) { args <- list(...) query_params <- list() header_params <- c() diff --git a/samples/client/petstore/R-httr2-wrapper/R/pet_api.R b/samples/client/petstore/R-httr2-wrapper/R/pet_api.R index 2f78dfa9dce5..5c17c0686ce2 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/pet_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/pet_api.R @@ -413,6 +413,7 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers add_pet_with_http_info = function(pet, data_file = NULL, ..., .parse = TRUE) { @@ -525,11 +526,10 @@ PetApi <- R6::R6Class( #' @param pet_id Pet id to delete #' @param api_key (optional) No description #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_pet = function(pet_id, api_key = NULL, ..., .parse = TRUE) { - local_var_response <- self$delete_pet_with_http_info(pet_id, api_key, ..., .parse = .parse) + delete_pet = function(pet_id, api_key = NULL, ...) { + local_var_response <- self$delete_pet_with_http_info(pet_id, api_key, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -549,7 +549,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - delete_pet_with_http_info = function(pet_id, api_key = NULL, ..., .parse = TRUE) { + delete_pet_with_http_info = function(pet_id, api_key = NULL, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -669,6 +669,7 @@ PetApi <- R6::R6Class( #' @param status Status values that need to be considered for filter #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers find_pets_by_status_with_http_info = function(status, data_file = NULL, ..., .parse = TRUE) { @@ -808,6 +809,7 @@ PetApi <- R6::R6Class( #' @param tags Tags to filter by #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers find_pets_by_tags_with_http_info = function(tags, data_file = NULL, ..., .parse = TRUE) { @@ -935,6 +937,7 @@ PetApi <- R6::R6Class( #' @param pet_id ID of pet to return #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers get_pet_by_id_with_http_info = function(pet_id, data_file = NULL, ..., .parse = TRUE) { @@ -1073,6 +1076,7 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers get_pet_by_id_streaming_with_http_info = function(pet_id, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -1216,6 +1220,7 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers test_header_with_http_info = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -1351,6 +1356,7 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers update_pet_with_http_info = function(pet, data_file = NULL, ..., .parse = TRUE) { @@ -1463,11 +1469,10 @@ PetApi <- R6::R6Class( #' @param name (optional) Updated name of the pet #' @param status (optional) Updated status of the pet #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - update_pet_with_form = function(pet_id, name = NULL, status = NULL, ..., .parse = TRUE) { - local_var_response <- self$update_pet_with_form_with_http_info(pet_id, name, status, ..., .parse = .parse) + update_pet_with_form = function(pet_id, name = NULL, status = NULL, ...) { + local_var_response <- self$update_pet_with_form_with_http_info(pet_id, name, status, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1488,7 +1493,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - update_pet_with_form_with_http_info = function(pet_id, name = NULL, status = NULL, ..., .parse = TRUE) { + update_pet_with_form_with_http_info = function(pet_id, name = NULL, status = NULL, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1616,6 +1621,7 @@ PetApi <- R6::R6Class( #' @param file (optional) file to upload #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (ModelApiResponse) with additional information such as HTTP status code, headers upload_file_with_http_info = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., .parse = TRUE) { diff --git a/samples/client/petstore/R-httr2-wrapper/R/store_api.R b/samples/client/petstore/R-httr2-wrapper/R/store_api.R index c2554c6b6bdf..777361c7231c 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/store_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/store_api.R @@ -166,11 +166,10 @@ StoreApi <- R6::R6Class( #' #' @param order_id ID of the order that needs to be deleted #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_order = function(order_id, ..., .parse = TRUE) { - local_var_response <- self$delete_order_with_http_info(order_id, ..., .parse = .parse) + delete_order = function(order_id, ...) { + local_var_response <- self$delete_order_with_http_info(order_id, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -189,7 +188,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - delete_order_with_http_info = function(order_id, ..., .parse = TRUE) { + delete_order_with_http_info = function(order_id, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -295,6 +294,7 @@ StoreApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (map(integer)) with additional information such as HTTP status code, headers get_inventory_with_http_info = function(data_file = NULL, ..., .parse = TRUE) { @@ -409,6 +409,7 @@ StoreApi <- R6::R6Class( #' @param order_id ID of pet that needs to be fetched #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Order) with additional information such as HTTP status code, headers get_order_by_id_with_http_info = function(order_id, data_file = NULL, ..., .parse = TRUE) { @@ -549,6 +550,7 @@ StoreApi <- R6::R6Class( #' @param order order placed for purchasing the pet #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Order) with additional information such as HTTP status code, headers place_order_with_http_info = function(order, data_file = NULL, ..., .parse = TRUE) { diff --git a/samples/client/petstore/R-httr2-wrapper/R/user_api.R b/samples/client/petstore/R-httr2-wrapper/R/user_api.R index 0f257899ddc9..894e5777eeb3 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/user_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/user_api.R @@ -275,11 +275,10 @@ UserApi <- R6::R6Class( #' #' @param user Created user object #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_user = function(user, ..., .parse = TRUE) { - local_var_response <- self$create_user_with_http_info(user, ..., .parse = .parse) + create_user = function(user, ...) { + local_var_response <- self$create_user_with_http_info(user, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -298,7 +297,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - create_user_with_http_info = function(user, ..., .parse = TRUE) { + create_user_with_http_info = function(user, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -389,11 +388,10 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_users_with_array_input = function(user, ..., .parse = TRUE) { - local_var_response <- self$create_users_with_array_input_with_http_info(user, ..., .parse = .parse) + create_users_with_array_input = function(user, ...) { + local_var_response <- self$create_users_with_array_input_with_http_info(user, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -412,7 +410,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - create_users_with_array_input_with_http_info = function(user, ..., .parse = TRUE) { + create_users_with_array_input_with_http_info = function(user, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -506,11 +504,10 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_users_with_list_input = function(user, ..., .parse = TRUE) { - local_var_response <- self$create_users_with_list_input_with_http_info(user, ..., .parse = .parse) + create_users_with_list_input = function(user, ...) { + local_var_response <- self$create_users_with_list_input_with_http_info(user, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -529,7 +526,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - create_users_with_list_input_with_http_info = function(user, ..., .parse = TRUE) { + create_users_with_list_input_with_http_info = function(user, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -623,11 +620,10 @@ UserApi <- R6::R6Class( #' #' @param username The name that needs to be deleted #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_user = function(username, ..., .parse = TRUE) { - local_var_response <- self$delete_user_with_http_info(username, ..., .parse = .parse) + delete_user = function(username, ...) { + local_var_response <- self$delete_user_with_http_info(username, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -646,7 +642,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - delete_user_with_http_info = function(username, ..., .parse = TRUE) { + delete_user_with_http_info = function(username, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -758,6 +754,7 @@ UserApi <- R6::R6Class( #' @param username The name that needs to be fetched. Use user1 for testing. #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (User) with additional information such as HTTP status code, headers get_user_by_name_with_http_info = function(username, data_file = NULL, ..., .parse = TRUE) { @@ -888,6 +885,7 @@ UserApi <- R6::R6Class( #' @param password The password for login in clear text #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers login_user_with_http_info = function(username, password, data_file = NULL, ..., .parse = TRUE) { @@ -1012,11 +1010,10 @@ UserApi <- R6::R6Class( #' Logs out current logged in user session #' #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - logout_user = function(..., .parse = TRUE) { - local_var_response <- self$logout_user_with_http_info(..., .parse = .parse) + logout_user = function(...) { + local_var_response <- self$logout_user_with_http_info(...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1034,7 +1031,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - logout_user_with_http_info = function(..., .parse = TRUE) { + logout_user_with_http_info = function(...) { args <- list(...) query_params <- list() header_params <- c() @@ -1106,11 +1103,10 @@ UserApi <- R6::R6Class( #' @param username name that need to be deleted #' @param user Updated user object #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - update_user = function(username, user, ..., .parse = TRUE) { - local_var_response <- self$update_user_with_http_info(username, user, ..., .parse = .parse) + update_user = function(username, user, ...) { + local_var_response <- self$update_user_with_http_info(username, user, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1130,7 +1126,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - update_user_with_http_info = function(username, user, ..., .parse = TRUE) { + update_user_with_http_info = function(username, user, ...) { args <- list(...) query_params <- list() header_params <- c() diff --git a/samples/client/petstore/R-httr2/R/fake_api.R b/samples/client/petstore/R-httr2/R/fake_api.R index 79edc8ad284c..9f60dd0b2a09 100644 --- a/samples/client/petstore/R-httr2/R/fake_api.R +++ b/samples/client/petstore/R-httr2/R/fake_api.R @@ -210,6 +210,7 @@ FakeApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers add_pet_optional_with_http_info = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -339,6 +340,7 @@ FakeApi <- R6::R6Class( #' @param var_data_file (optional) header data file #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (User) with additional information such as HTTP status code, headers fake_data_file_with_http_info = function(dummy, var_data_file = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -451,11 +453,10 @@ FakeApi <- R6::R6Class( #' #' @param path_array_parameter dummy path parameter #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_path_array = function(path_array_parameter, ..., .parse = TRUE) { - local_var_response <- self$fake_path_array_with_http_info(path_array_parameter, ..., .parse = .parse) + fake_path_array = function(path_array_parameter, ...) { + local_var_response <- self$fake_path_array_with_http_info(path_array_parameter, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -474,7 +475,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - fake_path_array_with_http_info = function(path_array_parameter, ..., .parse = TRUE) { + fake_path_array_with_http_info = function(path_array_parameter, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -559,11 +560,10 @@ FakeApi <- R6::R6Class( #' #' @param reg_exp_test dummy required parameter #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_regular_expression = function(reg_exp_test, ..., .parse = TRUE) { - local_var_response <- self$fake_regular_expression_with_http_info(reg_exp_test, ..., .parse = .parse) + fake_regular_expression = function(reg_exp_test, ...) { + local_var_response <- self$fake_regular_expression_with_http_info(reg_exp_test, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -582,7 +582,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - fake_regular_expression_with_http_info = function(reg_exp_test, ..., .parse = TRUE) { + fake_regular_expression_with_http_info = function(reg_exp_test, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -672,11 +672,10 @@ FakeApi <- R6::R6Class( #' @param set_dummy set query #' @param array_dummy array query #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - fake_set_query = function(set_dummy, array_dummy, ..., .parse = TRUE) { - local_var_response <- self$fake_set_query_with_http_info(set_dummy, array_dummy, ..., .parse = .parse) + fake_set_query = function(set_dummy, array_dummy, ...) { + local_var_response <- self$fake_set_query_with_http_info(set_dummy, array_dummy, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -696,7 +695,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - fake_set_query_with_http_info = function(set_dummy, array_dummy, ..., .parse = TRUE) { + fake_set_query_with_http_info = function(set_dummy, array_dummy, ...) { args <- list(...) query_params <- list() header_params <- c() diff --git a/samples/client/petstore/R-httr2/R/pet_api.R b/samples/client/petstore/R-httr2/R/pet_api.R index f94abedee245..280b9af521e0 100644 --- a/samples/client/petstore/R-httr2/R/pet_api.R +++ b/samples/client/petstore/R-httr2/R/pet_api.R @@ -413,6 +413,7 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers add_pet_with_http_info = function(pet, data_file = NULL, ..., .parse = TRUE) { @@ -525,11 +526,10 @@ PetApi <- R6::R6Class( #' @param pet_id Pet id to delete #' @param api_key (optional) No description #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_pet = function(pet_id, api_key = NULL, ..., .parse = TRUE) { - local_var_response <- self$delete_pet_with_http_info(pet_id, api_key, ..., .parse = .parse) + delete_pet = function(pet_id, api_key = NULL, ...) { + local_var_response <- self$delete_pet_with_http_info(pet_id, api_key, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -549,7 +549,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - delete_pet_with_http_info = function(pet_id, api_key = NULL, ..., .parse = TRUE) { + delete_pet_with_http_info = function(pet_id, api_key = NULL, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -669,6 +669,7 @@ PetApi <- R6::R6Class( #' @param status Status values that need to be considered for filter #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers find_pets_by_status_with_http_info = function(status, data_file = NULL, ..., .parse = TRUE) { @@ -808,6 +809,7 @@ PetApi <- R6::R6Class( #' @param tags Tags to filter by #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers find_pets_by_tags_with_http_info = function(tags, data_file = NULL, ..., .parse = TRUE) { @@ -935,6 +937,7 @@ PetApi <- R6::R6Class( #' @param pet_id ID of pet to return #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers get_pet_by_id_with_http_info = function(pet_id, data_file = NULL, ..., .parse = TRUE) { @@ -1073,6 +1076,7 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers get_pet_by_id_streaming_with_http_info = function(pet_id, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -1216,6 +1220,7 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers test_header_with_http_info = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -1351,6 +1356,7 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers update_pet_with_http_info = function(pet, data_file = NULL, ..., .parse = TRUE) { @@ -1463,11 +1469,10 @@ PetApi <- R6::R6Class( #' @param name (optional) Updated name of the pet #' @param status (optional) Updated status of the pet #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - update_pet_with_form = function(pet_id, name = NULL, status = NULL, ..., .parse = TRUE) { - local_var_response <- self$update_pet_with_form_with_http_info(pet_id, name, status, ..., .parse = .parse) + update_pet_with_form = function(pet_id, name = NULL, status = NULL, ...) { + local_var_response <- self$update_pet_with_form_with_http_info(pet_id, name, status, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1488,7 +1493,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - update_pet_with_form_with_http_info = function(pet_id, name = NULL, status = NULL, ..., .parse = TRUE) { + update_pet_with_form_with_http_info = function(pet_id, name = NULL, status = NULL, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1616,6 +1621,7 @@ PetApi <- R6::R6Class( #' @param file (optional) file to upload #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (ModelApiResponse) with additional information such as HTTP status code, headers upload_file_with_http_info = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., .parse = TRUE) { diff --git a/samples/client/petstore/R-httr2/R/store_api.R b/samples/client/petstore/R-httr2/R/store_api.R index 711bd25283e1..87b11005e367 100644 --- a/samples/client/petstore/R-httr2/R/store_api.R +++ b/samples/client/petstore/R-httr2/R/store_api.R @@ -166,11 +166,10 @@ StoreApi <- R6::R6Class( #' #' @param order_id ID of the order that needs to be deleted #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_order = function(order_id, ..., .parse = TRUE) { - local_var_response <- self$delete_order_with_http_info(order_id, ..., .parse = .parse) + delete_order = function(order_id, ...) { + local_var_response <- self$delete_order_with_http_info(order_id, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -189,7 +188,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - delete_order_with_http_info = function(order_id, ..., .parse = TRUE) { + delete_order_with_http_info = function(order_id, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -295,6 +294,7 @@ StoreApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (map(integer)) with additional information such as HTTP status code, headers get_inventory_with_http_info = function(data_file = NULL, ..., .parse = TRUE) { @@ -409,6 +409,7 @@ StoreApi <- R6::R6Class( #' @param order_id ID of pet that needs to be fetched #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Order) with additional information such as HTTP status code, headers get_order_by_id_with_http_info = function(order_id, data_file = NULL, ..., .parse = TRUE) { @@ -549,6 +550,7 @@ StoreApi <- R6::R6Class( #' @param order order placed for purchasing the pet #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Order) with additional information such as HTTP status code, headers place_order_with_http_info = function(order, data_file = NULL, ..., .parse = TRUE) { diff --git a/samples/client/petstore/R-httr2/R/user_api.R b/samples/client/petstore/R-httr2/R/user_api.R index 3a138a044a07..53d047863fb2 100644 --- a/samples/client/petstore/R-httr2/R/user_api.R +++ b/samples/client/petstore/R-httr2/R/user_api.R @@ -275,11 +275,10 @@ UserApi <- R6::R6Class( #' #' @param user Created user object #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_user = function(user, ..., .parse = TRUE) { - local_var_response <- self$create_user_with_http_info(user, ..., .parse = .parse) + create_user = function(user, ...) { + local_var_response <- self$create_user_with_http_info(user, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -298,7 +297,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - create_user_with_http_info = function(user, ..., .parse = TRUE) { + create_user_with_http_info = function(user, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -389,11 +388,10 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_users_with_array_input = function(user, ..., .parse = TRUE) { - local_var_response <- self$create_users_with_array_input_with_http_info(user, ..., .parse = .parse) + create_users_with_array_input = function(user, ...) { + local_var_response <- self$create_users_with_array_input_with_http_info(user, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -412,7 +410,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - create_users_with_array_input_with_http_info = function(user, ..., .parse = TRUE) { + create_users_with_array_input_with_http_info = function(user, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -506,11 +504,10 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - create_users_with_list_input = function(user, ..., .parse = TRUE) { - local_var_response <- self$create_users_with_list_input_with_http_info(user, ..., .parse = .parse) + create_users_with_list_input = function(user, ...) { + local_var_response <- self$create_users_with_list_input_with_http_info(user, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -529,7 +526,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - create_users_with_list_input_with_http_info = function(user, ..., .parse = TRUE) { + create_users_with_list_input_with_http_info = function(user, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -623,11 +620,10 @@ UserApi <- R6::R6Class( #' #' @param username The name that needs to be deleted #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - delete_user = function(username, ..., .parse = TRUE) { - local_var_response <- self$delete_user_with_http_info(username, ..., .parse = .parse) + delete_user = function(username, ...) { + local_var_response <- self$delete_user_with_http_info(username, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -646,7 +642,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - delete_user_with_http_info = function(username, ..., .parse = TRUE) { + delete_user_with_http_info = function(username, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -758,6 +754,7 @@ UserApi <- R6::R6Class( #' @param username The name that needs to be fetched. Use user1 for testing. #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (User) with additional information such as HTTP status code, headers get_user_by_name_with_http_info = function(username, data_file = NULL, ..., .parse = TRUE) { @@ -888,6 +885,7 @@ UserApi <- R6::R6Class( #' @param password The password for login in clear text #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers login_user_with_http_info = function(username, password, data_file = NULL, ..., .parse = TRUE) { @@ -1012,11 +1010,10 @@ UserApi <- R6::R6Class( #' Logs out current logged in user session #' #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - logout_user = function(..., .parse = TRUE) { - local_var_response <- self$logout_user_with_http_info(..., .parse = .parse) + logout_user = function(...) { + local_var_response <- self$logout_user_with_http_info(...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1034,7 +1031,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - logout_user_with_http_info = function(..., .parse = TRUE) { + logout_user_with_http_info = function(...) { args <- list(...) query_params <- list() header_params <- c() @@ -1106,11 +1103,10 @@ UserApi <- R6::R6Class( #' @param username name that need to be deleted #' @param user Updated user object #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - update_user = function(username, user, ..., .parse = TRUE) { - local_var_response <- self$update_user_with_http_info(username, user, ..., .parse = .parse) + update_user = function(username, user, ...) { + local_var_response <- self$update_user_with_http_info(username, user, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1130,7 +1126,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - update_user_with_http_info = function(username, user, ..., .parse = TRUE) { + update_user_with_http_info = function(username, user, ...) { args <- list(...) query_params <- list() header_params <- c() diff --git a/samples/client/petstore/R/R/fake_api.R b/samples/client/petstore/R/R/fake_api.R index a454aed8ee10..de1ce596c77f 100644 --- a/samples/client/petstore/R/R/fake_api.R +++ b/samples/client/petstore/R/R/fake_api.R @@ -210,6 +210,7 @@ FakeApi <- R6::R6Class( #' @param pet (optional) Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers AddPetOptionalWithHttpInfo = function(pet = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -339,6 +340,7 @@ FakeApi <- R6::R6Class( #' @param var_data_file (optional) header data file #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (User) with additional information such as HTTP status code, headers FakeDataFileWithHttpInfo = function(dummy, var_data_file = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -451,11 +453,10 @@ FakeApi <- R6::R6Class( #' #' @param path_array dummy path parameter #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - FakePathArray = function(path_array, ..., .parse = TRUE) { - local_var_response <- self$FakePathArrayWithHttpInfo(path_array, ..., .parse = .parse) + FakePathArray = function(path_array, ...) { + local_var_response <- self$FakePathArrayWithHttpInfo(path_array, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -474,7 +475,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - FakePathArrayWithHttpInfo = function(path_array, ..., .parse = TRUE) { + FakePathArrayWithHttpInfo = function(path_array, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -559,11 +560,10 @@ FakeApi <- R6::R6Class( #' #' @param reg_exp_test dummy required parameter #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - FakeRegularExpression = function(reg_exp_test, ..., .parse = TRUE) { - local_var_response <- self$FakeRegularExpressionWithHttpInfo(reg_exp_test, ..., .parse = .parse) + FakeRegularExpression = function(reg_exp_test, ...) { + local_var_response <- self$FakeRegularExpressionWithHttpInfo(reg_exp_test, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -582,7 +582,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - FakeRegularExpressionWithHttpInfo = function(reg_exp_test, ..., .parse = TRUE) { + FakeRegularExpressionWithHttpInfo = function(reg_exp_test, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -672,11 +672,10 @@ FakeApi <- R6::R6Class( #' @param set_dummy set query #' @param array_dummy array query #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - FakeSetQuery = function(set_dummy, array_dummy, ..., .parse = TRUE) { - local_var_response <- self$FakeSetQueryWithHttpInfo(set_dummy, array_dummy, ..., .parse = .parse) + FakeSetQuery = function(set_dummy, array_dummy, ...) { + local_var_response <- self$FakeSetQueryWithHttpInfo(set_dummy, array_dummy, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -696,7 +695,7 @@ FakeApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - FakeSetQueryWithHttpInfo = function(set_dummy, array_dummy, ..., .parse = TRUE) { + FakeSetQueryWithHttpInfo = function(set_dummy, array_dummy, ...) { args <- list(...) query_params <- list() header_params <- c() diff --git a/samples/client/petstore/R/R/pet_api.R b/samples/client/petstore/R/R/pet_api.R index 10ea468deefd..178f28bc88cb 100644 --- a/samples/client/petstore/R/R/pet_api.R +++ b/samples/client/petstore/R/R/pet_api.R @@ -413,6 +413,7 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers AddPetWithHttpInfo = function(pet, data_file = NULL, ..., .parse = TRUE) { @@ -525,11 +526,10 @@ PetApi <- R6::R6Class( #' @param pet_id Pet id to delete #' @param api_key (optional) No description #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - DeletePet = function(pet_id, api_key = NULL, ..., .parse = TRUE) { - local_var_response <- self$DeletePetWithHttpInfo(pet_id, api_key, ..., .parse = .parse) + DeletePet = function(pet_id, api_key = NULL, ...) { + local_var_response <- self$DeletePetWithHttpInfo(pet_id, api_key, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -549,7 +549,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - DeletePetWithHttpInfo = function(pet_id, api_key = NULL, ..., .parse = TRUE) { + DeletePetWithHttpInfo = function(pet_id, api_key = NULL, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -669,6 +669,7 @@ PetApi <- R6::R6Class( #' @param status Status values that need to be considered for filter #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers FindPetsByStatusWithHttpInfo = function(status, data_file = NULL, ..., .parse = TRUE) { @@ -808,6 +809,7 @@ PetApi <- R6::R6Class( #' @param tags Tags to filter by #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (array[Pet]) with additional information such as HTTP status code, headers FindPetsByTagsWithHttpInfo = function(tags, data_file = NULL, ..., .parse = TRUE) { @@ -935,6 +937,7 @@ PetApi <- R6::R6Class( #' @param pet_id ID of pet to return #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers GetPetByIdWithHttpInfo = function(pet_id, data_file = NULL, ..., .parse = TRUE) { @@ -1073,6 +1076,7 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers GetPetByIdStreamingWithHttpInfo = function(pet_id, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -1216,6 +1220,7 @@ PetApi <- R6::R6Class( #' @param stream_callback (optional) callback function to process the data stream #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers TestHeaderWithHttpInfo = function(header_test_int, stream_callback = NULL, data_file = NULL, ..., .parse = TRUE) { @@ -1351,6 +1356,7 @@ PetApi <- R6::R6Class( #' @param pet Pet object that needs to be added to the store #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Pet) with additional information such as HTTP status code, headers UpdatePetWithHttpInfo = function(pet, data_file = NULL, ..., .parse = TRUE) { @@ -1463,11 +1469,10 @@ PetApi <- R6::R6Class( #' @param name (optional) Updated name of the pet #' @param status (optional) Updated status of the pet #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - UpdatePetWithForm = function(pet_id, name = NULL, status = NULL, ..., .parse = TRUE) { - local_var_response <- self$UpdatePetWithFormWithHttpInfo(pet_id, name, status, ..., .parse = .parse) + UpdatePetWithForm = function(pet_id, name = NULL, status = NULL, ...) { + local_var_response <- self$UpdatePetWithFormWithHttpInfo(pet_id, name, status, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1488,7 +1493,7 @@ PetApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - UpdatePetWithFormWithHttpInfo = function(pet_id, name = NULL, status = NULL, ..., .parse = TRUE) { + UpdatePetWithFormWithHttpInfo = function(pet_id, name = NULL, status = NULL, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -1616,6 +1621,7 @@ PetApi <- R6::R6Class( #' @param file (optional) file to upload #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (ModelApiResponse) with additional information such as HTTP status code, headers UploadFileWithHttpInfo = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ..., .parse = TRUE) { diff --git a/samples/client/petstore/R/R/store_api.R b/samples/client/petstore/R/R/store_api.R index d45b85e9986f..570a9fcf630a 100644 --- a/samples/client/petstore/R/R/store_api.R +++ b/samples/client/petstore/R/R/store_api.R @@ -166,11 +166,10 @@ StoreApi <- R6::R6Class( #' #' @param order_id ID of the order that needs to be deleted #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - DeleteOrder = function(order_id, ..., .parse = TRUE) { - local_var_response <- self$DeleteOrderWithHttpInfo(order_id, ..., .parse = .parse) + DeleteOrder = function(order_id, ...) { + local_var_response <- self$DeleteOrderWithHttpInfo(order_id, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -189,7 +188,7 @@ StoreApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - DeleteOrderWithHttpInfo = function(order_id, ..., .parse = TRUE) { + DeleteOrderWithHttpInfo = function(order_id, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -295,6 +294,7 @@ StoreApi <- R6::R6Class( #' #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (map(integer)) with additional information such as HTTP status code, headers GetInventoryWithHttpInfo = function(data_file = NULL, ..., .parse = TRUE) { @@ -409,6 +409,7 @@ StoreApi <- R6::R6Class( #' @param order_id ID of pet that needs to be fetched #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Order) with additional information such as HTTP status code, headers GetOrderByIdWithHttpInfo = function(order_id, data_file = NULL, ..., .parse = TRUE) { @@ -549,6 +550,7 @@ StoreApi <- R6::R6Class( #' @param order order placed for purchasing the pet #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (Order) with additional information such as HTTP status code, headers PlaceOrderWithHttpInfo = function(order, data_file = NULL, ..., .parse = TRUE) { diff --git a/samples/client/petstore/R/R/user_api.R b/samples/client/petstore/R/R/user_api.R index 1c7b804337b2..d22ca310fdef 100644 --- a/samples/client/petstore/R/R/user_api.R +++ b/samples/client/petstore/R/R/user_api.R @@ -275,11 +275,10 @@ UserApi <- R6::R6Class( #' #' @param user Created user object #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - CreateUser = function(user, ..., .parse = TRUE) { - local_var_response <- self$CreateUserWithHttpInfo(user, ..., .parse = .parse) + CreateUser = function(user, ...) { + local_var_response <- self$CreateUserWithHttpInfo(user, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -298,7 +297,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - CreateUserWithHttpInfo = function(user, ..., .parse = TRUE) { + CreateUserWithHttpInfo = function(user, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -389,11 +388,10 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - CreateUsersWithArrayInput = function(user, ..., .parse = TRUE) { - local_var_response <- self$CreateUsersWithArrayInputWithHttpInfo(user, ..., .parse = .parse) + CreateUsersWithArrayInput = function(user, ...) { + local_var_response <- self$CreateUsersWithArrayInputWithHttpInfo(user, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -412,7 +410,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - CreateUsersWithArrayInputWithHttpInfo = function(user, ..., .parse = TRUE) { + CreateUsersWithArrayInputWithHttpInfo = function(user, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -506,11 +504,10 @@ UserApi <- R6::R6Class( #' #' @param user List of user object #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - CreateUsersWithListInput = function(user, ..., .parse = TRUE) { - local_var_response <- self$CreateUsersWithListInputWithHttpInfo(user, ..., .parse = .parse) + CreateUsersWithListInput = function(user, ...) { + local_var_response <- self$CreateUsersWithListInputWithHttpInfo(user, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -529,7 +526,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - CreateUsersWithListInputWithHttpInfo = function(user, ..., .parse = TRUE) { + CreateUsersWithListInputWithHttpInfo = function(user, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -623,11 +620,10 @@ UserApi <- R6::R6Class( #' #' @param username The name that needs to be deleted #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - DeleteUser = function(username, ..., .parse = TRUE) { - local_var_response <- self$DeleteUserWithHttpInfo(username, ..., .parse = .parse) + DeleteUser = function(username, ...) { + local_var_response <- self$DeleteUserWithHttpInfo(username, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -646,7 +642,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - DeleteUserWithHttpInfo = function(username, ..., .parse = TRUE) { + DeleteUserWithHttpInfo = function(username, ...) { args <- list(...) query_params <- list() header_params <- c() @@ -758,6 +754,7 @@ UserApi <- R6::R6Class( #' @param username The name that needs to be fetched. Use user1 for testing. #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (User) with additional information such as HTTP status code, headers GetUserByNameWithHttpInfo = function(username, data_file = NULL, ..., .parse = TRUE) { @@ -888,6 +885,7 @@ UserApi <- R6::R6Class( #' @param password The password for login in clear text #' @param data_file (optional) name of the data file to save the result #' @param ... Other optional arguments + #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return API response (character) with additional information such as HTTP status code, headers LoginUserWithHttpInfo = function(username, password, data_file = NULL, ..., .parse = TRUE) { @@ -1012,11 +1010,10 @@ UserApi <- R6::R6Class( #' Logs out current logged in user session #' #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - LogoutUser = function(..., .parse = TRUE) { - local_var_response <- self$LogoutUserWithHttpInfo(..., .parse = .parse) + LogoutUser = function(...) { + local_var_response <- self$LogoutUserWithHttpInfo(...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1034,7 +1031,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - LogoutUserWithHttpInfo = function(..., .parse = TRUE) { + LogoutUserWithHttpInfo = function(...) { args <- list(...) query_params <- list() header_params <- c() @@ -1106,11 +1103,10 @@ UserApi <- R6::R6Class( #' @param username name that need to be deleted #' @param user Updated user object #' @param ... Other optional arguments - #' @param .parse Logical. If \code{TRUE} then the response will be parsed to a generated type. If \code{FALSE} the response will be returned as unparsed text. #' #' @return void - UpdateUser = function(username, user, ..., .parse = TRUE) { - local_var_response <- self$UpdateUserWithHttpInfo(username, user, ..., .parse = .parse) + UpdateUser = function(username, user, ...) { + local_var_response <- self$UpdateUserWithHttpInfo(username, user, ...) if (local_var_response$status_code >= 200 && local_var_response$status_code <= 299) { return(local_var_response$content) } else if (local_var_response$status_code >= 300 && local_var_response$status_code <= 399) { @@ -1130,7 +1126,7 @@ UserApi <- R6::R6Class( #' @param ... Other optional arguments #' #' @return API response (void) with additional information such as HTTP status code, headers - UpdateUserWithHttpInfo = function(username, user, ..., .parse = TRUE) { + UpdateUserWithHttpInfo = function(username, user, ...) { args <- list(...) query_params <- list() header_params <- c() From fccb78bf3b49022fa4117fae9069aa92b4a783be Mon Sep 17 00:00:00 2001 From: Matthew Pollock Date: Thu, 15 Jan 2026 13:56:58 -0500 Subject: [PATCH 4/5] move handling of .parsed so that it applies to both primitive and non-primitive return types --- .../src/main/resources/r/api.mustache | 12 +- samples/client/echo_api/r/R/auth_api.R | 20 ++-- samples/client/echo_api/r/R/body_api.R | 100 ++++++++-------- samples/client/echo_api/r/R/form_api.R | 30 ++--- samples/client/echo_api/r/R/header_api.R | 10 +- samples/client/echo_api/r/R/path_api.R | 10 +- samples/client/echo_api/r/R/query_api.R | 110 +++++++++--------- .../petstore/R-httr2-wrapper/R/fake_api.R | 20 ++-- .../petstore/R-httr2-wrapper/R/pet_api.R | 80 ++++++------- .../petstore/R-httr2-wrapper/R/store_api.R | 30 ++--- .../petstore/R-httr2-wrapper/R/user_api.R | 20 ++-- samples/client/petstore/R-httr2/R/fake_api.R | 20 ++-- samples/client/petstore/R-httr2/R/pet_api.R | 80 ++++++------- samples/client/petstore/R-httr2/R/store_api.R | 30 ++--- samples/client/petstore/R-httr2/R/user_api.R | 20 ++-- samples/client/petstore/R/R/fake_api.R | 20 ++-- samples/client/petstore/R/R/pet_api.R | 80 ++++++------- samples/client/petstore/R/R/store_api.R | 30 ++--- samples/client/petstore/R/R/user_api.R | 20 ++-- 19 files changed, 370 insertions(+), 372 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/r/api.mustache b/modules/openapi-generator/src/main/resources/r/api.mustache index 42b8a80811c7..2fc80ecfda39 100644 --- a/modules/openapi-generator/src/main/resources/r/api.mustache +++ b/modules/openapi-generator/src/main/resources/r/api.mustache @@ -561,6 +561,11 @@ {{/vendorExtensions.x-streaming}} if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { {{#returnType}} + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } + {{#isPrimitiveType}} # save response in a file if (!is.null(data_file)) { @@ -575,13 +580,6 @@ self$api_client$WriteFile(local_var_resp, data_file) } - {{#returnType}} - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - {{/returnType}} - deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "{{returnType}}"), error = function(e) { diff --git a/samples/client/echo_api/r/R/auth_api.R b/samples/client/echo_api/r/R/auth_api.R index ccb26a035bf4..0638fb07be31 100644 --- a/samples/client/echo_api/r/R/auth_api.R +++ b/samples/client/echo_api/r/R/auth_api.R @@ -133,16 +133,16 @@ AuthApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -231,16 +231,16 @@ AuthApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { diff --git a/samples/client/echo_api/r/R/body_api.R b/samples/client/echo_api/r/R/body_api.R index 9eaaeada3fc9..2386d4acd50b 100644 --- a/samples/client/echo_api/r/R/body_api.R +++ b/samples/client/echo_api/r/R/body_api.R @@ -235,16 +235,16 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "data.frame"), error = function(e) { @@ -341,16 +341,16 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -446,16 +446,16 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -547,16 +547,16 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -653,16 +653,16 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -759,16 +759,16 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -865,16 +865,16 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -971,16 +971,16 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -1077,16 +1077,16 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "StringEnumRef"), error = function(e) { @@ -1183,16 +1183,16 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { diff --git a/samples/client/echo_api/r/R/form_api.R b/samples/client/echo_api/r/R/form_api.R index 51e7cfc95b66..79c3b7e0bbec 100644 --- a/samples/client/echo_api/r/R/form_api.R +++ b/samples/client/echo_api/r/R/form_api.R @@ -166,16 +166,16 @@ FormApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -271,16 +271,16 @@ FormApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -407,16 +407,16 @@ FormApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { diff --git a/samples/client/echo_api/r/R/header_api.R b/samples/client/echo_api/r/R/header_api.R index c13bb5d961bc..94ea97199064 100644 --- a/samples/client/echo_api/r/R/header_api.R +++ b/samples/client/echo_api/r/R/header_api.R @@ -154,16 +154,16 @@ HeaderApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { diff --git a/samples/client/echo_api/r/R/path_api.R b/samples/client/echo_api/r/R/path_api.R index bc074ca04e5b..c43f96a07e50 100644 --- a/samples/client/echo_api/r/R/path_api.R +++ b/samples/client/echo_api/r/R/path_api.R @@ -169,16 +169,16 @@ PathApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { diff --git a/samples/client/echo_api/r/R/query_api.R b/samples/client/echo_api/r/R/query_api.R index 4cec10e16229..cbeeaa719603 100644 --- a/samples/client/echo_api/r/R/query_api.R +++ b/samples/client/echo_api/r/R/query_api.R @@ -275,16 +275,16 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -393,16 +393,16 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -511,16 +511,16 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -613,16 +613,16 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -715,16 +715,16 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -818,16 +818,16 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -921,16 +921,16 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -1023,16 +1023,16 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -1125,16 +1125,16 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -1227,16 +1227,16 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { @@ -1338,16 +1338,16 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { diff --git a/samples/client/petstore/R-httr2-wrapper/R/fake_api.R b/samples/client/petstore/R-httr2-wrapper/R/fake_api.R index 2dd56dd187bf..5cd8cdb17387 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/fake_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/fake_api.R @@ -262,16 +262,16 @@ FakeApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -400,16 +400,16 @@ FakeApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), error = function(e) { diff --git a/samples/client/petstore/R-httr2-wrapper/R/pet_api.R b/samples/client/petstore/R-httr2-wrapper/R/pet_api.R index 5c17c0686ce2..3273242350f2 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/pet_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/pet_api.R @@ -472,16 +472,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -733,16 +733,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), error = function(e) { @@ -861,16 +861,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), error = function(e) { @@ -994,16 +994,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1138,16 +1138,16 @@ PetApi <- R6::R6Class( } if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1280,16 +1280,16 @@ PetApi <- R6::R6Class( } if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1414,16 +1414,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1693,16 +1693,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "ModelApiResponse"), error = function(e) { diff --git a/samples/client/petstore/R-httr2-wrapper/R/store_api.R b/samples/client/petstore/R-httr2-wrapper/R/store_api.R index 777361c7231c..a18cc4d50a18 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/store_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/store_api.R @@ -333,16 +333,16 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "map(integer)"), error = function(e) { @@ -474,16 +474,16 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), error = function(e) { @@ -605,16 +605,16 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), error = function(e) { diff --git a/samples/client/petstore/R-httr2-wrapper/R/user_api.R b/samples/client/petstore/R-httr2-wrapper/R/user_api.R index 894e5777eeb3..8e97e5db77aa 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/user_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/user_api.R @@ -807,16 +807,16 @@ UserApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), error = function(e) { @@ -958,16 +958,16 @@ UserApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { diff --git a/samples/client/petstore/R-httr2/R/fake_api.R b/samples/client/petstore/R-httr2/R/fake_api.R index 9f60dd0b2a09..5ed9ee4ab030 100644 --- a/samples/client/petstore/R-httr2/R/fake_api.R +++ b/samples/client/petstore/R-httr2/R/fake_api.R @@ -262,16 +262,16 @@ FakeApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -400,16 +400,16 @@ FakeApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), error = function(e) { diff --git a/samples/client/petstore/R-httr2/R/pet_api.R b/samples/client/petstore/R-httr2/R/pet_api.R index 280b9af521e0..7ee384f68910 100644 --- a/samples/client/petstore/R-httr2/R/pet_api.R +++ b/samples/client/petstore/R-httr2/R/pet_api.R @@ -472,16 +472,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -733,16 +733,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), error = function(e) { @@ -861,16 +861,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), error = function(e) { @@ -994,16 +994,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1138,16 +1138,16 @@ PetApi <- R6::R6Class( } if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1280,16 +1280,16 @@ PetApi <- R6::R6Class( } if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1414,16 +1414,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1693,16 +1693,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "ModelApiResponse"), error = function(e) { diff --git a/samples/client/petstore/R-httr2/R/store_api.R b/samples/client/petstore/R-httr2/R/store_api.R index 87b11005e367..3bb1f81f13f0 100644 --- a/samples/client/petstore/R-httr2/R/store_api.R +++ b/samples/client/petstore/R-httr2/R/store_api.R @@ -333,16 +333,16 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "map(integer)"), error = function(e) { @@ -474,16 +474,16 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), error = function(e) { @@ -605,16 +605,16 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), error = function(e) { diff --git a/samples/client/petstore/R-httr2/R/user_api.R b/samples/client/petstore/R-httr2/R/user_api.R index 53d047863fb2..737418a72725 100644 --- a/samples/client/petstore/R-httr2/R/user_api.R +++ b/samples/client/petstore/R-httr2/R/user_api.R @@ -807,16 +807,16 @@ UserApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), error = function(e) { @@ -958,16 +958,16 @@ UserApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { diff --git a/samples/client/petstore/R/R/fake_api.R b/samples/client/petstore/R/R/fake_api.R index de1ce596c77f..2f97e1a9def9 100644 --- a/samples/client/petstore/R/R/fake_api.R +++ b/samples/client/petstore/R/R/fake_api.R @@ -262,16 +262,16 @@ FakeApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -400,16 +400,16 @@ FakeApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), error = function(e) { diff --git a/samples/client/petstore/R/R/pet_api.R b/samples/client/petstore/R/R/pet_api.R index 178f28bc88cb..65f01dfb2cb1 100644 --- a/samples/client/petstore/R/R/pet_api.R +++ b/samples/client/petstore/R/R/pet_api.R @@ -472,16 +472,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -733,16 +733,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), error = function(e) { @@ -861,16 +861,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), error = function(e) { @@ -994,16 +994,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1138,16 +1138,16 @@ PetApi <- R6::R6Class( } if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1280,16 +1280,16 @@ PetApi <- R6::R6Class( } if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1414,16 +1414,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), error = function(e) { @@ -1693,16 +1693,16 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "ModelApiResponse"), error = function(e) { diff --git a/samples/client/petstore/R/R/store_api.R b/samples/client/petstore/R/R/store_api.R index 570a9fcf630a..6ecf422e7a2d 100644 --- a/samples/client/petstore/R/R/store_api.R +++ b/samples/client/petstore/R/R/store_api.R @@ -333,16 +333,16 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "map(integer)"), error = function(e) { @@ -474,16 +474,16 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), error = function(e) { @@ -605,16 +605,16 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), error = function(e) { diff --git a/samples/client/petstore/R/R/user_api.R b/samples/client/petstore/R/R/user_api.R index d22ca310fdef..1cb5a80eddba 100644 --- a/samples/client/petstore/R/R/user_api.R +++ b/samples/client/petstore/R/R/user_api.R @@ -807,16 +807,16 @@ UserApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), error = function(e) { @@ -958,16 +958,16 @@ UserApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - # save response in a file - if (!is.null(data_file)) { - self$api_client$WriteFile(local_var_resp, data_file) - } - if (!.parse) { local_var_resp$content <- local_var_resp$response_as_text() return(local_var_resp) } + # save response in a file + if (!is.null(data_file)) { + self$api_client$WriteFile(local_var_resp, data_file) + } + deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), error = function(e) { From 122acd2725cefaed4712ecd73d4ac8b6c98687d0 Mon Sep 17 00:00:00 2001 From: Matthew Pollock Date: Thu, 15 Jan 2026 14:11:23 -0500 Subject: [PATCH 5/5] try, try, again --- .../src/main/resources/r/api.mustache | 13 ++- samples/client/echo_api/r/R/auth_api.R | 18 ++-- samples/client/echo_api/r/R/body_api.R | 90 ++++++++--------- samples/client/echo_api/r/R/form_api.R | 27 +++-- samples/client/echo_api/r/R/header_api.R | 9 +- samples/client/echo_api/r/R/path_api.R | 9 +- samples/client/echo_api/r/R/query_api.R | 99 +++++++++---------- .../petstore/R-httr2-wrapper/R/fake_api.R | 18 ++-- .../petstore/R-httr2-wrapper/R/pet_api.R | 72 ++++++-------- .../petstore/R-httr2-wrapper/R/store_api.R | 27 +++-- .../petstore/R-httr2-wrapper/R/user_api.R | 18 ++-- samples/client/petstore/R-httr2/R/fake_api.R | 18 ++-- samples/client/petstore/R-httr2/R/pet_api.R | 72 ++++++-------- samples/client/petstore/R-httr2/R/store_api.R | 27 +++-- samples/client/petstore/R-httr2/R/user_api.R | 18 ++-- samples/client/petstore/R/R/fake_api.R | 18 ++-- samples/client/petstore/R/R/pet_api.R | 72 ++++++-------- samples/client/petstore/R/R/store_api.R | 27 +++-- samples/client/petstore/R/R/user_api.R | 18 ++-- 19 files changed, 300 insertions(+), 370 deletions(-) diff --git a/modules/openapi-generator/src/main/resources/r/api.mustache b/modules/openapi-generator/src/main/resources/r/api.mustache index 2fc80ecfda39..7eda7cf45ca6 100644 --- a/modules/openapi-generator/src/main/resources/r/api.mustache +++ b/modules/openapi-generator/src/main/resources/r/api.mustache @@ -561,16 +561,15 @@ {{/vendorExtensions.x-streaming}} if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { {{#returnType}} - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - {{#isPrimitiveType}} # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } ApiResponse$new(content,resp) {{/isPrimitiveType}} @@ -579,6 +578,10 @@ if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "{{returnType}}"), diff --git a/samples/client/echo_api/r/R/auth_api.R b/samples/client/echo_api/r/R/auth_api.R index 0638fb07be31..4b617b97a61c 100644 --- a/samples/client/echo_api/r/R/auth_api.R +++ b/samples/client/echo_api/r/R/auth_api.R @@ -133,15 +133,14 @@ AuthApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -231,15 +230,14 @@ AuthApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), diff --git a/samples/client/echo_api/r/R/body_api.R b/samples/client/echo_api/r/R/body_api.R index 2386d4acd50b..2b6cee8e51ff 100644 --- a/samples/client/echo_api/r/R/body_api.R +++ b/samples/client/echo_api/r/R/body_api.R @@ -235,15 +235,14 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "data.frame"), @@ -341,15 +340,14 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -446,15 +444,14 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -547,15 +544,14 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -653,15 +649,14 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -759,15 +754,14 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -865,15 +859,14 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -971,15 +964,14 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -1077,15 +1069,14 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "StringEnumRef"), @@ -1183,15 +1174,14 @@ BodyApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), diff --git a/samples/client/echo_api/r/R/form_api.R b/samples/client/echo_api/r/R/form_api.R index 79c3b7e0bbec..1c996610c9d8 100644 --- a/samples/client/echo_api/r/R/form_api.R +++ b/samples/client/echo_api/r/R/form_api.R @@ -166,15 +166,14 @@ FormApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -271,15 +270,14 @@ FormApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -407,15 +405,14 @@ FormApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), diff --git a/samples/client/echo_api/r/R/header_api.R b/samples/client/echo_api/r/R/header_api.R index 94ea97199064..b2513c58a595 100644 --- a/samples/client/echo_api/r/R/header_api.R +++ b/samples/client/echo_api/r/R/header_api.R @@ -154,15 +154,14 @@ HeaderApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), diff --git a/samples/client/echo_api/r/R/path_api.R b/samples/client/echo_api/r/R/path_api.R index c43f96a07e50..1db17b398d77 100644 --- a/samples/client/echo_api/r/R/path_api.R +++ b/samples/client/echo_api/r/R/path_api.R @@ -169,15 +169,14 @@ PathApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), diff --git a/samples/client/echo_api/r/R/query_api.R b/samples/client/echo_api/r/R/query_api.R index cbeeaa719603..b6a809770701 100644 --- a/samples/client/echo_api/r/R/query_api.R +++ b/samples/client/echo_api/r/R/query_api.R @@ -275,15 +275,14 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -393,15 +392,14 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -511,15 +509,14 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -613,15 +610,14 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -715,15 +711,14 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -818,15 +813,14 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -921,15 +915,14 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -1023,15 +1016,14 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -1125,15 +1117,14 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -1227,15 +1218,14 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), @@ -1338,15 +1328,14 @@ QueryApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), diff --git a/samples/client/petstore/R-httr2-wrapper/R/fake_api.R b/samples/client/petstore/R-httr2-wrapper/R/fake_api.R index 5cd8cdb17387..a6c55eae5c34 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/fake_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/fake_api.R @@ -262,15 +262,14 @@ FakeApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -400,15 +399,14 @@ FakeApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), diff --git a/samples/client/petstore/R-httr2-wrapper/R/pet_api.R b/samples/client/petstore/R-httr2-wrapper/R/pet_api.R index 3273242350f2..5a1b52fdbb79 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/pet_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/pet_api.R @@ -472,15 +472,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -733,15 +732,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), @@ -861,15 +859,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), @@ -994,15 +991,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -1138,15 +1134,14 @@ PetApi <- R6::R6Class( } if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -1280,15 +1275,14 @@ PetApi <- R6::R6Class( } if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -1414,15 +1408,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -1693,15 +1686,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "ModelApiResponse"), diff --git a/samples/client/petstore/R-httr2-wrapper/R/store_api.R b/samples/client/petstore/R-httr2-wrapper/R/store_api.R index a18cc4d50a18..4f2be31cddaf 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/store_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/store_api.R @@ -333,15 +333,14 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "map(integer)"), @@ -474,15 +473,14 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), @@ -605,15 +603,14 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), diff --git a/samples/client/petstore/R-httr2-wrapper/R/user_api.R b/samples/client/petstore/R-httr2-wrapper/R/user_api.R index 8e97e5db77aa..8775a7e93d16 100644 --- a/samples/client/petstore/R-httr2-wrapper/R/user_api.R +++ b/samples/client/petstore/R-httr2-wrapper/R/user_api.R @@ -807,15 +807,14 @@ UserApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), @@ -958,15 +957,14 @@ UserApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), diff --git a/samples/client/petstore/R-httr2/R/fake_api.R b/samples/client/petstore/R-httr2/R/fake_api.R index 5ed9ee4ab030..b7490f684c9c 100644 --- a/samples/client/petstore/R-httr2/R/fake_api.R +++ b/samples/client/petstore/R-httr2/R/fake_api.R @@ -262,15 +262,14 @@ FakeApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -400,15 +399,14 @@ FakeApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), diff --git a/samples/client/petstore/R-httr2/R/pet_api.R b/samples/client/petstore/R-httr2/R/pet_api.R index 7ee384f68910..30c3caa7b8bc 100644 --- a/samples/client/petstore/R-httr2/R/pet_api.R +++ b/samples/client/petstore/R-httr2/R/pet_api.R @@ -472,15 +472,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -733,15 +732,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), @@ -861,15 +859,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), @@ -994,15 +991,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -1138,15 +1134,14 @@ PetApi <- R6::R6Class( } if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -1280,15 +1275,14 @@ PetApi <- R6::R6Class( } if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -1414,15 +1408,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -1693,15 +1686,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "ModelApiResponse"), diff --git a/samples/client/petstore/R-httr2/R/store_api.R b/samples/client/petstore/R-httr2/R/store_api.R index 3bb1f81f13f0..f2302e76dc5c 100644 --- a/samples/client/petstore/R-httr2/R/store_api.R +++ b/samples/client/petstore/R-httr2/R/store_api.R @@ -333,15 +333,14 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "map(integer)"), @@ -474,15 +473,14 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), @@ -605,15 +603,14 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), diff --git a/samples/client/petstore/R-httr2/R/user_api.R b/samples/client/petstore/R-httr2/R/user_api.R index 737418a72725..9800d222af60 100644 --- a/samples/client/petstore/R-httr2/R/user_api.R +++ b/samples/client/petstore/R-httr2/R/user_api.R @@ -807,15 +807,14 @@ UserApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), @@ -958,15 +957,14 @@ UserApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"), diff --git a/samples/client/petstore/R/R/fake_api.R b/samples/client/petstore/R/R/fake_api.R index 2f97e1a9def9..28740ac72a1c 100644 --- a/samples/client/petstore/R/R/fake_api.R +++ b/samples/client/petstore/R/R/fake_api.R @@ -262,15 +262,14 @@ FakeApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -400,15 +399,14 @@ FakeApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), diff --git a/samples/client/petstore/R/R/pet_api.R b/samples/client/petstore/R/R/pet_api.R index 65f01dfb2cb1..7cae9084e852 100644 --- a/samples/client/petstore/R/R/pet_api.R +++ b/samples/client/petstore/R/R/pet_api.R @@ -472,15 +472,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -733,15 +732,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), @@ -861,15 +859,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "array[Pet]"), @@ -994,15 +991,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -1138,15 +1134,14 @@ PetApi <- R6::R6Class( } if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -1280,15 +1275,14 @@ PetApi <- R6::R6Class( } if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -1414,15 +1408,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Pet"), @@ -1693,15 +1686,14 @@ PetApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "ModelApiResponse"), diff --git a/samples/client/petstore/R/R/store_api.R b/samples/client/petstore/R/R/store_api.R index 6ecf422e7a2d..1f9d3b76b3a5 100644 --- a/samples/client/petstore/R/R/store_api.R +++ b/samples/client/petstore/R/R/store_api.R @@ -333,15 +333,14 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "map(integer)"), @@ -474,15 +473,14 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), @@ -605,15 +603,14 @@ StoreApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "Order"), diff --git a/samples/client/petstore/R/R/user_api.R b/samples/client/petstore/R/R/user_api.R index 1cb5a80eddba..f211ae688dcd 100644 --- a/samples/client/petstore/R/R/user_api.R +++ b/samples/client/petstore/R/R/user_api.R @@ -807,15 +807,14 @@ UserApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "User"), @@ -958,15 +957,14 @@ UserApi <- R6::R6Class( ...) if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) { - if (!.parse) { - local_var_resp$content <- local_var_resp$response_as_text() - return(local_var_resp) - } - # save response in a file if (!is.null(data_file)) { self$api_client$WriteFile(local_var_resp, data_file) } + if (!.parse) { + local_var_resp$content <- local_var_resp$response_as_text() + return(local_var_resp) + } deserialized_resp_obj <- tryCatch( self$api_client$DeserializeResponse(local_var_resp, "character"),