[R] fix assignment, better doc (#12979)

* better code format

* fix doc comment, remove blank line

* ignore .lintr in rbuildignore
This commit is contained in:
William Cheng 2022-07-22 13:08:01 +08:00 committed by GitHub
parent 0ce606c7c5
commit e4b268613c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 109 additions and 129 deletions

View File

@ -11,6 +11,7 @@
^\.gitignore$ ^\.gitignore$
^\.openapi-generator-ignore$ ^\.openapi-generator-ignore$
^\.travis\.yml$ ^\.travis\.yml$
^\.lintr$
^\.github$ ^\.github$
^\.openapi-generator$ ^\.openapi-generator$
^docs$ ^docs$

View File

@ -12,7 +12,7 @@
{{#operation}} {{#operation}}
#' \strong{ {{operationId}} } \emph{ {{summary}} } #' \strong{ {{operationId}} } \emph{ {{summary}} }
{{#notes}} {{#notes}}
#' {{notes}} #' {{{.}}}
{{/notes}} {{/notes}}
#' #'
#' \itemize{ #' \itemize{
@ -64,7 +64,7 @@
{{#responses}} {{#responses}}
#' \item status code : {{code}} | {{message}} #' \item status code : {{code}} | {{message}}
#' #'
#'{{#dataType}} \item return type : {{.}} {{/dataType}} #'{{#dataType}} \item return type : {{.}}{{/dataType}}
#' \item response headers : #' \item response headers :
#' #'
#' \tabular{ll}{ #' \tabular{ll}{
@ -182,7 +182,7 @@
#' @param {{{paramName}}} {{{description}}} #' @param {{{paramName}}} {{{description}}}
{{/requiredParams}} {{/requiredParams}}
{{#optionalParams}} {{#optionalParams}}
#' @param {{{paramName}}} (optional){{{description}}} {{#defaultValue}} (default value: {{{.}}}){{/defaultValue}} #' @param {{{paramName}}} (optional) {{{description}}}{{^description}}No description{{/description}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}}
{{/optionalParams}} {{/optionalParams}}
{{#vendorExtensions.x-streaming}} {{#vendorExtensions.x-streaming}}
#' @param stream_callback (optional) callback function to process the data stream #' @param stream_callback (optional) callback function to process the data stream
@ -193,7 +193,7 @@
#' @param ... Other optional arguments #' @param ... Other optional arguments
#' @return {{{returnType}}}{{^returnType}}void{{/returnType}} #' @return {{{returnType}}}{{^returnType}}void{{/returnType}}
#' @export #' @export
{{{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}}...) { {{{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}}...) {
api_response <- self${{{operationId}}}WithHttpInfo({{#allParams}}{{paramName}}, {{/allParams}}{{#vendorExtensions.x-streaming}}stream_callback = stream_callback, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = data_file, {{/returnType}}...) api_response <- self${{{operationId}}}WithHttpInfo({{#allParams}}{{paramName}}, {{/allParams}}{{#vendorExtensions.x-streaming}}stream_callback = stream_callback, {{/vendorExtensions.x-streaming}}{{#returnType}}data_file = data_file, {{/returnType}}...)
{{#vendorExtensions.x-streaming}} {{#vendorExtensions.x-streaming}}
if (typeof(stream_callback) == "closure") { # return void if streaming is enabled if (typeof(stream_callback) == "closure") { # return void if streaming is enabled
@ -221,7 +221,7 @@
#' @param {{{paramName}}} {{{description}}} #' @param {{{paramName}}} {{{description}}}
{{/requiredParams}} {{/requiredParams}}
{{#optionalParams}} {{#optionalParams}}
#' @param {{{paramName}}} (optional) {{{description}}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}} #' @param {{{paramName}}} (optional) {{{description}}}{{^description}}No description{{/description}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}}
{{/optionalParams}} {{/optionalParams}}
{{#vendorExtensions.x-streaming}} {{#vendorExtensions.x-streaming}}
#' @param stream_callback (optional) callback function to process the data stream #' @param stream_callback (optional) callback function to process the data stream
@ -232,7 +232,7 @@
#' @param ... Other optional arguments #' @param ... Other optional arguments
#' @return API response ({{{returnType}}}{{^returnType}}void{{/returnType}}) with additional information such as HTTP status code, headers #' @return API response ({{{returnType}}}{{^returnType}}void{{/returnType}}) with additional information such as HTTP status code, headers
#' @export #' @export
{{{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, {{/returnType}}...) {
args <- list(...) args <- list(...)
query_params <- list() query_params <- list()
header_params <- c() header_params <- c()
@ -276,7 +276,9 @@
{{#bodyParams}} {{#bodyParams}}
if (!missing(`{{paramName}}`)) { if (!missing(`{{paramName}}`)) {
{{#isArray}} {{#isArray}}
body.items = paste(unlist(lapply({{paramName}}, function(param) {param$toJSONString()})), collapse = ",") body.items <- paste(unlist(lapply({{paramName}}, function(param) {
param$toJSONString()
})), collapse = ",")
body <- paste0("[", body.items, "]") body <- paste0("[", body.items, "]")
{{/isArray}} {{/isArray}}
{{^isArray}} {{^isArray}}
@ -407,7 +409,7 @@
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
{{#returnExceptionOnFailure}} {{#returnExceptionOnFailure}}
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
{{#useDefaultExceptionHandling}} {{#useDefaultExceptionHandling}}
@ -425,7 +427,7 @@
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
{{#returnExceptionOnFailure}} {{#returnExceptionOnFailure}}
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
{{#useDefaultExceptionHandling}} {{#useDefaultExceptionHandling}}

View File

@ -131,4 +131,4 @@
as.character(jsonlite::prettify(paste("{", jsoncontent, "}", sep = ""))) as.character(jsonlite::prettify(paste("{", jsoncontent, "}", sep = "")))
} }
) )
) )

View File

@ -45,4 +45,4 @@
) )
unlist(strsplit(res, ", ")) unlist(strsplit(res, ", "))
} }
{{/allowableValues}} {{/allowableValues}}

View File

@ -1,5 +1,3 @@
{{#models}}
{{#model}}
#' @docType class #' @docType class
#' @title {{classname}} #' @title {{classname}}
#' @description {{classname}} Class #' @description {{classname}} Class
@ -9,10 +7,6 @@
{{/vars}} {{/vars}}
#' @importFrom R6 R6Class #' @importFrom R6 R6Class
#' @importFrom jsonlite fromJSON toJSON #' @importFrom jsonlite fromJSON toJSON
{{#isEnum}}
{{>modelEnum}}
{{/isEnum}}
{{^isEnum}}
#' @export #' @export
{{classname}} <- R6::R6Class( {{classname}} <- R6::R6Class(
"{{classname}}", "{{classname}}",
@ -239,18 +233,18 @@
{{#isContainer}} {{#isContainer}}
{{#isArray}} {{#isArray}}
{{#isPrimitiveType}} {{#isPrimitiveType}}
paste(unlist(lapply(self$`{{{name}}}`, function(x) paste0('"', x, '"'))), collapse=",") paste(unlist(lapply(self$`{{{name}}}`, function(x) paste0('"', x, '"'))), collapse = ",")
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{^isPrimitiveType}} {{^isPrimitiveType}}
paste(sapply(self$`{{{name}}}`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox=TRUE, digits = NA)), collapse=",") paste(sapply(self$`{{{name}}}`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox = TRUE, digits = NA)), collapse = ",")
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{/isArray}} {{/isArray}}
{{#isMap}} {{#isMap}}
{{#isPrimitiveType}} {{#isPrimitiveType}}
jsonlite::toJSON(lapply(self$`{{{name}}}`, function(x){ x }), auto_unbox = TRUE, digits=NA) jsonlite::toJSON(lapply(self$`{{{name}}}`, function(x){ x }), auto_unbox = TRUE, digits = NA)
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{^isPrimitiveType}} {{^isPrimitiveType}}
jsonlite::toJSON(lapply(self$`{{{name}}}`, function(x){ x$toJSON() }), auto_unbox = TRUE, digits=NA) jsonlite::toJSON(lapply(self$`{{{name}}}`, function(x){ x$toJSON() }), auto_unbox = TRUE, digits = NA)
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{/isMap}} {{/isMap}}
{{/isContainer}} {{/isContainer}}
@ -259,7 +253,7 @@
{{#isBoolean}}tolower({{/isBoolean}}self$`{{name}}`{{#isBoolean}}){{/isBoolean}} {{#isBoolean}}tolower({{/isBoolean}}self$`{{name}}`{{#isBoolean}}){{/isBoolean}}
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{^isPrimitiveType}} {{^isPrimitiveType}}
jsonlite::toJSON(self$`{{name}}`$toJSON(), auto_unbox=TRUE, digits = NA) jsonlite::toJSON(self$`{{name}}`$toJSON(), auto_unbox = TRUE, digits = NA)
{{/isPrimitiveType}} {{/isPrimitiveType}}
{{/isContainer}} {{/isContainer}}
) )
@ -362,7 +356,4 @@
self$toJSONString() self$toJSONString()
} }
) )
) )
{{/isEnum}}
{{/model}}
{{/models}}

View File

@ -146,4 +146,4 @@
as.character(jsonlite::prettify(paste("{", jsoncontent, "}", sep = ""))) as.character(jsonlite::prettify(paste("{", jsoncontent, "}", sep = "")))
} }
) )
) )

View File

@ -11,6 +11,7 @@
^\.gitignore$ ^\.gitignore$
^\.openapi-generator-ignore$ ^\.openapi-generator-ignore$
^\.travis\.yml$ ^\.travis\.yml$
^\.lintr$
^\.github$ ^\.github$
^\.openapi-generator$ ^\.openapi-generator$
^docs$ ^docs$

View File

@ -213,4 +213,3 @@ AllofTagApiResponse <- R6::R6Class(
} }
) )
) )

View File

@ -150,4 +150,3 @@ Animal <- R6::R6Class(
} }
) )
) )

View File

@ -155,4 +155,3 @@ AnyOfPig <- R6::R6Class(
} }
) )
) )

View File

@ -156,4 +156,3 @@ BasquePig <- R6::R6Class(
} }
) )
) )

View File

@ -174,4 +174,3 @@ Cat <- R6::R6Class(
} }
) )
) )

View File

@ -121,4 +121,3 @@ CatAllOf <- R6::R6Class(
} }
) )
) )

