forked from loafle/openapi-generator-original
[R] fix assignment, better doc (#12979)
* better code format * fix doc comment, remove blank line * ignore .lintr in rbuildignore
This commit is contained in:
parent
0ce606c7c5
commit
e4b268613c
@ -11,6 +11,7 @@
|
||||
^\.gitignore$
|
||||
^\.openapi-generator-ignore$
|
||||
^\.travis\.yml$
|
||||
^\.lintr$
|
||||
^\.github$
|
||||
^\.openapi-generator$
|
||||
^docs$
|
||||
|
@ -12,7 +12,7 @@
|
||||
{{#operation}}
|
||||
#' \strong{ {{operationId}} } \emph{ {{summary}} }
|
||||
{{#notes}}
|
||||
#' {{notes}}
|
||||
#' {{{.}}}
|
||||
{{/notes}}
|
||||
#'
|
||||
#' \itemize{
|
||||
@ -64,7 +64,7 @@
|
||||
{{#responses}}
|
||||
#' \item status code : {{code}} | {{message}}
|
||||
#'
|
||||
#'{{#dataType}} \item return type : {{.}} {{/dataType}}
|
||||
#'{{#dataType}} \item return type : {{.}}{{/dataType}}
|
||||
#' \item response headers :
|
||||
#'
|
||||
#' \tabular{ll}{
|
||||
@ -182,7 +182,7 @@
|
||||
#' @param {{{paramName}}} {{{description}}}
|
||||
{{/requiredParams}}
|
||||
{{#optionalParams}}
|
||||
#' @param {{{paramName}}} (optional){{{description}}} {{#defaultValue}} (default value: {{{.}}}){{/defaultValue}}
|
||||
#' @param {{{paramName}}} (optional) {{{description}}}{{^description}}No description{{/description}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}}
|
||||
{{/optionalParams}}
|
||||
{{#vendorExtensions.x-streaming}}
|
||||
#' @param stream_callback (optional) callback function to process the data stream
|
||||
@ -193,7 +193,7 @@
|
||||
#' @param ... Other optional arguments
|
||||
#' @return {{{returnType}}}{{^returnType}}void{{/returnType}}
|
||||
#' @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}}...)
|
||||
{{#vendorExtensions.x-streaming}}
|
||||
if (typeof(stream_callback) == "closure") { # return void if streaming is enabled
|
||||
@ -221,7 +221,7 @@
|
||||
#' @param {{{paramName}}} {{{description}}}
|
||||
{{/requiredParams}}
|
||||
{{#optionalParams}}
|
||||
#' @param {{{paramName}}} (optional) {{{description}}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}}
|
||||
#' @param {{{paramName}}} (optional) {{{description}}}{{^description}}No description{{/description}}{{#defaultValue}} (default value: {{{.}}}){{/defaultValue}}
|
||||
{{/optionalParams}}
|
||||
{{#vendorExtensions.x-streaming}}
|
||||
#' @param stream_callback (optional) callback function to process the data stream
|
||||
@ -232,7 +232,7 @@
|
||||
#' @param ... Other optional arguments
|
||||
#' @return API response ({{{returnType}}}{{^returnType}}void{{/returnType}}) with additional information such as HTTP status code, headers
|
||||
#' @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(...)
|
||||
query_params <- list()
|
||||
header_params <- c()
|
||||
@ -276,7 +276,9 @@
|
||||
{{#bodyParams}}
|
||||
if (!missing(`{{paramName}}`)) {
|
||||
{{#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, "]")
|
||||
{{/isArray}}
|
||||
{{^isArray}}
|
||||
@ -407,7 +409,7 @@
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
{{#returnExceptionOnFailure}}
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
{{#useDefaultExceptionHandling}}
|
||||
@ -425,7 +427,7 @@
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
{{#returnExceptionOnFailure}}
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
{{#useDefaultExceptionHandling}}
|
||||
|
@ -1,5 +1,3 @@
|
||||
{{#models}}
|
||||
{{#model}}
|
||||
#' @docType class
|
||||
#' @title {{classname}}
|
||||
#' @description {{classname}} Class
|
||||
@ -9,10 +7,6 @@
|
||||
{{/vars}}
|
||||
#' @importFrom R6 R6Class
|
||||
#' @importFrom jsonlite fromJSON toJSON
|
||||
{{#isEnum}}
|
||||
{{>modelEnum}}
|
||||
{{/isEnum}}
|
||||
{{^isEnum}}
|
||||
#' @export
|
||||
{{classname}} <- R6::R6Class(
|
||||
"{{classname}}",
|
||||
@ -239,18 +233,18 @@
|
||||
{{#isContainer}}
|
||||
{{#isArray}}
|
||||
{{#isPrimitiveType}}
|
||||
paste(unlist(lapply(self$`{{{name}}}`, function(x) paste0('"', x, '"'))), collapse=",")
|
||||
paste(unlist(lapply(self$`{{{name}}}`, function(x) paste0('"', x, '"'))), collapse = ",")
|
||||
{{/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}}
|
||||
{{/isArray}}
|
||||
{{#isMap}}
|
||||
{{#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}}
|
||||
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}}
|
||||
{{/isMap}}
|
||||
{{/isContainer}}
|
||||
@ -259,7 +253,7 @@
|
||||
{{#isBoolean}}tolower({{/isBoolean}}self$`{{name}}`{{#isBoolean}}){{/isBoolean}}
|
||||
{{/isPrimitiveType}}
|
||||
{{^isPrimitiveType}}
|
||||
jsonlite::toJSON(self$`{{name}}`$toJSON(), auto_unbox=TRUE, digits = NA)
|
||||
jsonlite::toJSON(self$`{{name}}`$toJSON(), auto_unbox = TRUE, digits = NA)
|
||||
{{/isPrimitiveType}}
|
||||
{{/isContainer}}
|
||||
)
|
||||
@ -363,6 +357,3 @@
|
||||
}
|
||||
)
|
||||
)
|
||||
{{/isEnum}}
|
||||
{{/model}}
|
||||
{{/models}}
|
||||
|
@ -11,6 +11,7 @@
|
||||
^\.gitignore$
|
||||
^\.openapi-generator-ignore$
|
||||
^\.travis\.yml$
|
||||
^\.lintr$
|
||||
^\.github$
|
||||
^\.openapi-generator$
|
||||
^docs$
|
||||
|
@ -213,4 +213,3 @@ AllofTagApiResponse <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -150,4 +150,3 @@ Animal <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -155,4 +155,3 @@ AnyOfPig <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -156,4 +156,3 @@ BasquePig <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -174,4 +174,3 @@ Cat <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -121,4 +121,3 @@ CatAllOf <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -144,4 +144,3 @@ Category <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -156,4 +156,3 @@ DanishPig <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -174,4 +174,3 @@ Dog <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -121,4 +121,3 @@ DogAllOf <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -93,12 +93,12 @@ FakeApi <- R6::R6Class(
|
||||
#' test data_file to ensure it's escaped correctly
|
||||
#'
|
||||
#' @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 ... Other optional arguments
|
||||
#' @return User
|
||||
#' @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, ...)
|
||||
resp <- api_response$response
|
||||
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
|
||||
@ -122,7 +122,7 @@ FakeApi <- R6::R6Class(
|
||||
#' @param ... Other optional arguments
|
||||
#' @return API response (User) with additional information such as HTTP status code, headers
|
||||
#' @export
|
||||
FakeDataFileWithHttpInfo = function(dummy, var_data_file=NULL, data_file = NULL, ...) {
|
||||
FakeDataFileWithHttpInfo = function(dummy, var_data_file = NULL, data_file = NULL, ...) {
|
||||
args <- list(...)
|
||||
query_params <- list()
|
||||
header_params <- c()
|
||||
@ -169,7 +169,7 @@ FakeApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -177,7 +177,7 @@ FakeApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
|
@ -167,4 +167,3 @@ ModelApiResponse <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -103,7 +103,7 @@ NestedOneOf <- R6::R6Class(
|
||||
'"nested_pig":
|
||||
%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(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -236,4 +236,3 @@ Order <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -161,7 +161,7 @@ Pet <- R6::R6Class(
|
||||
'"category":
|
||||
%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`)) {
|
||||
@ -177,7 +177,7 @@ Pet <- R6::R6Class(
|
||||
'"photoUrls":
|
||||
[%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`)) {
|
||||
@ -185,7 +185,7 @@ Pet <- R6::R6Class(
|
||||
'"tags":
|
||||
[%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`)) {
|
||||
@ -253,4 +253,3 @@ Pet <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -620,7 +620,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -628,7 +628,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -642,11 +642,11 @@ PetApi <- R6::R6Class(
|
||||
#' Deletes a pet
|
||||
#'
|
||||
#' @param pet_id Pet id to delete
|
||||
#' @param api_key (optional)
|
||||
#' @param api_key (optional) No description
|
||||
#' @param ... Other optional arguments
|
||||
#' @return void
|
||||
#' @export
|
||||
DeletePet = function(pet_id, api_key=NULL, ...) {
|
||||
DeletePet = function(pet_id, api_key = NULL, ...) {
|
||||
api_response <- self$DeletePetWithHttpInfo(pet_id, api_key, ...)
|
||||
resp <- api_response$response
|
||||
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
|
||||
@ -665,11 +665,11 @@ PetApi <- R6::R6Class(
|
||||
#' Deletes a pet
|
||||
#'
|
||||
#' @param pet_id Pet id to delete
|
||||
#' @param api_key (optional)
|
||||
#' @param api_key (optional) No description
|
||||
#' @param ... Other optional arguments
|
||||
#' @return API response (void) with additional information such as HTTP status code, headers
|
||||
#' @export
|
||||
DeletePetWithHttpInfo = function(pet_id, api_key=NULL, ...) {
|
||||
DeletePetWithHttpInfo = function(pet_id, api_key = NULL, ...) {
|
||||
args <- list(...)
|
||||
query_params <- list()
|
||||
header_params <- c()
|
||||
@ -709,7 +709,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -717,7 +717,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -807,7 +807,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -815,7 +815,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -905,7 +905,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -913,7 +913,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -1006,7 +1006,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -1014,7 +1014,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -1033,7 +1033,7 @@ PetApi <- R6::R6Class(
|
||||
#' @param ... Other optional arguments
|
||||
#' @return Pet
|
||||
#' @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, ...)
|
||||
if (typeof(stream_callback) == "closure") { # return void if streaming is enabled
|
||||
return(invisible(NULL))
|
||||
@ -1061,7 +1061,7 @@ PetApi <- R6::R6Class(
|
||||
#' @param ... Other optional arguments
|
||||
#' @return API response (Pet) with additional information such as HTTP status code, headers
|
||||
#' @export
|
||||
GetPetByIdStreamingWithHttpInfo = function(pet_id, stream_callback=NULL, data_file = NULL, ...) {
|
||||
GetPetByIdStreamingWithHttpInfo = function(pet_id, stream_callback = NULL, data_file = NULL, ...) {
|
||||
args <- list(...)
|
||||
query_params <- list()
|
||||
header_params <- c()
|
||||
@ -1121,7 +1121,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -1129,7 +1129,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -1224,7 +1224,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -1232,7 +1232,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -1246,12 +1246,12 @@ PetApi <- R6::R6Class(
|
||||
#' Updates a pet in the store with form data
|
||||
#'
|
||||
#' @param pet_id ID of pet that needs to be updated
|
||||
#' @param name (optional)Updated name of the pet
|
||||
#' @param status (optional)Updated status of the pet
|
||||
#' @param name (optional) Updated name of the pet
|
||||
#' @param status (optional) Updated status of the pet
|
||||
#' @param ... Other optional arguments
|
||||
#' @return void
|
||||
#' @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, ...)
|
||||
resp <- api_response$response
|
||||
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
|
||||
@ -1275,7 +1275,7 @@ PetApi <- R6::R6Class(
|
||||
#' @param ... Other optional arguments
|
||||
#' @return API response (void) with additional information such as HTTP status code, headers
|
||||
#' @export
|
||||
UpdatePetWithFormWithHttpInfo = function(pet_id, name=NULL, status=NULL, ...) {
|
||||
UpdatePetWithFormWithHttpInfo = function(pet_id, name = NULL, status = NULL, ...) {
|
||||
args <- list(...)
|
||||
query_params <- list()
|
||||
header_params <- c()
|
||||
@ -1319,7 +1319,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -1327,7 +1327,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -1341,13 +1341,13 @@ PetApi <- R6::R6Class(
|
||||
#' uploads an image
|
||||
#'
|
||||
#' @param pet_id ID of pet to update
|
||||
#' @param additional_metadata (optional)Additional data to pass to server
|
||||
#' @param file (optional)file to upload
|
||||
#' @param additional_metadata (optional) Additional data to pass to server
|
||||
#' @param file (optional) file to upload
|
||||
#' @param data_file (optional) name of the data file to save the result
|
||||
#' @param ... Other optional arguments
|
||||
#' @return ModelApiResponse
|
||||
#' @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, ...)
|
||||
resp <- api_response$response
|
||||
if (httr::status_code(resp) >= 200 && httr::status_code(resp) <= 299) {
|
||||
@ -1372,7 +1372,7 @@ PetApi <- R6::R6Class(
|
||||
#' @param ... Other optional arguments
|
||||
#' @return API response (ModelApiResponse) with additional information such as HTTP status code, headers
|
||||
#' @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(...)
|
||||
query_params <- list()
|
||||
header_params <- c()
|
||||
@ -1429,7 +1429,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -1437,7 +1437,7 @@ PetApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
|
@ -171,4 +171,3 @@ Pig <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -236,4 +236,3 @@ Special <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#' @section Methods:
|
||||
#' \describe{
|
||||
#' \strong{ DeleteOrder } \emph{ Delete purchase order by ID }
|
||||
#' For valid response try integer IDs with value < 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{
|
||||
#' \item \emph{ @param } order_id character
|
||||
@ -55,7 +55,7 @@
|
||||
#' }
|
||||
#'
|
||||
#' \strong{ GetOrderById } \emph{ Find purchase order by ID }
|
||||
#' For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
#' For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
|
||||
#'
|
||||
#' \itemize{
|
||||
#' \item \emph{ @param } order_id integer
|
||||
@ -308,7 +308,7 @@ StoreApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -316,7 +316,7 @@ StoreApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -399,7 +399,7 @@ StoreApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -407,7 +407,7 @@ StoreApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -499,7 +499,7 @@ StoreApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -507,7 +507,7 @@ StoreApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -600,7 +600,7 @@ StoreApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -608,7 +608,7 @@ StoreApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
|
@ -144,4 +144,3 @@ Tag <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -94,7 +94,7 @@ UpdatePetRequest <- R6::R6Class(
|
||||
'"jsonData":
|
||||
%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`)) {
|
||||
@ -145,4 +145,3 @@ UpdatePetRequest <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -282,4 +282,3 @@ User <- R6::R6Class(
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
|
@ -499,7 +499,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -507,7 +507,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -559,7 +559,9 @@ UserApi <- R6::R6Class(
|
||||
}
|
||||
|
||||
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, "]")
|
||||
} else {
|
||||
body <- NULL
|
||||
@ -590,7 +592,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -598,7 +600,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -650,7 +652,9 @@ UserApi <- R6::R6Class(
|
||||
}
|
||||
|
||||
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, "]")
|
||||
} else {
|
||||
body <- NULL
|
||||
@ -681,7 +685,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -689,7 +693,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -770,7 +774,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -778,7 +782,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -870,7 +874,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -878,7 +882,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -975,7 +979,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -983,7 +987,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -1051,7 +1055,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -1059,7 +1063,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -1154,7 +1158,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 400 && httr::status_code(resp) <= 499) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api client exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
@ -1162,7 +1166,7 @@ UserApi <- R6::R6Class(
|
||||
ApiException = ApiException$new(http_response = resp))
|
||||
} else if (httr::status_code(resp) >= 500 && httr::status_code(resp) <= 599) {
|
||||
error_msg <- toString(content(resp))
|
||||
if(error_msg == "") {
|
||||
if (error_msg == "") {
|
||||
error_msg <- "Api server exception encountered."
|
||||
}
|
||||
rlang::abort(message = error_msg,
|
||||
|
Loading…
x
Reference in New Issue
Block a user