forked from loafle/openapi-generator-original
R - better code format (#13691)
* r - beter code format * better readme * update instruction
This commit is contained in:
parent
3ed6503075
commit
daf475a96d
@ -63,6 +63,17 @@ install.packages("{{{packageName}}}_{{{packageVersion}}}.tar.gz", repos = NULL,
|
|||||||
library({{{packageName}}})
|
library({{{packageName}}})
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Reformat code
|
||||||
|
|
||||||
|
To reformat code using [styler](https://styler.r-lib.org/index.html), please run the following in the R console:
|
||||||
|
|
||||||
|
```R
|
||||||
|
install.packages("remotes")
|
||||||
|
remotes::install_github("r-lib/styler@v1.7.0.9003")
|
||||||
|
library("styler")
|
||||||
|
style_dir()
|
||||||
|
```
|
||||||
|
|
||||||
## Documentation for API Endpoints
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
All URIs are relative to *{{basePath}}*
|
All URIs are relative to *{{basePath}}*
|
||||||
|
@ -621,11 +621,11 @@
|
|||||||
{{#returnType}}
|
{{#returnType}}
|
||||||
{{#isPrimitiveType}}
|
{{#isPrimitiveType}}
|
||||||
local_var_content <- local_var_resp$response
|
local_var_content <- local_var_resp$response
|
||||||
local_var_resp, "text", encoding = "UTF-8", simplifyVector = FALSE
|
local_var_resp, "text", encoding = "UTF-8", simplifyVector = FALSE
|
||||||
)
|
)
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_content, data_file)
|
write(local_var_content, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiResponse$new(content,resp)
|
ApiResponse$new(content,resp)
|
||||||
@ -633,20 +633,20 @@
|
|||||||
{{^isPrimitiveType}}
|
{{^isPrimitiveType}}
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "{{returnType}}", loadNamespace("{{packageName}}")),
|
self$api_client$deserialize(local_var_resp$response, "{{returnType}}", loadNamespace("{{packageName}}")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
{{#useDefaultExceptionHandling}}
|
{{#useDefaultExceptionHandling}}
|
||||||
stop("Failed to deserialize response")
|
stop("Failed to deserialize response")
|
||||||
{{/useDefaultExceptionHandling}}
|
{{/useDefaultExceptionHandling}}
|
||||||
{{#useRlangExceptionHandling}}
|
{{#useRlangExceptionHandling}}
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
{{/useRlangExceptionHandling}}
|
{{/useRlangExceptionHandling}}
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -671,12 +671,12 @@
|
|||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
{{/useRlangExceptionHandling}}
|
{{/useRlangExceptionHandling}}
|
||||||
{{/returnExceptionOnFailure}}
|
{{/returnExceptionOnFailure}}
|
||||||
{{^returnExceptionOnFailure}}
|
{{^returnExceptionOnFailure}}
|
||||||
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
|
ApiResponse$new(paste("Server returned ", local_var_resp$status_code, " response status code."), local_var_resp)
|
||||||
{{/returnExceptionOnFailure}}
|
{{/returnExceptionOnFailure}}
|
||||||
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
|
} else if (local_var_resp$status_code >= 400 && local_var_resp$status_code <= 499) {
|
||||||
{{#returnExceptionOnFailure}}
|
{{#returnExceptionOnFailure}}
|
||||||
local_var_error_msg <- local_var_resp$response
|
local_var_error_msg <- local_var_resp$response
|
||||||
if (local_var_error_msg == "") {
|
if (local_var_error_msg == "") {
|
||||||
local_var_error_msg <- "Api client exception encountered."
|
local_var_error_msg <- "Api client exception encountered."
|
||||||
@ -689,12 +689,12 @@
|
|||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
{{/useRlangExceptionHandling}}
|
{{/useRlangExceptionHandling}}
|
||||||
{{/returnExceptionOnFailure}}
|
{{/returnExceptionOnFailure}}
|
||||||
{{^returnExceptionOnFailure}}
|
{{^returnExceptionOnFailure}}
|
||||||
ApiResponse$new("API client error", local_var_resp)
|
ApiResponse$new("API client error", local_var_resp)
|
||||||
{{/returnExceptionOnFailure}}
|
{{/returnExceptionOnFailure}}
|
||||||
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
|
} else if (local_var_resp$status_code >= 500 && local_var_resp$status_code <= 599) {
|
||||||
{{#returnExceptionOnFailure}}
|
{{#returnExceptionOnFailure}}
|
||||||
local_var_error_msg <- local_var_resp$response
|
local_var_error_msg <- local_var_resp$response
|
||||||
if (local_var_error_msg == "") {
|
if (local_var_error_msg == "") {
|
||||||
local_var_error_msg <- "Api server exception encountered."
|
local_var_error_msg <- "Api server exception encountered."
|
||||||
@ -707,13 +707,13 @@
|
|||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
{{/useRlangExceptionHandling}}
|
{{/useRlangExceptionHandling}}
|
||||||
{{/returnExceptionOnFailure}}
|
{{/returnExceptionOnFailure}}
|
||||||
{{^returnExceptionOnFailure}}
|
{{^returnExceptionOnFailure}}
|
||||||
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
|
if (is.null(local_var_resp$response) || local_var_resp$response == "") {
|
||||||
local_var_resp$response <- "API server error"
|
local_var_resp$response <- "API server error"
|
||||||
}
|
}
|
||||||
local_var_resp
|
local_var_resp
|
||||||
{{/returnExceptionOnFailure}}
|
{{/returnExceptionOnFailure}}
|
||||||
}
|
}
|
||||||
}{{^-last}},{{/-last}}
|
}{{^-last}},{{/-last}}
|
||||||
{{/operation}}
|
{{/operation}}
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
#' @importFrom rlang abort
|
#' @importFrom rlang abort
|
||||||
{{/useRlangExceptionHandling}}
|
{{/useRlangExceptionHandling}}
|
||||||
#' @export
|
#' @export
|
||||||
ApiClient <- R6::R6Class(
|
ApiClient <- R6::R6Class(
|
||||||
"ApiClient",
|
"ApiClient",
|
||||||
public = list(
|
public = list(
|
||||||
# base path of all requests
|
# base path of all requests
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
{{/isAdditionalPropertiesTrue}}
|
{{/isAdditionalPropertiesTrue}}
|
||||||
{{#discriminator}}
|
{{#discriminator}}
|
||||||
`_discriminator_property_name` = '{{discriminator.propertyName}}',
|
`_discriminator_property_name` = '{{discriminator.propertyName}}',
|
||||||
{{#discriminator.mappedModels}}{{#-first}}`_discriminator_mapping_name` = c({{/-first}}'{{mappingName}}' = '{{modelName}}'{{^-last}},{{/-last}}{{#-last}}),{{/-last}}{{/discriminator.mappedModels}}
|
{{#discriminator.mappedModels}}{{#-first}}`_discriminator_mapping_name` = c({{/-first}}'{{mappingName}}' = '{{modelName}}'{{^-last}}, {{/-last}}{{#-last}}),{{/-last}}{{/discriminator.mappedModels}}
|
||||||
{{/discriminator}}
|
{{/discriminator}}
|
||||||
#' Initialize a new {{{classname}}} class.
|
#' Initialize a new {{{classname}}} class.
|
||||||
#'
|
#'
|
||||||
@ -50,9 +50,7 @@
|
|||||||
{{/isAdditionalPropertiesTrue}}
|
{{/isAdditionalPropertiesTrue}}
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function({{#requiredVars}}`{{name}}`, {{/requiredVars}}{{#optionalVars}}`{{name}}` = {{{defaultValue}}}{{^defaultValue}}NULL{{/defaultValue}}, {{/optionalVars}}{{#isAdditionalPropertiesTrue}}additional_properties = NULL, {{/isAdditionalPropertiesTrue}}...) {
|
||||||
{{#requiredVars}}`{{name}}`, {{/requiredVars}}{{#optionalVars}}`{{name}}` = {{{defaultValue}}}{{^defaultValue}}NULL{{/defaultValue}}, {{/optionalVars}}{{#isAdditionalPropertiesTrue}}additional_properties = NULL, {{/isAdditionalPropertiesTrue}}...
|
|
||||||
) {
|
|
||||||
{{#requiredVars}}
|
{{#requiredVars}}
|
||||||
if (!missing(`{{name}}`)) {
|
if (!missing(`{{name}}`)) {
|
||||||
{{^isContainer}}
|
{{^isContainer}}
|
||||||
@ -185,32 +183,32 @@
|
|||||||
{{#vars}}
|
{{#vars}}
|
||||||
if (!is.null(self$`{{name}}`)) {
|
if (!is.null(self$`{{name}}`)) {
|
||||||
{{classname}}Object[["{{baseName}}"]] <-
|
{{classname}}Object[["{{baseName}}"]] <-
|
||||||
{{#isContainer}}
|
{{#isContainer}}
|
||||||
{{#isArray}}
|
{{#isArray}}
|
||||||
{{#isPrimitiveType}}
|
{{#isPrimitiveType}}
|
||||||
self$`{{name}}`
|
self$`{{name}}`
|
||||||
{{/isPrimitiveType}}
|
{{/isPrimitiveType}}
|
||||||
{{^isPrimitiveType}}
|
{{^isPrimitiveType}}
|
||||||
lapply(self$`{{name}}`, function(x) x$toJSON())
|
lapply(self$`{{name}}`, function(x) x$toJSON())
|
||||||
{{/isPrimitiveType}}
|
{{/isPrimitiveType}}
|
||||||
{{/isArray}}
|
{{/isArray}}
|
||||||
{{#isMap}}
|
{{#isMap}}
|
||||||
{{#isPrimitiveType}}
|
{{#isPrimitiveType}}
|
||||||
self$`{{name}}`
|
self$`{{name}}`
|
||||||
{{/isPrimitiveType}}
|
{{/isPrimitiveType}}
|
||||||
{{^isPrimitiveType}}
|
{{^isPrimitiveType}}
|
||||||
lapply(self$`{{name}}`, function(x) x$toJSON())
|
lapply(self$`{{name}}`, function(x) x$toJSON())
|
||||||
{{/isPrimitiveType}}
|
{{/isPrimitiveType}}
|
||||||
{{/isMap}}
|
{{/isMap}}
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
{{^isContainer}}
|
{{^isContainer}}
|
||||||
{{#isPrimitiveType}}
|
{{#isPrimitiveType}}
|
||||||
self$`{{name}}`
|
self$`{{name}}`
|
||||||
{{/isPrimitiveType}}
|
{{/isPrimitiveType}}
|
||||||
{{^isPrimitiveType}}
|
{{^isPrimitiveType}}
|
||||||
self$`{{name}}`$toJSON()
|
self$`{{name}}`$toJSON()
|
||||||
{{/isPrimitiveType}}
|
{{/isPrimitiveType}}
|
||||||
{{/isContainer}}
|
{{/isContainer}}
|
||||||
}
|
}
|
||||||
{{/vars}}
|
{{/vars}}
|
||||||
{{#isAdditionalPropertiesTrue}}
|
{{#isAdditionalPropertiesTrue}}
|
||||||
@ -619,17 +617,18 @@
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#{{classname}}$unlock()
|
# {{classname}}$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#{{classname}}$set("public", "print", function(...) {
|
# {{classname}}$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#{{classname}}$lock()
|
# {{classname}}$lock()
|
||||||
|
@ -40,9 +40,7 @@ AllofTagApiResponse <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...) {
|
||||||
`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -270,18 +268,19 @@ AllofTagApiResponse <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#AllofTagApiResponse$unlock()
|
# AllofTagApiResponse$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#AllofTagApiResponse$set("public", "print", function(...) {
|
# AllofTagApiResponse$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#AllofTagApiResponse$lock()
|
# AllofTagApiResponse$lock()
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ Animal <- R6::R6Class(
|
|||||||
`_field_list` = c("className", "color"),
|
`_field_list` = c("className", "color"),
|
||||||
`additional_properties` = list(),
|
`additional_properties` = list(),
|
||||||
`_discriminator_property_name` = 'className',
|
`_discriminator_property_name` = 'className',
|
||||||
`_discriminator_mapping_name` = c('Cat' = 'Cat','Dog' = 'Dog'),
|
`_discriminator_mapping_name` = c('Cat' = 'Cat', 'Dog' = 'Dog'),
|
||||||
#' Initialize a new Animal class.
|
#' Initialize a new Animal class.
|
||||||
#'
|
#'
|
||||||
#' @description
|
#' @description
|
||||||
@ -33,9 +33,7 @@ Animal <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `color` = "red", additional_properties = NULL, ...) {
|
||||||
`className`, `color` = "red", additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -219,18 +217,19 @@ Animal <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Animal$unlock()
|
# Animal$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Animal$set("public", "print", function(...) {
|
# Animal$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Animal$lock()
|
# Animal$lock()
|
||||||
|
|
||||||
|
@ -31,9 +31,7 @@ BasquePig <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `color`, additional_properties = NULL, ...) {
|
||||||
`className`, `color`, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -233,18 +231,19 @@ BasquePig <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#BasquePig$unlock()
|
# BasquePig$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#BasquePig$set("public", "print", function(...) {
|
# BasquePig$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#BasquePig$lock()
|
# BasquePig$lock()
|
||||||
|
|
||||||
|
@ -35,9 +35,7 @@ Cat <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `color` = "red", `declawed` = NULL, additional_properties = NULL, ...) {
|
||||||
`className`, `color` = "red", `declawed` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -241,18 +239,19 @@ Cat <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Cat$unlock()
|
# Cat$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Cat$set("public", "print", function(...) {
|
# Cat$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Cat$lock()
|
# Cat$lock()
|
||||||
|
|
||||||
|
@ -28,9 +28,7 @@ CatAllOf <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`declawed` = NULL, additional_properties = NULL, ...) {
|
||||||
`declawed` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`declawed`)) {
|
if (!is.null(`declawed`)) {
|
||||||
stopifnot(is.logical(`declawed`), length(`declawed`) == 1)
|
stopifnot(is.logical(`declawed`), length(`declawed`) == 1)
|
||||||
self$`declawed` <- `declawed`
|
self$`declawed` <- `declawed`
|
||||||
@ -178,18 +176,19 @@ CatAllOf <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#CatAllOf$unlock()
|
# CatAllOf$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#CatAllOf$set("public", "print", function(...) {
|
# CatAllOf$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#CatAllOf$lock()
|
# CatAllOf$lock()
|
||||||
|
|
||||||
|
@ -31,9 +31,7 @@ Category <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `name` = NULL, additional_properties = NULL, ...) {
|
||||||
`id` = NULL, `name` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -209,18 +207,19 @@ Category <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Category$unlock()
|
# Category$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Category$set("public", "print", function(...) {
|
# Category$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Category$lock()
|
# Category$lock()
|
||||||
|
|
||||||
|
@ -31,9 +31,7 @@ DanishPig <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `size`, additional_properties = NULL, ...) {
|
||||||
`className`, `size`, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -233,18 +231,19 @@ DanishPig <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#DanishPig$unlock()
|
# DanishPig$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#DanishPig$set("public", "print", function(...) {
|
# DanishPig$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#DanishPig$lock()
|
# DanishPig$lock()
|
||||||
|
|
||||||
|
@ -34,9 +34,7 @@ Date <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `url_property`, `percent_description` = NULL, additional_properties = NULL, ...) {
|
||||||
`className`, `url_property`, `percent_description` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -272,18 +270,19 @@ Date <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Date$unlock()
|
# Date$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Date$set("public", "print", function(...) {
|
# Date$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Date$lock()
|
# Date$lock()
|
||||||
|
|
||||||
|
@ -35,9 +35,7 @@ Dog <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `color` = "red", `breed` = NULL, additional_properties = NULL, ...) {
|
||||||
`className`, `color` = "red", `breed` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -241,18 +239,19 @@ Dog <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Dog$unlock()
|
# Dog$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Dog$set("public", "print", function(...) {
|
# Dog$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Dog$lock()
|
# Dog$lock()
|
||||||
|
|
||||||
|
@ -28,9 +28,7 @@ DogAllOf <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`breed` = NULL, additional_properties = NULL, ...) {
|
||||||
`breed` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`breed`)) {
|
if (!is.null(`breed`)) {
|
||||||
stopifnot(is.character(`breed`), length(`breed`) == 1)
|
stopifnot(is.character(`breed`), length(`breed`) == 1)
|
||||||
self$`breed` <- `breed`
|
self$`breed` <- `breed`
|
||||||
@ -178,18 +176,19 @@ DogAllOf <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#DogAllOf$unlock()
|
# DogAllOf$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#DogAllOf$set("public", "print", function(...) {
|
# DogAllOf$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#DogAllOf$lock()
|
# DogAllOf$lock()
|
||||||
|
|
||||||
|
@ -361,15 +361,15 @@ FakeApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -481,15 +481,15 @@ FakeApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "User", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "User", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
|
@ -34,9 +34,7 @@ ModelApiResponse <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...) {
|
||||||
`code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`code`)) {
|
if (!is.null(`code`)) {
|
||||||
stopifnot(is.numeric(`code`), length(`code`) == 1)
|
stopifnot(is.numeric(`code`), length(`code`) == 1)
|
||||||
self$`code` <- `code`
|
self$`code` <- `code`
|
||||||
@ -224,18 +222,19 @@ ModelApiResponse <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#ModelApiResponse$unlock()
|
# ModelApiResponse$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#ModelApiResponse$set("public", "print", function(...) {
|
# ModelApiResponse$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#ModelApiResponse$lock()
|
# ModelApiResponse$lock()
|
||||||
|
|
||||||
|
@ -31,9 +31,7 @@ NestedOneOf <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`size` = NULL, `nested_pig` = NULL, additional_properties = NULL, ...) {
|
||||||
`size` = NULL, `nested_pig` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`size`)) {
|
if (!is.null(`size`)) {
|
||||||
stopifnot(is.numeric(`size`), length(`size`) == 1)
|
stopifnot(is.numeric(`size`), length(`size`) == 1)
|
||||||
self$`size` <- `size`
|
self$`size` <- `size`
|
||||||
@ -203,18 +201,19 @@ NestedOneOf <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#NestedOneOf$unlock()
|
# NestedOneOf$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#NestedOneOf$set("public", "print", function(...) {
|
# NestedOneOf$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#NestedOneOf$lock()
|
# NestedOneOf$lock()
|
||||||
|
|
||||||
|
@ -43,9 +43,7 @@ Order <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `petId` = NULL, `quantity` = NULL, `shipDate` = NULL, `status` = NULL, `complete` = FALSE, additional_properties = NULL, ...) {
|
||||||
`id` = NULL, `petId` = NULL, `quantity` = NULL, `shipDate` = NULL, `status` = NULL, `complete` = FALSE, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -302,18 +300,19 @@ Order <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Order$unlock()
|
# Order$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Order$set("public", "print", function(...) {
|
# Order$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Order$lock()
|
# Order$lock()
|
||||||
|
|
||||||
|
@ -43,9 +43,7 @@ Pet <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`name`, `photoUrls`, `id` = NULL, `category` = NULL, `tags` = NULL, `status` = NULL, additional_properties = NULL, ...) {
|
||||||
`name`, `photoUrls`, `id` = NULL, `category` = NULL, `tags` = NULL, `status` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`name`)) {
|
if (!missing(`name`)) {
|
||||||
stopifnot(is.character(`name`), length(`name`) == 1)
|
stopifnot(is.character(`name`), length(`name`) == 1)
|
||||||
self$`name` <- `name`
|
self$`name` <- `name`
|
||||||
@ -339,18 +337,19 @@ Pet <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Pet$unlock()
|
# Pet$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Pet$set("public", "print", function(...) {
|
# Pet$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Pet$lock()
|
# Pet$lock()
|
||||||
|
|
||||||
|
@ -742,15 +742,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -980,15 +980,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "array[Pet]", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "array[Pet]", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1096,15 +1096,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "array[Pet]", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "array[Pet]", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1217,15 +1217,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1349,15 +1349,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1479,15 +1479,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1601,15 +1601,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1839,15 +1839,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "ModelApiResponse", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "ModelApiResponse", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
|
@ -46,9 +46,7 @@ Special <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`set_test` = NULL, `item_self` = NULL, `item_private` = NULL, `item_super` = NULL, `123_number` = NULL, `array[test]` = NULL, `empty_string` = NULL, additional_properties = NULL, ...) {
|
||||||
`set_test` = NULL, `item_self` = NULL, `item_private` = NULL, `item_super` = NULL, `123_number` = NULL, `array[test]` = NULL, `empty_string` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`set_test`)) {
|
if (!is.null(`set_test`)) {
|
||||||
stopifnot(is.vector(`set_test`), length(`set_test`) != 0)
|
stopifnot(is.vector(`set_test`), length(`set_test`) != 0)
|
||||||
sapply(`set_test`, function(x) stopifnot(is.character(x)))
|
sapply(`set_test`, function(x) stopifnot(is.character(x)))
|
||||||
@ -328,18 +326,19 @@ Special <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Special$unlock()
|
# Special$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Special$set("public", "print", function(...) {
|
# Special$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Special$lock()
|
# Special$lock()
|
||||||
|
|
||||||
|
@ -434,15 +434,15 @@ StoreApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "map(integer)", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "map(integer)", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -563,15 +563,15 @@ StoreApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Order", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Order", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -682,15 +682,15 @@ StoreApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Order", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Order", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
|
@ -31,9 +31,7 @@ Tag <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `name` = NULL, additional_properties = NULL, ...) {
|
||||||
`id` = NULL, `name` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -201,18 +199,19 @@ Tag <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Tag$unlock()
|
# Tag$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Tag$set("public", "print", function(...) {
|
# Tag$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Tag$lock()
|
# Tag$lock()
|
||||||
|
|
||||||
|
@ -31,9 +31,7 @@ UpdatePetRequest <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`jsonData` = NULL, `binaryDataN2Information` = NULL, additional_properties = NULL, ...) {
|
||||||
`jsonData` = NULL, `binaryDataN2Information` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`jsonData`)) {
|
if (!is.null(`jsonData`)) {
|
||||||
stopifnot(R6::is.R6(`jsonData`))
|
stopifnot(R6::is.R6(`jsonData`))
|
||||||
self$`jsonData` <- `jsonData`
|
self$`jsonData` <- `jsonData`
|
||||||
@ -202,18 +200,19 @@ UpdatePetRequest <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#UpdatePetRequest$unlock()
|
# UpdatePetRequest$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#UpdatePetRequest$set("public", "print", function(...) {
|
# UpdatePetRequest$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#UpdatePetRequest$lock()
|
# UpdatePetRequest$lock()
|
||||||
|
|
||||||
|
@ -49,9 +49,7 @@ User <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `username` = NULL, `firstName` = NULL, `lastName` = NULL, `email` = NULL, `password` = NULL, `phone` = NULL, `userStatus` = NULL, additional_properties = NULL, ...) {
|
||||||
`id` = NULL, `username` = NULL, `firstName` = NULL, `lastName` = NULL, `email` = NULL, `password` = NULL, `phone` = NULL, `userStatus` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -339,18 +337,19 @@ User <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#User$unlock()
|
# User$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#User$set("public", "print", function(...) {
|
# User$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#User$lock()
|
# User$lock()
|
||||||
|
|
||||||
|
@ -966,15 +966,15 @@ UserApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "User", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "User", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1099,15 +1099,15 @@ UserApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "character", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "character", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
|
@ -34,9 +34,7 @@ Whale <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `hasBaleen` = NULL, `hasTeeth` = NULL, additional_properties = NULL, ...) {
|
||||||
`className`, `hasBaleen` = NULL, `hasTeeth` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -240,18 +238,19 @@ Whale <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Whale$unlock()
|
# Whale$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Whale$set("public", "print", function(...) {
|
# Whale$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Whale$lock()
|
# Whale$lock()
|
||||||
|
|
||||||
|
@ -31,9 +31,7 @@ Zebra <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `type` = NULL, additional_properties = NULL, ...) {
|
||||||
`className`, `type` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -226,18 +224,19 @@ Zebra <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Zebra$unlock()
|
# Zebra$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Zebra$set("public", "print", function(...) {
|
# Zebra$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Zebra$lock()
|
# Zebra$lock()
|
||||||
|
|
||||||
|
@ -55,6 +55,17 @@ install.packages("petstore_1.0.0.tar.gz", repos = NULL, type = "source")
|
|||||||
library(petstore)
|
library(petstore)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Reformat code
|
||||||
|
|
||||||
|
To reformat code using [styler](https://styler.r-lib.org/index.html), please run the following in the R console:
|
||||||
|
|
||||||
|
```R
|
||||||
|
install.packages("remotes")
|
||||||
|
remotes::install_github("r-lib/styler@v1.7.0.9003")
|
||||||
|
library("styler")
|
||||||
|
style_dir()
|
||||||
|
```
|
||||||
|
|
||||||
## Documentation for API Endpoints
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||||
|
@ -35,9 +35,7 @@ AllofTagApiResponse <- R6::R6Class(
|
|||||||
#' @param message message
|
#' @param message message
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, ...) {
|
||||||
`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -237,18 +235,19 @@ AllofTagApiResponse <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#AllofTagApiResponse$unlock()
|
# AllofTagApiResponse$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#AllofTagApiResponse$set("public", "print", function(...) {
|
# AllofTagApiResponse$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#AllofTagApiResponse$lock()
|
# AllofTagApiResponse$lock()
|
||||||
|
|
||||||
|
@ -18,7 +18,7 @@ Animal <- R6::R6Class(
|
|||||||
`className` = NULL,
|
`className` = NULL,
|
||||||
`color` = NULL,
|
`color` = NULL,
|
||||||
`_discriminator_property_name` = 'className',
|
`_discriminator_property_name` = 'className',
|
||||||
`_discriminator_mapping_name` = c('Cat' = 'Cat','Dog' = 'Dog'),
|
`_discriminator_mapping_name` = c('Cat' = 'Cat', 'Dog' = 'Dog'),
|
||||||
#' Initialize a new Animal class.
|
#' Initialize a new Animal class.
|
||||||
#'
|
#'
|
||||||
#' @description
|
#' @description
|
||||||
@ -28,9 +28,7 @@ Animal <- R6::R6Class(
|
|||||||
#' @param color color. Default to "red".
|
#' @param color color. Default to "red".
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `color` = "red", ...) {
|
||||||
`className`, `color` = "red", ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -186,18 +184,19 @@ Animal <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Animal$unlock()
|
# Animal$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Animal$set("public", "print", function(...) {
|
# Animal$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Animal$lock()
|
# Animal$lock()
|
||||||
|
|
||||||
|
@ -26,9 +26,7 @@ BasquePig <- R6::R6Class(
|
|||||||
#' @param color color
|
#' @param color color
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `color`, ...) {
|
||||||
`className`, `color`, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -200,18 +198,19 @@ BasquePig <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#BasquePig$unlock()
|
# BasquePig$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#BasquePig$set("public", "print", function(...) {
|
# BasquePig$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#BasquePig$lock()
|
# BasquePig$lock()
|
||||||
|
|
||||||
|
@ -30,9 +30,7 @@ Cat <- R6::R6Class(
|
|||||||
#' @param declawed declawed
|
#' @param declawed declawed
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `color` = "red", `declawed` = NULL, ...) {
|
||||||
`className`, `color` = "red", `declawed` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -208,18 +206,19 @@ Cat <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Cat$unlock()
|
# Cat$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Cat$set("public", "print", function(...) {
|
# Cat$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Cat$lock()
|
# Cat$lock()
|
||||||
|
|
||||||
|
@ -23,9 +23,7 @@ CatAllOf <- R6::R6Class(
|
|||||||
#' @param declawed declawed
|
#' @param declawed declawed
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`declawed` = NULL, ...) {
|
||||||
`declawed` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`declawed`)) {
|
if (!is.null(`declawed`)) {
|
||||||
stopifnot(is.logical(`declawed`), length(`declawed`) == 1)
|
stopifnot(is.logical(`declawed`), length(`declawed`) == 1)
|
||||||
self$`declawed` <- `declawed`
|
self$`declawed` <- `declawed`
|
||||||
@ -145,18 +143,19 @@ CatAllOf <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#CatAllOf$unlock()
|
# CatAllOf$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#CatAllOf$set("public", "print", function(...) {
|
# CatAllOf$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#CatAllOf$lock()
|
# CatAllOf$lock()
|
||||||
|
|
||||||
|
@ -26,9 +26,7 @@ Category <- R6::R6Class(
|
|||||||
#' @param name name
|
#' @param name name
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `name` = NULL, ...) {
|
||||||
`id` = NULL, `name` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -176,18 +174,19 @@ Category <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Category$unlock()
|
# Category$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Category$set("public", "print", function(...) {
|
# Category$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Category$lock()
|
# Category$lock()
|
||||||
|
|
||||||
|
@ -26,9 +26,7 @@ DanishPig <- R6::R6Class(
|
|||||||
#' @param size size
|
#' @param size size
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `size`, ...) {
|
||||||
`className`, `size`, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -200,18 +198,19 @@ DanishPig <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#DanishPig$unlock()
|
# DanishPig$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#DanishPig$set("public", "print", function(...) {
|
# DanishPig$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#DanishPig$lock()
|
# DanishPig$lock()
|
||||||
|
|
||||||
|
@ -29,9 +29,7 @@ Date <- R6::R6Class(
|
|||||||
#' @param percent_description using \% in the description
|
#' @param percent_description using \% in the description
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `url_property`, `percent_description` = NULL, ...) {
|
||||||
`className`, `url_property`, `percent_description` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -239,18 +237,19 @@ Date <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Date$unlock()
|
# Date$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Date$set("public", "print", function(...) {
|
# Date$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Date$lock()
|
# Date$lock()
|
||||||
|
|
||||||
|
@ -30,9 +30,7 @@ Dog <- R6::R6Class(
|
|||||||
#' @param breed breed
|
#' @param breed breed
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `color` = "red", `breed` = NULL, ...) {
|
||||||
`className`, `color` = "red", `breed` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -208,18 +206,19 @@ Dog <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Dog$unlock()
|
# Dog$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Dog$set("public", "print", function(...) {
|
# Dog$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Dog$lock()
|
# Dog$lock()
|
||||||
|
|
||||||
|
@ -23,9 +23,7 @@ DogAllOf <- R6::R6Class(
|
|||||||
#' @param breed breed
|
#' @param breed breed
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`breed` = NULL, ...) {
|
||||||
`breed` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`breed`)) {
|
if (!is.null(`breed`)) {
|
||||||
stopifnot(is.character(`breed`), length(`breed`) == 1)
|
stopifnot(is.character(`breed`), length(`breed`) == 1)
|
||||||
self$`breed` <- `breed`
|
self$`breed` <- `breed`
|
||||||
@ -145,18 +143,19 @@ DogAllOf <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#DogAllOf$unlock()
|
# DogAllOf$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#DogAllOf$set("public", "print", function(...) {
|
# DogAllOf$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#DogAllOf$lock()
|
# DogAllOf$lock()
|
||||||
|
|
||||||
|
@ -361,15 +361,15 @@ FakeApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -481,15 +481,15 @@ FakeApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "User", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "User", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
|
@ -29,9 +29,7 @@ ModelApiResponse <- R6::R6Class(
|
|||||||
#' @param message message
|
#' @param message message
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`code` = NULL, `type` = NULL, `message` = NULL, ...) {
|
||||||
`code` = NULL, `type` = NULL, `message` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`code`)) {
|
if (!is.null(`code`)) {
|
||||||
stopifnot(is.numeric(`code`), length(`code`) == 1)
|
stopifnot(is.numeric(`code`), length(`code`) == 1)
|
||||||
self$`code` <- `code`
|
self$`code` <- `code`
|
||||||
@ -191,18 +189,19 @@ ModelApiResponse <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#ModelApiResponse$unlock()
|
# ModelApiResponse$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#ModelApiResponse$set("public", "print", function(...) {
|
# ModelApiResponse$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#ModelApiResponse$lock()
|
# ModelApiResponse$lock()
|
||||||
|
|
||||||
|
@ -26,9 +26,7 @@ NestedOneOf <- R6::R6Class(
|
|||||||
#' @param nested_pig nested_pig
|
#' @param nested_pig nested_pig
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`size` = NULL, `nested_pig` = NULL, ...) {
|
||||||
`size` = NULL, `nested_pig` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`size`)) {
|
if (!is.null(`size`)) {
|
||||||
stopifnot(is.numeric(`size`), length(`size`) == 1)
|
stopifnot(is.numeric(`size`), length(`size`) == 1)
|
||||||
self$`size` <- `size`
|
self$`size` <- `size`
|
||||||
@ -170,18 +168,19 @@ NestedOneOf <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#NestedOneOf$unlock()
|
# NestedOneOf$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#NestedOneOf$set("public", "print", function(...) {
|
# NestedOneOf$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#NestedOneOf$lock()
|
# NestedOneOf$lock()
|
||||||
|
|
||||||
|
@ -38,9 +38,7 @@ Order <- R6::R6Class(
|
|||||||
#' @param complete complete. Default to FALSE.
|
#' @param complete complete. Default to FALSE.
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `petId` = NULL, `quantity` = NULL, `shipDate` = NULL, `status` = NULL, `complete` = FALSE, ...) {
|
||||||
`id` = NULL, `petId` = NULL, `quantity` = NULL, `shipDate` = NULL, `status` = NULL, `complete` = FALSE, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -269,18 +267,19 @@ Order <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Order$unlock()
|
# Order$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Order$set("public", "print", function(...) {
|
# Order$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Order$lock()
|
# Order$lock()
|
||||||
|
|
||||||
|
@ -38,9 +38,7 @@ Pet <- R6::R6Class(
|
|||||||
#' @param status pet status in the store
|
#' @param status pet status in the store
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`name`, `photoUrls`, `id` = NULL, `category` = NULL, `tags` = NULL, `status` = NULL, ...) {
|
||||||
`name`, `photoUrls`, `id` = NULL, `category` = NULL, `tags` = NULL, `status` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`name`)) {
|
if (!missing(`name`)) {
|
||||||
stopifnot(is.character(`name`), length(`name`) == 1)
|
stopifnot(is.character(`name`), length(`name`) == 1)
|
||||||
self$`name` <- `name`
|
self$`name` <- `name`
|
||||||
@ -306,18 +304,19 @@ Pet <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Pet$unlock()
|
# Pet$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Pet$set("public", "print", function(...) {
|
# Pet$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Pet$lock()
|
# Pet$lock()
|
||||||
|
|
||||||
|
@ -742,15 +742,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -980,15 +980,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "array[Pet]", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "array[Pet]", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1096,15 +1096,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "array[Pet]", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "array[Pet]", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1217,15 +1217,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1349,15 +1349,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1479,15 +1479,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1601,15 +1601,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1839,15 +1839,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "ModelApiResponse", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "ModelApiResponse", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
|
@ -41,9 +41,7 @@ Special <- R6::R6Class(
|
|||||||
#' @param empty_string empty_string
|
#' @param empty_string empty_string
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`set_test` = NULL, `item_self` = NULL, `item_private` = NULL, `item_super` = NULL, `123_number` = NULL, `array[test]` = NULL, `empty_string` = NULL, ...) {
|
||||||
`set_test` = NULL, `item_self` = NULL, `item_private` = NULL, `item_super` = NULL, `123_number` = NULL, `array[test]` = NULL, `empty_string` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`set_test`)) {
|
if (!is.null(`set_test`)) {
|
||||||
stopifnot(is.vector(`set_test`), length(`set_test`) != 0)
|
stopifnot(is.vector(`set_test`), length(`set_test`) != 0)
|
||||||
sapply(`set_test`, function(x) stopifnot(is.character(x)))
|
sapply(`set_test`, function(x) stopifnot(is.character(x)))
|
||||||
@ -295,18 +293,19 @@ Special <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Special$unlock()
|
# Special$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Special$set("public", "print", function(...) {
|
# Special$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Special$lock()
|
# Special$lock()
|
||||||
|
|
||||||
|
@ -434,15 +434,15 @@ StoreApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "map(integer)", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "map(integer)", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -563,15 +563,15 @@ StoreApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Order", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Order", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -682,15 +682,15 @@ StoreApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Order", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Order", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
|
@ -26,9 +26,7 @@ Tag <- R6::R6Class(
|
|||||||
#' @param name name
|
#' @param name name
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `name` = NULL, ...) {
|
||||||
`id` = NULL, `name` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -168,18 +166,19 @@ Tag <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Tag$unlock()
|
# Tag$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Tag$set("public", "print", function(...) {
|
# Tag$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Tag$lock()
|
# Tag$lock()
|
||||||
|
|
||||||
|
@ -26,9 +26,7 @@ UpdatePetRequest <- R6::R6Class(
|
|||||||
#' @param binaryDataN2Information binaryDataN2Information
|
#' @param binaryDataN2Information binaryDataN2Information
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`jsonData` = NULL, `binaryDataN2Information` = NULL, ...) {
|
||||||
`jsonData` = NULL, `binaryDataN2Information` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`jsonData`)) {
|
if (!is.null(`jsonData`)) {
|
||||||
stopifnot(R6::is.R6(`jsonData`))
|
stopifnot(R6::is.R6(`jsonData`))
|
||||||
self$`jsonData` <- `jsonData`
|
self$`jsonData` <- `jsonData`
|
||||||
@ -169,18 +167,19 @@ UpdatePetRequest <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#UpdatePetRequest$unlock()
|
# UpdatePetRequest$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#UpdatePetRequest$set("public", "print", function(...) {
|
# UpdatePetRequest$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#UpdatePetRequest$lock()
|
# UpdatePetRequest$lock()
|
||||||
|
|
||||||
|
@ -44,9 +44,7 @@ User <- R6::R6Class(
|
|||||||
#' @param userStatus User Status
|
#' @param userStatus User Status
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `username` = NULL, `firstName` = NULL, `lastName` = NULL, `email` = NULL, `password` = NULL, `phone` = NULL, `userStatus` = NULL, ...) {
|
||||||
`id` = NULL, `username` = NULL, `firstName` = NULL, `lastName` = NULL, `email` = NULL, `password` = NULL, `phone` = NULL, `userStatus` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -306,18 +304,19 @@ User <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#User$unlock()
|
# User$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#User$set("public", "print", function(...) {
|
# User$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#User$lock()
|
# User$lock()
|
||||||
|
|
||||||
|
@ -966,15 +966,15 @@ UserApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "User", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "User", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1099,15 +1099,15 @@ UserApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "character", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "character", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
|
@ -29,9 +29,7 @@ Whale <- R6::R6Class(
|
|||||||
#' @param hasTeeth hasTeeth
|
#' @param hasTeeth hasTeeth
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `hasBaleen` = NULL, `hasTeeth` = NULL, ...) {
|
||||||
`className`, `hasBaleen` = NULL, `hasTeeth` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -207,18 +205,19 @@ Whale <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Whale$unlock()
|
# Whale$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Whale$set("public", "print", function(...) {
|
# Whale$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Whale$lock()
|
# Whale$lock()
|
||||||
|
|
||||||
|
@ -26,9 +26,7 @@ Zebra <- R6::R6Class(
|
|||||||
#' @param type type
|
#' @param type type
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `type` = NULL, ...) {
|
||||||
`className`, `type` = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -193,18 +191,19 @@ Zebra <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Zebra$unlock()
|
# Zebra$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Zebra$set("public", "print", function(...) {
|
# Zebra$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Zebra$lock()
|
# Zebra$lock()
|
||||||
|
|
||||||
|
@ -55,6 +55,17 @@ install.packages("petstore_1.0.0.tar.gz", repos = NULL, type = "source")
|
|||||||
library(petstore)
|
library(petstore)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Reformat code
|
||||||
|
|
||||||
|
To reformat code using [styler](https://styler.r-lib.org/index.html), please run the following in the R console:
|
||||||
|
|
||||||
|
```R
|
||||||
|
install.packages("remotes")
|
||||||
|
remotes::install_github("r-lib/styler@v1.7.0.9003")
|
||||||
|
library("styler")
|
||||||
|
style_dir()
|
||||||
|
```
|
||||||
|
|
||||||
## Documentation for API Endpoints
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||||
|
@ -40,9 +40,7 @@ AllofTagApiResponse <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...) {
|
||||||
`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -270,18 +268,19 @@ AllofTagApiResponse <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#AllofTagApiResponse$unlock()
|
# AllofTagApiResponse$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#AllofTagApiResponse$set("public", "print", function(...) {
|
# AllofTagApiResponse$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#AllofTagApiResponse$lock()
|
# AllofTagApiResponse$lock()
|
||||||
|
|
||||||
|
@ -22,7 +22,7 @@ Animal <- R6::R6Class(
|
|||||||
`_field_list` = c("className", "color"),
|
`_field_list` = c("className", "color"),
|
||||||
`additional_properties` = list(),
|
`additional_properties` = list(),
|
||||||
`_discriminator_property_name` = 'className',
|
`_discriminator_property_name` = 'className',
|
||||||
`_discriminator_mapping_name` = c('Cat' = 'Cat','Dog' = 'Dog'),
|
`_discriminator_mapping_name` = c('Cat' = 'Cat', 'Dog' = 'Dog'),
|
||||||
#' Initialize a new Animal class.
|
#' Initialize a new Animal class.
|
||||||
#'
|
#'
|
||||||
#' @description
|
#' @description
|
||||||
@ -33,9 +33,7 @@ Animal <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `color` = "red", additional_properties = NULL, ...) {
|
||||||
`className`, `color` = "red", additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -219,18 +217,19 @@ Animal <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Animal$unlock()
|
# Animal$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Animal$set("public", "print", function(...) {
|
# Animal$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Animal$lock()
|
# Animal$lock()
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@
|
|||||||
#' @importFrom httr add_headers accept timeout content
|
#' @importFrom httr add_headers accept timeout content
|
||||||
#' @importFrom rlang abort
|
#' @importFrom rlang abort
|
||||||
#' @export
|
#' @export
|
||||||
ApiClient <- R6::R6Class(
|
ApiClient <- R6::R6Class(
|
||||||
"ApiClient",
|
"ApiClient",
|
||||||
public = list(
|
public = list(
|
||||||
# base path of all requests
|
# base path of all requests
|
||||||
|
@ -31,9 +31,7 @@ BasquePig <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `color`, additional_properties = NULL, ...) {
|
||||||
`className`, `color`, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -233,18 +231,19 @@ BasquePig <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#BasquePig$unlock()
|
# BasquePig$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#BasquePig$set("public", "print", function(...) {
|
# BasquePig$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#BasquePig$lock()
|
# BasquePig$lock()
|
||||||
|
|
||||||
|
@ -35,9 +35,7 @@ Cat <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `color` = "red", `declawed` = NULL, additional_properties = NULL, ...) {
|
||||||
`className`, `color` = "red", `declawed` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -241,18 +239,19 @@ Cat <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Cat$unlock()
|
# Cat$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Cat$set("public", "print", function(...) {
|
# Cat$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Cat$lock()
|
# Cat$lock()
|
||||||
|
|
||||||
|
@ -28,9 +28,7 @@ CatAllOf <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`declawed` = NULL, additional_properties = NULL, ...) {
|
||||||
`declawed` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`declawed`)) {
|
if (!is.null(`declawed`)) {
|
||||||
stopifnot(is.logical(`declawed`), length(`declawed`) == 1)
|
stopifnot(is.logical(`declawed`), length(`declawed`) == 1)
|
||||||
self$`declawed` <- `declawed`
|
self$`declawed` <- `declawed`
|
||||||
@ -178,18 +176,19 @@ CatAllOf <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#CatAllOf$unlock()
|
# CatAllOf$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#CatAllOf$set("public", "print", function(...) {
|
# CatAllOf$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#CatAllOf$lock()
|
# CatAllOf$lock()
|
||||||
|
|
||||||
|
@ -31,9 +31,7 @@ Category <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `name` = NULL, additional_properties = NULL, ...) {
|
||||||
`id` = NULL, `name` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -209,18 +207,19 @@ Category <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Category$unlock()
|
# Category$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Category$set("public", "print", function(...) {
|
# Category$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Category$lock()
|
# Category$lock()
|
||||||
|
|
||||||
|
@ -31,9 +31,7 @@ DanishPig <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `size`, additional_properties = NULL, ...) {
|
||||||
`className`, `size`, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -233,18 +231,19 @@ DanishPig <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#DanishPig$unlock()
|
# DanishPig$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#DanishPig$set("public", "print", function(...) {
|
# DanishPig$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#DanishPig$lock()
|
# DanishPig$lock()
|
||||||
|
|
||||||
|
@ -34,9 +34,7 @@ Date <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `url_property`, `percent_description` = NULL, additional_properties = NULL, ...) {
|
||||||
`className`, `url_property`, `percent_description` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -272,18 +270,19 @@ Date <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Date$unlock()
|
# Date$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Date$set("public", "print", function(...) {
|
# Date$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Date$lock()
|
# Date$lock()
|
||||||
|
|
||||||
|
@ -35,9 +35,7 @@ Dog <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `color` = "red", `breed` = NULL, additional_properties = NULL, ...) {
|
||||||
`className`, `color` = "red", `breed` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -241,18 +239,19 @@ Dog <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Dog$unlock()
|
# Dog$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Dog$set("public", "print", function(...) {
|
# Dog$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Dog$lock()
|
# Dog$lock()
|
||||||
|
|
||||||
|
@ -28,9 +28,7 @@ DogAllOf <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`breed` = NULL, additional_properties = NULL, ...) {
|
||||||
`breed` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`breed`)) {
|
if (!is.null(`breed`)) {
|
||||||
stopifnot(is.character(`breed`), length(`breed`) == 1)
|
stopifnot(is.character(`breed`), length(`breed`) == 1)
|
||||||
self$`breed` <- `breed`
|
self$`breed` <- `breed`
|
||||||
@ -178,18 +176,19 @@ DogAllOf <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#DogAllOf$unlock()
|
# DogAllOf$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#DogAllOf$set("public", "print", function(...) {
|
# DogAllOf$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#DogAllOf$lock()
|
# DogAllOf$lock()
|
||||||
|
|
||||||
|
@ -361,15 +361,15 @@ FakeApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -481,15 +481,15 @@ FakeApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "User", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "User", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
|
@ -34,9 +34,7 @@ ModelApiResponse <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...) {
|
||||||
`code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`code`)) {
|
if (!is.null(`code`)) {
|
||||||
stopifnot(is.numeric(`code`), length(`code`) == 1)
|
stopifnot(is.numeric(`code`), length(`code`) == 1)
|
||||||
self$`code` <- `code`
|
self$`code` <- `code`
|
||||||
@ -224,18 +222,19 @@ ModelApiResponse <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#ModelApiResponse$unlock()
|
# ModelApiResponse$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#ModelApiResponse$set("public", "print", function(...) {
|
# ModelApiResponse$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#ModelApiResponse$lock()
|
# ModelApiResponse$lock()
|
||||||
|
|
||||||
|
@ -31,9 +31,7 @@ NestedOneOf <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`size` = NULL, `nested_pig` = NULL, additional_properties = NULL, ...) {
|
||||||
`size` = NULL, `nested_pig` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`size`)) {
|
if (!is.null(`size`)) {
|
||||||
stopifnot(is.numeric(`size`), length(`size`) == 1)
|
stopifnot(is.numeric(`size`), length(`size`) == 1)
|
||||||
self$`size` <- `size`
|
self$`size` <- `size`
|
||||||
@ -203,18 +201,19 @@ NestedOneOf <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#NestedOneOf$unlock()
|
# NestedOneOf$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#NestedOneOf$set("public", "print", function(...) {
|
# NestedOneOf$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#NestedOneOf$lock()
|
# NestedOneOf$lock()
|
||||||
|
|
||||||
|
@ -43,9 +43,7 @@ Order <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `petId` = NULL, `quantity` = NULL, `shipDate` = NULL, `status` = NULL, `complete` = FALSE, additional_properties = NULL, ...) {
|
||||||
`id` = NULL, `petId` = NULL, `quantity` = NULL, `shipDate` = NULL, `status` = NULL, `complete` = FALSE, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -302,18 +300,19 @@ Order <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Order$unlock()
|
# Order$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Order$set("public", "print", function(...) {
|
# Order$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Order$lock()
|
# Order$lock()
|
||||||
|
|
||||||
|
@ -43,9 +43,7 @@ Pet <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`name`, `photoUrls`, `id` = NULL, `category` = NULL, `tags` = NULL, `status` = NULL, additional_properties = NULL, ...) {
|
||||||
`name`, `photoUrls`, `id` = NULL, `category` = NULL, `tags` = NULL, `status` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`name`)) {
|
if (!missing(`name`)) {
|
||||||
stopifnot(is.character(`name`), length(`name`) == 1)
|
stopifnot(is.character(`name`), length(`name`) == 1)
|
||||||
self$`name` <- `name`
|
self$`name` <- `name`
|
||||||
@ -339,18 +337,19 @@ Pet <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Pet$unlock()
|
# Pet$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Pet$set("public", "print", function(...) {
|
# Pet$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Pet$lock()
|
# Pet$lock()
|
||||||
|
|
||||||
|
@ -742,15 +742,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -980,15 +980,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "array[Pet]", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "array[Pet]", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1096,15 +1096,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "array[Pet]", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "array[Pet]", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1217,15 +1217,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1349,15 +1349,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1479,15 +1479,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1601,15 +1601,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Pet", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1839,15 +1839,15 @@ PetApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "ModelApiResponse", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "ModelApiResponse", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
|
@ -46,9 +46,7 @@ Special <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`set_test` = NULL, `item_self` = NULL, `item_private` = NULL, `item_super` = NULL, `123_number` = NULL, `array[test]` = NULL, `empty_string` = NULL, additional_properties = NULL, ...) {
|
||||||
`set_test` = NULL, `item_self` = NULL, `item_private` = NULL, `item_super` = NULL, `123_number` = NULL, `array[test]` = NULL, `empty_string` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`set_test`)) {
|
if (!is.null(`set_test`)) {
|
||||||
stopifnot(is.vector(`set_test`), length(`set_test`) != 0)
|
stopifnot(is.vector(`set_test`), length(`set_test`) != 0)
|
||||||
sapply(`set_test`, function(x) stopifnot(is.character(x)))
|
sapply(`set_test`, function(x) stopifnot(is.character(x)))
|
||||||
@ -328,18 +326,19 @@ Special <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Special$unlock()
|
# Special$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Special$set("public", "print", function(...) {
|
# Special$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Special$lock()
|
# Special$lock()
|
||||||
|
|
||||||
|
@ -434,15 +434,15 @@ StoreApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "map(integer)", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "map(integer)", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -563,15 +563,15 @@ StoreApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Order", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Order", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -682,15 +682,15 @@ StoreApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "Order", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "Order", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
|
@ -31,9 +31,7 @@ Tag <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `name` = NULL, additional_properties = NULL, ...) {
|
||||||
`id` = NULL, `name` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -201,18 +199,19 @@ Tag <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Tag$unlock()
|
# Tag$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Tag$set("public", "print", function(...) {
|
# Tag$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Tag$lock()
|
# Tag$lock()
|
||||||
|
|
||||||
|
@ -31,9 +31,7 @@ UpdatePetRequest <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`jsonData` = NULL, `binaryDataN2Information` = NULL, additional_properties = NULL, ...) {
|
||||||
`jsonData` = NULL, `binaryDataN2Information` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`jsonData`)) {
|
if (!is.null(`jsonData`)) {
|
||||||
stopifnot(R6::is.R6(`jsonData`))
|
stopifnot(R6::is.R6(`jsonData`))
|
||||||
self$`jsonData` <- `jsonData`
|
self$`jsonData` <- `jsonData`
|
||||||
@ -202,18 +200,19 @@ UpdatePetRequest <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#UpdatePetRequest$unlock()
|
# UpdatePetRequest$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#UpdatePetRequest$set("public", "print", function(...) {
|
# UpdatePetRequest$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#UpdatePetRequest$lock()
|
# UpdatePetRequest$lock()
|
||||||
|
|
||||||
|
@ -49,9 +49,7 @@ User <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`id` = NULL, `username` = NULL, `firstName` = NULL, `lastName` = NULL, `email` = NULL, `password` = NULL, `phone` = NULL, `userStatus` = NULL, additional_properties = NULL, ...) {
|
||||||
`id` = NULL, `username` = NULL, `firstName` = NULL, `lastName` = NULL, `email` = NULL, `password` = NULL, `phone` = NULL, `userStatus` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!is.null(`id`)) {
|
if (!is.null(`id`)) {
|
||||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||||
self$`id` <- `id`
|
self$`id` <- `id`
|
||||||
@ -339,18 +337,19 @@ User <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#User$unlock()
|
# User$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#User$set("public", "print", function(...) {
|
# User$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#User$lock()
|
# User$lock()
|
||||||
|
|
||||||
|
@ -966,15 +966,15 @@ UserApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "User", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "User", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
@ -1099,15 +1099,15 @@ UserApi <- R6::R6Class(
|
|||||||
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
if (local_var_resp$status_code >= 200 && local_var_resp$status_code <= 299) {
|
||||||
# save response in a file
|
# save response in a file
|
||||||
if (!is.null(data_file)) {
|
if (!is.null(data_file)) {
|
||||||
write(local_var_resp$response, data_file)
|
write(local_var_resp$response, data_file)
|
||||||
}
|
}
|
||||||
|
|
||||||
deserialized_resp_obj <- tryCatch(
|
deserialized_resp_obj <- tryCatch(
|
||||||
self$api_client$deserialize(local_var_resp$response, "character", loadNamespace("petstore")),
|
self$api_client$deserialize(local_var_resp$response, "character", loadNamespace("petstore")),
|
||||||
error = function(e) {
|
error = function(e) {
|
||||||
rlang::abort(message = "Failed to deserialize response",
|
rlang::abort(message = "Failed to deserialize response",
|
||||||
.subclass = "ApiException",
|
.subclass = "ApiException",
|
||||||
ApiException = ApiException$new(http_response = local_var_resp))
|
ApiException = ApiException$new(http_response = local_var_resp))
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
local_var_resp$content <- deserialized_resp_obj
|
local_var_resp$content <- deserialized_resp_obj
|
||||||
|
@ -34,9 +34,7 @@ Whale <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `hasBaleen` = NULL, `hasTeeth` = NULL, additional_properties = NULL, ...) {
|
||||||
`className`, `hasBaleen` = NULL, `hasTeeth` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -240,18 +238,19 @@ Whale <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Whale$unlock()
|
# Whale$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Whale$set("public", "print", function(...) {
|
# Whale$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Whale$lock()
|
# Whale$lock()
|
||||||
|
|
||||||
|
@ -31,9 +31,7 @@ Zebra <- R6::R6Class(
|
|||||||
#' @param additional_properties additonal properties (optional)
|
#' @param additional_properties additonal properties (optional)
|
||||||
#' @param ... Other optional arguments.
|
#' @param ... Other optional arguments.
|
||||||
#' @export
|
#' @export
|
||||||
initialize = function(
|
initialize = function(`className`, `type` = NULL, additional_properties = NULL, ...) {
|
||||||
`className`, `type` = NULL, additional_properties = NULL, ...
|
|
||||||
) {
|
|
||||||
if (!missing(`className`)) {
|
if (!missing(`className`)) {
|
||||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||||
self$`className` <- `className`
|
self$`className` <- `className`
|
||||||
@ -226,18 +224,19 @@ Zebra <- R6::R6Class(
|
|||||||
print = function() {
|
print = function() {
|
||||||
print(jsonlite::prettify(self$toJSONString()))
|
print(jsonlite::prettify(self$toJSONString()))
|
||||||
invisible(self)
|
invisible(self)
|
||||||
}),
|
}
|
||||||
# Lock the class to prevent modifications to the method or field
|
),
|
||||||
lock_class = TRUE
|
# Lock the class to prevent modifications to the method or field
|
||||||
|
lock_class = TRUE
|
||||||
)
|
)
|
||||||
## Uncomment below to unlock the class to allow modifications of the method or field
|
## Uncomment below to unlock the class to allow modifications of the method or field
|
||||||
#Zebra$unlock()
|
# Zebra$unlock()
|
||||||
#
|
#
|
||||||
## Below is an example to define the print fnuction
|
## Below is an example to define the print fnuction
|
||||||
#Zebra$set("public", "print", function(...) {
|
# Zebra$set("public", "print", function(...) {
|
||||||
# print(jsonlite::prettify(self$toJSONString()))
|
# print(jsonlite::prettify(self$toJSONString()))
|
||||||
# invisible(self)
|
# invisible(self)
|
||||||
#})
|
# })
|
||||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||||
#Zebra$lock()
|
# Zebra$lock()
|
||||||
|
|
||||||
|
@ -55,6 +55,17 @@ install.packages("petstore_1.0.0.tar.gz", repos = NULL, type = "source")
|
|||||||
library(petstore)
|
library(petstore)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Reformat code
|
||||||
|
|
||||||
|
To reformat code using [styler](https://styler.r-lib.org/index.html), please run the following in the R console:
|
||||||
|
|
||||||
|
```R
|
||||||
|
install.packages("remotes")
|
||||||
|
remotes::install_github("r-lib/styler@v1.7.0.9003")
|
||||||
|
library("styler")
|
||||||
|
style_dir()
|
||||||
|
```
|
||||||
|
|
||||||
## Documentation for API Endpoints
|
## Documentation for API Endpoints
|
||||||
|
|
||||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||||
|
Loading…
x
Reference in New Issue
Block a user