View File

@ -144,4 +144,3 @@ Category <- R6::R6Class(
} }
) )
) )

View File

@ -156,4 +156,3 @@ DanishPig <- R6::R6Class(
} }
) )
) )

View File

@ -174,4 +174,3 @@ Dog <- R6::R6Class(
} }
) )
) )

View File

@ -121,4 +121,3 @@ DogAllOf <- R6::R6Class(
} }
) )
) )

View File

@ -26,7 +26,7 @@
#' #'
#' \item status code : 200 | successful operation #' \item status code : 200 | successful operation
#' #'
#' \item return type : User #' \item return type : User
#' \item response headers : #' \item response headers :
#' #'
#' \tabular{ll}{ #' \tabular{ll}{
@ -93,12 +93,12 @@ FakeApi <- R6::R6Class(
#' test data_file to ensure it's escaped correctly #' test data_file to ensure it's escaped correctly
#' #'
#' @param dummy dummy required parameter #' @param dummy dummy required parameter
#' @param var_data_file (optional)header data file #' @param var_data_file (optional) header data file
#' @param data_file (optional) name of the data file to save the result #' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments #' @param ... Other optional arguments
#' @return User #' @return User
#' @export #' @export
FakeDataFile = function(dummy, var_data_file=NULL, data_file = NULL, ...) { FakeDataFile = function(dummy, var_data_file = NULL, data_file = NULL, ...) {
api_response <- self$FakeDataFileWithHttpInfo(dummy, var_data_file, data_file = data_file, ...) api_response <- self$FakeDataFileWithHttpInfo(dummy, var_data_file, data_file = data_file, ...)
resp <- api_response$response resp <- api_response$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
@ -122,7 +122,7 @@ FakeApi <- R6::R6Class(
#' @param ... Other optional arguments #' @param ... Other optional arguments
#' @return API response (User) with additional information such as HTTP status code, headers #' @return API response (User) with additional information such as HTTP status code, headers
#' @export #' @export
FakeDataFileWithHttpInfo = function(dummy, var_data_file=NULL, data_file = NULL, ...) { FakeDataFileWithHttpInfo = function(dummy, var_data_file = NULL, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- list() query_params <- list()
header_params <- c() header_params <- c()
@ -169,7 +169,7 @@ FakeApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -177,7 +177,7 @@ FakeApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,

View File

@ -167,4 +167,3 @@ ModelApiResponse <- R6::R6Class(
} }
) )
) )

View File

@ -103,7 +103,7 @@ NestedOneOf <- R6::R6Class(
'"nested_pig": '"nested_pig":
%s %s
', ',
jsonlite::toJSON(self$`nested_pig`$toJSON(), auto_unbox=TRUE, digits = NA) jsonlite::toJSON(self$`nested_pig`$toJSON(), auto_unbox = TRUE, digits = NA)
) )
} }
) )
@ -146,4 +146,3 @@ NestedOneOf <- R6::R6Class(
} }
) )
) )

View File

@ -236,4 +236,3 @@ Order <- R6::R6Class(
} }
) )
) )

View File

@ -161,7 +161,7 @@ Pet <- R6::R6Class(
'"category": '"category":
%s %s
', ',
jsonlite::toJSON(self$`category`$toJSON(), auto_unbox=TRUE, digits = NA) jsonlite::toJSON(self$`category`$toJSON(), auto_unbox = TRUE, digits = NA)
) )
}, },
if (!is.null(self$`name`)) { if (!is.null(self$`name`)) {
@ -177,7 +177,7 @@ Pet <- R6::R6Class(
'"photoUrls": '"photoUrls":
[%s] [%s]
', ',
paste(unlist(lapply(self$`photoUrls`, function(x) paste0('"', x, '"'))), collapse=",") paste(unlist(lapply(self$`photoUrls`, function(x) paste0('"', x, '"'))), collapse = ",")
) )
}, },
if (!is.null(self$`tags`)) { if (!is.null(self$`tags`)) {
@ -185,7 +185,7 @@ Pet <- R6::R6Class(
'"tags": '"tags":
[%s] [%s]
', ',
paste(sapply(self$`tags`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox=TRUE, digits = NA)), collapse=",") paste(sapply(self$`tags`, function(x) jsonlite::toJSON(x$toJSON(), auto_unbox = TRUE, digits = NA)), collapse = ",")
) )
}, },
if (!is.null(self$`status`)) { if (!is.null(self$`status`)) {
@ -253,4 +253,3 @@ Pet <- R6::R6Class(
} }
) )
) )

View File

@ -25,7 +25,7 @@
#' #'
#' \item status code : 200 | successful operation #' \item status code : 200 | successful operation
#' #'
#' \item return type : Pet #' \item return type : Pet
#' \item response headers : #' \item response headers :
#' #'
#' \tabular{ll}{ #' \tabular{ll}{
@ -68,7 +68,7 @@
#' #'
#' \item status code : 200 | successful operation #' \item status code : 200 | successful operation
#' #'
#' \item return type : array[Pet] #' \item return type : array[Pet]
#' \item response headers : #' \item response headers :
#' #'
#' \tabular{ll}{ #' \tabular{ll}{
@ -93,7 +93,7 @@
#' #'
#' \item status code : 200 | successful operation #' \item status code : 200 | successful operation
#' #'
#' \item return type : array[Pet] #' \item return type : array[Pet]
#' \item response headers : #' \item response headers :
#' #'
#' \tabular{ll}{ #' \tabular{ll}{
@ -118,7 +118,7 @@
#' #'
#' \item status code : 200 | successful operation #' \item status code : 200 | successful operation
#' #'
#' \item return type : Pet #' \item return type : Pet
#' \item response headers : #' \item response headers :
#' #'
#' \tabular{ll}{ #' \tabular{ll}{
@ -150,7 +150,7 @@
#' #'
#' \item status code : 200 | successful operation #' \item status code : 200 | successful operation
#' #'
#' \item return type : Pet #' \item return type : Pet
#' \item response headers : #' \item response headers :
#' #'
#' \tabular{ll}{ #' \tabular{ll}{
@ -182,7 +182,7 @@
#' #'
#' \item status code : 200 | successful operation #' \item status code : 200 | successful operation
#' #'
#' \item return type : Pet #' \item return type : Pet
#' \item response headers : #' \item response headers :
#' #'
#' \tabular{ll}{ #' \tabular{ll}{
@ -242,7 +242,7 @@
#' #'
#' \item status code : 200 | successful operation #' \item status code : 200 | successful operation
#' #'
#' \item return type : ModelApiResponse #' \item return type : ModelApiResponse
#' \item response headers : #' \item response headers :
#' #'
#' \tabular{ll}{ #' \tabular{ll}{
@ -620,7 +620,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -628,7 +628,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -642,11 +642,11 @@ PetApi <- R6::R6Class(
#' Deletes a pet #' Deletes a pet
#' #'
#' @param pet_id Pet id to delete #' @param pet_id Pet id to delete
#' @param api_key (optional) #' @param api_key (optional) No description
#' @param ... Other optional arguments #' @param ... Other optional arguments
#' @return void #' @return void
#' @export #' @export
DeletePet = function(pet_id, api_key=NULL, ...) { DeletePet = function(pet_id, api_key = NULL, ...) {
api_response <- self$DeletePetWithHttpInfo(pet_id, api_key, ...) api_response <- self$DeletePetWithHttpInfo(pet_id, api_key, ...)
resp <- api_response$response resp <- api_response$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
@ -665,11 +665,11 @@ PetApi <- R6::R6Class(
#' Deletes a pet #' Deletes a pet
#' #'
#' @param pet_id Pet id to delete #' @param pet_id Pet id to delete
#' @param api_key (optional) #' @param api_key (optional) No description
#' @param ... Other optional arguments #' @param ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers #' @return API response (void) with additional information such as HTTP status code, headers
#' @export #' @export
DeletePetWithHttpInfo = function(pet_id, api_key=NULL, ...) { DeletePetWithHttpInfo = function(pet_id, api_key = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- list() query_params <- list()
header_params <- c() header_params <- c()
@ -709,7 +709,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -717,7 +717,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -807,7 +807,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -815,7 +815,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -905,7 +905,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -913,7 +913,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -1006,7 +1006,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -1014,7 +1014,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -1033,7 +1033,7 @@ PetApi <- R6::R6Class(
#' @param ... Other optional arguments #' @param ... Other optional arguments
#' @return Pet #' @return Pet
#' @export #' @export
GetPetByIdStreaming = function(pet_id, stream_callback=NULL, data_file = NULL, ...) { GetPetByIdStreaming = function(pet_id, stream_callback = NULL, data_file = NULL, ...) {
api_response <- self$GetPetByIdStreamingWithHttpInfo(pet_id, stream_callback = stream_callback, data_file = data_file, ...) api_response <- self$GetPetByIdStreamingWithHttpInfo(pet_id, stream_callback = stream_callback, data_file = data_file, ...)
if (typeof(stream_callback) == "closure") { # return void if streaming is enabled if (typeof(stream_callback) == "closure") { # return void if streaming is enabled
return(invisible(NULL)) return(invisible(NULL))
@ -1061,7 +1061,7 @@ PetApi <- R6::R6Class(
#' @param ... Other optional arguments #' @param ... Other optional arguments
#' @return API response (Pet) with additional information such as HTTP status code, headers #' @return API response (Pet) with additional information such as HTTP status code, headers
#' @export #' @export
GetPetByIdStreamingWithHttpInfo = function(pet_id, stream_callback=NULL, data_file = NULL, ...) { GetPetByIdStreamingWithHttpInfo = function(pet_id, stream_callback = NULL, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- list() query_params <- list()
header_params <- c() header_params <- c()
@ -1121,7 +1121,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -1129,7 +1129,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -1224,7 +1224,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -1232,7 +1232,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -1246,12 +1246,12 @@ PetApi <- R6::R6Class(
#' Updates a pet in the store with form data #' Updates a pet in the store with form data
#' #'
#' @param pet_id ID of pet that needs to be updated #' @param pet_id ID of pet that needs to be updated
#' @param name (optional)Updated name of the pet #' @param name (optional) Updated name of the pet
#' @param status (optional)Updated status of the pet #' @param status (optional) Updated status of the pet
#' @param ... Other optional arguments #' @param ... Other optional arguments
#' @return void #' @return void
#' @export #' @export
UpdatePetWithForm = function(pet_id, name=NULL, status=NULL, ...) { UpdatePetWithForm = function(pet_id, name = NULL, status = NULL, ...) {
api_response <- self$UpdatePetWithFormWithHttpInfo(pet_id, name, status, ...) api_response <- self$UpdatePetWithFormWithHttpInfo(pet_id, name, status, ...)
resp <- api_response$response resp <- api_response$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
@ -1275,7 +1275,7 @@ PetApi <- R6::R6Class(
#' @param ... Other optional arguments #' @param ... Other optional arguments
#' @return API response (void) with additional information such as HTTP status code, headers #' @return API response (void) with additional information such as HTTP status code, headers
#' @export #' @export
UpdatePetWithFormWithHttpInfo = function(pet_id, name=NULL, status=NULL, ...) { UpdatePetWithFormWithHttpInfo = function(pet_id, name = NULL, status = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- list() query_params <- list()
header_params <- c() header_params <- c()
@ -1319,7 +1319,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -1327,7 +1327,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -1341,13 +1341,13 @@ PetApi <- R6::R6Class(
#' uploads an image #' uploads an image
#' #'
#' @param pet_id ID of pet to update #' @param pet_id ID of pet to update
#' @param additional_metadata (optional)Additional data to pass to server #' @param additional_metadata (optional) Additional data to pass to server
#' @param file (optional)file to upload #' @param file (optional) file to upload
#' @param data_file (optional) name of the data file to save the result #' @param data_file (optional) name of the data file to save the result
#' @param ... Other optional arguments #' @param ... Other optional arguments
#' @return ModelApiResponse #' @return ModelApiResponse
#' @export #' @export
UploadFile = function(pet_id, additional_metadata=NULL, file=NULL, data_file = NULL, ...) { UploadFile = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ...) {
api_response <- self$UploadFileWithHttpInfo(pet_id, additional_metadata, file, data_file = data_file, ...) api_response <- self$UploadFileWithHttpInfo(pet_id, additional_metadata, file, data_file = data_file, ...)
resp <- api_response$response resp <- api_response$response
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) { if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
@ -1372,7 +1372,7 @@ PetApi <- R6::R6Class(
#' @param ... Other optional arguments #' @param ... Other optional arguments
#' @return API response (ModelApiResponse) with additional information such as HTTP status code, headers #' @return API response (ModelApiResponse) with additional information such as HTTP status code, headers
#' @export #' @export
UploadFileWithHttpInfo = function(pet_id, additional_metadata=NULL, file=NULL, data_file = NULL, ...) { UploadFileWithHttpInfo = function(pet_id, additional_metadata = NULL, file = NULL, data_file = NULL, ...) {
args <- list(...) args <- list(...)
query_params <- list() query_params <- list()
header_params <- c() header_params <- c()
@ -1429,7 +1429,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -1437,7 +1437,7 @@ PetApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,

View File

@ -171,4 +171,3 @@ Pig <- R6::R6Class(
} }
) )
) )

View File

@ -236,4 +236,3 @@ Special <- R6::R6Class(
} }
) )
) )

View File

@ -15,7 +15,7 @@
#' @section Methods: #' @section Methods:
#' \describe{ #' \describe{
#' \strong{ DeleteOrder } \emph{ Delete purchase order by ID } #' \strong{ DeleteOrder } \emph{ Delete purchase order by ID }
#' For valid response try integer IDs with value &lt; 1000. Anything above 1000 or nonintegers will generate API errors #' For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
#' #'
#' \itemize{ #' \itemize{
#' \item \emph{ @param } order_id character #' \item \emph{ @param } order_id character
@ -47,7 +47,7 @@
#' #'
#' \item status code : 200 | successful operation #' \item status code : 200 | successful operation
#' #'
#' \item return type : map(integer) #' \item return type : map(integer)
#' \item response headers : #' \item response headers :
#' #'
#' \tabular{ll}{ #' \tabular{ll}{
@ -55,7 +55,7 @@
#' } #' }
#' #'
#' \strong{ GetOrderById } \emph{ Find purchase order by ID } #' \strong{ GetOrderById } \emph{ Find purchase order by ID }
#' For valid response try integer IDs with value &lt;&#x3D; 5 or &gt; 10. Other values will generated exceptions #' For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
#' #'
#' \itemize{ #' \itemize{
#' \item \emph{ @param } order_id integer #' \item \emph{ @param } order_id integer
@ -65,7 +65,7 @@
#' #'
#' \item status code : 200 | successful operation #' \item status code : 200 | successful operation
#' #'
#' \item return type : Order #' \item return type : Order
#' \item response headers : #' \item response headers :
#' #'
#' \tabular{ll}{ #' \tabular{ll}{
@ -97,7 +97,7 @@
#' #'
#' \item status code : 200 | successful operation #' \item status code : 200 | successful operation
#' #'
#' \item return type : Order #' \item return type : Order
#' \item response headers : #' \item response headers :
#' #'
#' \tabular{ll}{ #' \tabular{ll}{
@ -308,7 +308,7 @@ StoreApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -316,7 +316,7 @@ StoreApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -399,7 +399,7 @@ StoreApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -407,7 +407,7 @@ StoreApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -499,7 +499,7 @@ StoreApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -507,7 +507,7 @@ StoreApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -600,7 +600,7 @@ StoreApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -608,7 +608,7 @@ StoreApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,

View File

@ -144,4 +144,3 @@ Tag <- R6::R6Class(
} }
) )
) )

View File

@ -94,7 +94,7 @@ UpdatePetRequest <- R6::R6Class(
'"jsonData": '"jsonData":
%s %s
', ',
jsonlite::toJSON(self$`jsonData`$toJSON(), auto_unbox=TRUE, digits = NA) jsonlite::toJSON(self$`jsonData`$toJSON(), auto_unbox = TRUE, digits = NA)
) )
}, },
if (!is.null(self$`binaryDataN2Information`)) { if (!is.null(self$`binaryDataN2Information`)) {
@ -145,4 +145,3 @@ UpdatePetRequest <- R6::R6Class(
} }
) )
) )

View File

@ -282,4 +282,3 @@ User <- R6::R6Class(
} }
) )
) )

View File

@ -100,7 +100,7 @@
#' #'
#' \item status code : 200 | successful operation #' \item status code : 200 | successful operation
#' #'
#' \item return type : User #' \item return type : User
#' \item response headers : #' \item response headers :
#' #'
#' \tabular{ll}{ #' \tabular{ll}{
@ -132,7 +132,7 @@
#' #'
#' \item status code : 200 | successful operation #' \item status code : 200 | successful operation
#' #'
#' \item return type : character #' \item return type : character
#' \item response headers : #' \item response headers :
#' #'
#' \tabular{ll}{ #' \tabular{ll}{
@ -499,7 +499,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -507,7 +507,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -559,7 +559,9 @@ UserApi <- R6::R6Class(
} }
if (!missing(`user`)) { if (!missing(`user`)) {
body.items = paste(unlist(lapply(user, function(param) {param$toJSONString()})), collapse = ",") body.items <- paste(unlist(lapply(user, function(param) {
param$toJSONString()
})), collapse = ",")
body <- paste0("[", body.items, "]") body <- paste0("[", body.items, "]")
} else { } else {
body <- NULL body <- NULL
@ -590,7 +592,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -598,7 +600,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -650,7 +652,9 @@ UserApi <- R6::R6Class(
} }
if (!missing(`user`)) { if (!missing(`user`)) {
body.items = paste(unlist(lapply(user, function(param) {param$toJSONString()})), collapse = ",") body.items <- paste(unlist(lapply(user, function(param) {
param$toJSONString()
})), collapse = ",")
body <- paste0("[", body.items, "]") body <- paste0("[", body.items, "]")
} else { } else {
body <- NULL body <- NULL
@ -681,7 +685,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -689,7 +693,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -770,7 +774,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -778,7 +782,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -870,7 +874,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -878,7 +882,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -975,7 +979,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -983,7 +987,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -1051,7 +1055,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -1059,7 +1063,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -1154,7 +1158,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) { } else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api client exception encountered." error_msg <- "Api client exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,
@ -1162,7 +1166,7 @@ UserApi <- R6::R6Class(
ApiException = ApiException$new(http_response = resp)) ApiException = ApiException$new(http_response = resp))
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) { } else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
error_msg <- toString(content(resp)) error_msg <- toString(content(resp))
if(error_msg == "") { if (error_msg == "") {
error_msg <- "Api server exception encountered." error_msg <- "Api server exception encountered."
} }
rlang::abort(message = error_msg, rlang::abort(message = error_msg,