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}}})
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
All URIs are relative to *{{basePath}}*
|
||||
|
@ -32,7 +32,7 @@
|
||||
{{/isAdditionalPropertiesTrue}}
|
||||
{{#discriminator}}
|
||||
`_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}}
|
||||
#' Initialize a new {{{classname}}} class.
|
||||
#'
|
||||
@ -50,9 +50,7 @@
|
||||
{{/isAdditionalPropertiesTrue}}
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
{{#requiredVars}}`{{name}}`, {{/requiredVars}}{{#optionalVars}}`{{name}}` = {{{defaultValue}}}{{^defaultValue}}NULL{{/defaultValue}}, {{/optionalVars}}{{#isAdditionalPropertiesTrue}}additional_properties = NULL, {{/isAdditionalPropertiesTrue}}...
|
||||
) {
|
||||
initialize = function({{#requiredVars}}`{{name}}`, {{/requiredVars}}{{#optionalVars}}`{{name}}` = {{{defaultValue}}}{{^defaultValue}}NULL{{/defaultValue}}, {{/optionalVars}}{{#isAdditionalPropertiesTrue}}additional_properties = NULL, {{/isAdditionalPropertiesTrue}}...) {
|
||||
{{#requiredVars}}
|
||||
if (!missing(`{{name}}`)) {
|
||||
{{^isContainer}}
|
||||
@ -619,17 +617,18 @@
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#{{classname}}$unlock()
|
||||
# {{classname}}$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#{{classname}}$set("public", "print", function(...) {
|
||||
# {{classname}}$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -270,18 +268,19 @@ AllofTagApiResponse <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#AllofTagApiResponse$unlock()
|
||||
# AllofTagApiResponse$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#AllofTagApiResponse$set("public", "print", function(...) {
|
||||
# AllofTagApiResponse$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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"),
|
||||
`additional_properties` = list(),
|
||||
`_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.
|
||||
#'
|
||||
#' @description
|
||||
@ -33,9 +33,7 @@ Animal <- R6::R6Class(
|
||||
#' @param additional_properties additonal properties (optional)
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `color` = "red", additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `color` = "red", additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -219,18 +217,19 @@ Animal <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Animal$unlock()
|
||||
# Animal$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Animal$set("public", "print", function(...) {
|
||||
# Animal$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `color`, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `color`, additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -233,18 +231,19 @@ BasquePig <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#BasquePig$unlock()
|
||||
# BasquePig$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#BasquePig$set("public", "print", function(...) {
|
||||
# BasquePig$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `color` = "red", `declawed` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `color` = "red", `declawed` = NULL, additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -241,18 +239,19 @@ Cat <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Cat$unlock()
|
||||
# Cat$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Cat$set("public", "print", function(...) {
|
||||
# Cat$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`declawed` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`declawed` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`declawed`)) {
|
||||
stopifnot(is.logical(`declawed`), length(`declawed`) == 1)
|
||||
self$`declawed` <- `declawed`
|
||||
@ -178,18 +176,19 @@ CatAllOf <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#CatAllOf$unlock()
|
||||
# CatAllOf$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#CatAllOf$set("public", "print", function(...) {
|
||||
# CatAllOf$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `name` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `name` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -209,18 +207,19 @@ Category <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Category$unlock()
|
||||
# Category$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Category$set("public", "print", function(...) {
|
||||
# Category$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `size`, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `size`, additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -233,18 +231,19 @@ DanishPig <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#DanishPig$unlock()
|
||||
# DanishPig$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#DanishPig$set("public", "print", function(...) {
|
||||
# DanishPig$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `url_property`, `percent_description` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `url_property`, `percent_description` = NULL, additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -272,18 +270,19 @@ Date <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Date$unlock()
|
||||
# Date$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Date$set("public", "print", function(...) {
|
||||
# Date$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `color` = "red", `breed` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `color` = "red", `breed` = NULL, additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -241,18 +239,19 @@ Dog <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Dog$unlock()
|
||||
# Dog$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Dog$set("public", "print", function(...) {
|
||||
# Dog$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`breed` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`breed` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`breed`)) {
|
||||
stopifnot(is.character(`breed`), length(`breed`) == 1)
|
||||
self$`breed` <- `breed`
|
||||
@ -178,18 +176,19 @@ DogAllOf <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#DogAllOf$unlock()
|
||||
# DogAllOf$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#DogAllOf$set("public", "print", function(...) {
|
||||
# DogAllOf$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||
#DogAllOf$lock()
|
||||
# DogAllOf$lock()
|
||||
|
||||
|
@ -34,9 +34,7 @@ ModelApiResponse <- R6::R6Class(
|
||||
#' @param additional_properties additonal properties (optional)
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`code`)) {
|
||||
stopifnot(is.numeric(`code`), length(`code`) == 1)
|
||||
self$`code` <- `code`
|
||||
@ -224,18 +222,19 @@ ModelApiResponse <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#ModelApiResponse$unlock()
|
||||
# ModelApiResponse$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#ModelApiResponse$set("public", "print", function(...) {
|
||||
# ModelApiResponse$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`size` = NULL, `nested_pig` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`size` = NULL, `nested_pig` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`size`)) {
|
||||
stopifnot(is.numeric(`size`), length(`size`) == 1)
|
||||
self$`size` <- `size`
|
||||
@ -203,18 +201,19 @@ NestedOneOf <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#NestedOneOf$unlock()
|
||||
# NestedOneOf$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#NestedOneOf$set("public", "print", function(...) {
|
||||
# NestedOneOf$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `petId` = NULL, `quantity` = NULL, `shipDate` = NULL, `status` = NULL, `complete` = FALSE, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `petId` = NULL, `quantity` = NULL, `shipDate` = NULL, `status` = NULL, `complete` = FALSE, additional_properties = NULL, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -302,18 +300,19 @@ Order <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Order$unlock()
|
||||
# Order$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Order$set("public", "print", function(...) {
|
||||
# Order$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`name`, `photoUrls`, `id` = NULL, `category` = NULL, `tags` = NULL, `status` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`name`, `photoUrls`, `id` = NULL, `category` = NULL, `tags` = NULL, `status` = NULL, additional_properties = NULL, ...) {
|
||||
if (!missing(`name`)) {
|
||||
stopifnot(is.character(`name`), length(`name`) == 1)
|
||||
self$`name` <- `name`
|
||||
@ -339,18 +337,19 @@ Pet <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Pet$unlock()
|
||||
# Pet$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Pet$set("public", "print", function(...) {
|
||||
# Pet$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||
#Pet$lock()
|
||||
# Pet$lock()
|
||||
|
||||
|
@ -46,9 +46,7 @@ Special <- R6::R6Class(
|
||||
#' @param additional_properties additonal properties (optional)
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
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, ...
|
||||
) {
|
||||
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, ...) {
|
||||
if (!is.null(`set_test`)) {
|
||||
stopifnot(is.vector(`set_test`), length(`set_test`) != 0)
|
||||
sapply(`set_test`, function(x) stopifnot(is.character(x)))
|
||||
@ -328,18 +326,19 @@ Special <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Special$unlock()
|
||||
# Special$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Special$set("public", "print", function(...) {
|
||||
# Special$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||
#Special$lock()
|
||||
# Special$lock()
|
||||
|
||||
|
@ -31,9 +31,7 @@ Tag <- R6::R6Class(
|
||||
#' @param additional_properties additonal properties (optional)
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `name` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `name` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -201,18 +199,19 @@ Tag <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Tag$unlock()
|
||||
# Tag$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Tag$set("public", "print", function(...) {
|
||||
# Tag$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`jsonData` = NULL, `binaryDataN2Information` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`jsonData` = NULL, `binaryDataN2Information` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`jsonData`)) {
|
||||
stopifnot(R6::is.R6(`jsonData`))
|
||||
self$`jsonData` <- `jsonData`
|
||||
@ -202,18 +200,19 @@ UpdatePetRequest <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#UpdatePetRequest$unlock()
|
||||
# UpdatePetRequest$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#UpdatePetRequest$set("public", "print", function(...) {
|
||||
# UpdatePetRequest$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `username` = NULL, `firstName` = NULL, `lastName` = NULL, `email` = NULL, `password` = NULL, `phone` = NULL, `userStatus` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `username` = NULL, `firstName` = NULL, `lastName` = NULL, `email` = NULL, `password` = NULL, `phone` = NULL, `userStatus` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -339,18 +337,19 @@ User <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#User$unlock()
|
||||
# User$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#User$set("public", "print", function(...) {
|
||||
# User$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||
#User$lock()
|
||||
# User$lock()
|
||||
|
||||
|
@ -34,9 +34,7 @@ Whale <- R6::R6Class(
|
||||
#' @param additional_properties additonal properties (optional)
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `hasBaleen` = NULL, `hasTeeth` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `hasBaleen` = NULL, `hasTeeth` = NULL, additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -240,18 +238,19 @@ Whale <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Whale$unlock()
|
||||
# Whale$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Whale$set("public", "print", function(...) {
|
||||
# Whale$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `type` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `type` = NULL, additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -226,18 +224,19 @@ Zebra <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Zebra$unlock()
|
||||
# Zebra$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Zebra$set("public", "print", function(...) {
|
||||
# Zebra$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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)
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
@ -35,9 +35,7 @@ AllofTagApiResponse <- R6::R6Class(
|
||||
#' @param message message
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -237,18 +235,19 @@ AllofTagApiResponse <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#AllofTagApiResponse$unlock()
|
||||
# AllofTagApiResponse$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#AllofTagApiResponse$set("public", "print", function(...) {
|
||||
# AllofTagApiResponse$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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,
|
||||
`color` = NULL,
|
||||
`_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.
|
||||
#'
|
||||
#' @description
|
||||
@ -28,9 +28,7 @@ Animal <- R6::R6Class(
|
||||
#' @param color color. Default to "red".
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `color` = "red", ...
|
||||
) {
|
||||
initialize = function(`className`, `color` = "red", ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -186,18 +184,19 @@ Animal <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Animal$unlock()
|
||||
# Animal$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Animal$set("public", "print", function(...) {
|
||||
# Animal$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `color`, ...
|
||||
) {
|
||||
initialize = function(`className`, `color`, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -200,18 +198,19 @@ BasquePig <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#BasquePig$unlock()
|
||||
# BasquePig$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#BasquePig$set("public", "print", function(...) {
|
||||
# BasquePig$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `color` = "red", `declawed` = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `color` = "red", `declawed` = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -208,18 +206,19 @@ Cat <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Cat$unlock()
|
||||
# Cat$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Cat$set("public", "print", function(...) {
|
||||
# Cat$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`declawed` = NULL, ...
|
||||
) {
|
||||
initialize = function(`declawed` = NULL, ...) {
|
||||
if (!is.null(`declawed`)) {
|
||||
stopifnot(is.logical(`declawed`), length(`declawed`) == 1)
|
||||
self$`declawed` <- `declawed`
|
||||
@ -145,18 +143,19 @@ CatAllOf <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#CatAllOf$unlock()
|
||||
# CatAllOf$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#CatAllOf$set("public", "print", function(...) {
|
||||
# CatAllOf$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `name` = NULL, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `name` = NULL, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -176,18 +174,19 @@ Category <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Category$unlock()
|
||||
# Category$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Category$set("public", "print", function(...) {
|
||||
# Category$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `size`, ...
|
||||
) {
|
||||
initialize = function(`className`, `size`, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -200,18 +198,19 @@ DanishPig <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#DanishPig$unlock()
|
||||
# DanishPig$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#DanishPig$set("public", "print", function(...) {
|
||||
# DanishPig$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `url_property`, `percent_description` = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `url_property`, `percent_description` = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -239,18 +237,19 @@ Date <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Date$unlock()
|
||||
# Date$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Date$set("public", "print", function(...) {
|
||||
# Date$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `color` = "red", `breed` = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `color` = "red", `breed` = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -208,18 +206,19 @@ Dog <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Dog$unlock()
|
||||
# Dog$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Dog$set("public", "print", function(...) {
|
||||
# Dog$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`breed` = NULL, ...
|
||||
) {
|
||||
initialize = function(`breed` = NULL, ...) {
|
||||
if (!is.null(`breed`)) {
|
||||
stopifnot(is.character(`breed`), length(`breed`) == 1)
|
||||
self$`breed` <- `breed`
|
||||
@ -145,18 +143,19 @@ DogAllOf <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#DogAllOf$unlock()
|
||||
# DogAllOf$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#DogAllOf$set("public", "print", function(...) {
|
||||
# DogAllOf$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||
#DogAllOf$lock()
|
||||
# DogAllOf$lock()
|
||||
|
||||
|
@ -29,9 +29,7 @@ ModelApiResponse <- R6::R6Class(
|
||||
#' @param message message
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`code` = NULL, `type` = NULL, `message` = NULL, ...
|
||||
) {
|
||||
initialize = function(`code` = NULL, `type` = NULL, `message` = NULL, ...) {
|
||||
if (!is.null(`code`)) {
|
||||
stopifnot(is.numeric(`code`), length(`code`) == 1)
|
||||
self$`code` <- `code`
|
||||
@ -191,18 +189,19 @@ ModelApiResponse <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#ModelApiResponse$unlock()
|
||||
# ModelApiResponse$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#ModelApiResponse$set("public", "print", function(...) {
|
||||
# ModelApiResponse$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`size` = NULL, `nested_pig` = NULL, ...
|
||||
) {
|
||||
initialize = function(`size` = NULL, `nested_pig` = NULL, ...) {
|
||||
if (!is.null(`size`)) {
|
||||
stopifnot(is.numeric(`size`), length(`size`) == 1)
|
||||
self$`size` <- `size`
|
||||
@ -170,18 +168,19 @@ NestedOneOf <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#NestedOneOf$unlock()
|
||||
# NestedOneOf$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#NestedOneOf$set("public", "print", function(...) {
|
||||
# NestedOneOf$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `petId` = NULL, `quantity` = NULL, `shipDate` = NULL, `status` = NULL, `complete` = FALSE, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `petId` = NULL, `quantity` = NULL, `shipDate` = NULL, `status` = NULL, `complete` = FALSE, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -269,18 +267,19 @@ Order <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Order$unlock()
|
||||
# Order$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Order$set("public", "print", function(...) {
|
||||
# Order$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`name`, `photoUrls`, `id` = NULL, `category` = NULL, `tags` = NULL, `status` = NULL, ...
|
||||
) {
|
||||
initialize = function(`name`, `photoUrls`, `id` = NULL, `category` = NULL, `tags` = NULL, `status` = NULL, ...) {
|
||||
if (!missing(`name`)) {
|
||||
stopifnot(is.character(`name`), length(`name`) == 1)
|
||||
self$`name` <- `name`
|
||||
@ -306,18 +304,19 @@ Pet <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Pet$unlock()
|
||||
# Pet$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Pet$set("public", "print", function(...) {
|
||||
# Pet$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||
#Pet$lock()
|
||||
# Pet$lock()
|
||||
|
||||
|
@ -41,9 +41,7 @@ Special <- R6::R6Class(
|
||||
#' @param empty_string empty_string
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`set_test` = NULL, `item_self` = NULL, `item_private` = NULL, `item_super` = NULL, `123_number` = NULL, `array[test]` = NULL, `empty_string` = NULL, ...
|
||||
) {
|
||||
initialize = function(`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`)) {
|
||||
stopifnot(is.vector(`set_test`), length(`set_test`) != 0)
|
||||
sapply(`set_test`, function(x) stopifnot(is.character(x)))
|
||||
@ -295,18 +293,19 @@ Special <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Special$unlock()
|
||||
# Special$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Special$set("public", "print", function(...) {
|
||||
# Special$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||
#Special$lock()
|
||||
# Special$lock()
|
||||
|
||||
|
@ -26,9 +26,7 @@ Tag <- R6::R6Class(
|
||||
#' @param name name
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `name` = NULL, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `name` = NULL, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -168,18 +166,19 @@ Tag <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Tag$unlock()
|
||||
# Tag$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Tag$set("public", "print", function(...) {
|
||||
# Tag$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`jsonData` = NULL, `binaryDataN2Information` = NULL, ...
|
||||
) {
|
||||
initialize = function(`jsonData` = NULL, `binaryDataN2Information` = NULL, ...) {
|
||||
if (!is.null(`jsonData`)) {
|
||||
stopifnot(R6::is.R6(`jsonData`))
|
||||
self$`jsonData` <- `jsonData`
|
||||
@ -169,18 +167,19 @@ UpdatePetRequest <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#UpdatePetRequest$unlock()
|
||||
# UpdatePetRequest$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#UpdatePetRequest$set("public", "print", function(...) {
|
||||
# UpdatePetRequest$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `username` = NULL, `firstName` = NULL, `lastName` = NULL, `email` = NULL, `password` = NULL, `phone` = NULL, `userStatus` = NULL, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `username` = NULL, `firstName` = NULL, `lastName` = NULL, `email` = NULL, `password` = NULL, `phone` = NULL, `userStatus` = NULL, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -306,18 +304,19 @@ User <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#User$unlock()
|
||||
# User$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#User$set("public", "print", function(...) {
|
||||
# User$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||
#User$lock()
|
||||
# User$lock()
|
||||
|
||||
|
@ -29,9 +29,7 @@ Whale <- R6::R6Class(
|
||||
#' @param hasTeeth hasTeeth
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `hasBaleen` = NULL, `hasTeeth` = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `hasBaleen` = NULL, `hasTeeth` = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -207,18 +205,19 @@ Whale <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Whale$unlock()
|
||||
# Whale$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Whale$set("public", "print", function(...) {
|
||||
# Whale$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `type` = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `type` = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -193,18 +191,19 @@ Zebra <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Zebra$unlock()
|
||||
# Zebra$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Zebra$set("public", "print", function(...) {
|
||||
# Zebra$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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)
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
@ -40,9 +40,7 @@ AllofTagApiResponse <- R6::R6Class(
|
||||
#' @param additional_properties additonal properties (optional)
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -270,18 +268,19 @@ AllofTagApiResponse <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#AllofTagApiResponse$unlock()
|
||||
# AllofTagApiResponse$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#AllofTagApiResponse$set("public", "print", function(...) {
|
||||
# AllofTagApiResponse$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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"),
|
||||
`additional_properties` = list(),
|
||||
`_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.
|
||||
#'
|
||||
#' @description
|
||||
@ -33,9 +33,7 @@ Animal <- R6::R6Class(
|
||||
#' @param additional_properties additonal properties (optional)
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `color` = "red", additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `color` = "red", additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -219,18 +217,19 @@ Animal <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Animal$unlock()
|
||||
# Animal$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Animal$set("public", "print", function(...) {
|
||||
# Animal$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `color`, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `color`, additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -233,18 +231,19 @@ BasquePig <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#BasquePig$unlock()
|
||||
# BasquePig$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#BasquePig$set("public", "print", function(...) {
|
||||
# BasquePig$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `color` = "red", `declawed` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `color` = "red", `declawed` = NULL, additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -241,18 +239,19 @@ Cat <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Cat$unlock()
|
||||
# Cat$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Cat$set("public", "print", function(...) {
|
||||
# Cat$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`declawed` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`declawed` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`declawed`)) {
|
||||
stopifnot(is.logical(`declawed`), length(`declawed`) == 1)
|
||||
self$`declawed` <- `declawed`
|
||||
@ -178,18 +176,19 @@ CatAllOf <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#CatAllOf$unlock()
|
||||
# CatAllOf$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#CatAllOf$set("public", "print", function(...) {
|
||||
# CatAllOf$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `name` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `name` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -209,18 +207,19 @@ Category <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Category$unlock()
|
||||
# Category$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Category$set("public", "print", function(...) {
|
||||
# Category$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `size`, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `size`, additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -233,18 +231,19 @@ DanishPig <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#DanishPig$unlock()
|
||||
# DanishPig$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#DanishPig$set("public", "print", function(...) {
|
||||
# DanishPig$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `url_property`, `percent_description` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `url_property`, `percent_description` = NULL, additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -272,18 +270,19 @@ Date <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Date$unlock()
|
||||
# Date$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Date$set("public", "print", function(...) {
|
||||
# Date$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `color` = "red", `breed` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `color` = "red", `breed` = NULL, additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -241,18 +239,19 @@ Dog <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Dog$unlock()
|
||||
# Dog$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Dog$set("public", "print", function(...) {
|
||||
# Dog$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`breed` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`breed` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`breed`)) {
|
||||
stopifnot(is.character(`breed`), length(`breed`) == 1)
|
||||
self$`breed` <- `breed`
|
||||
@ -178,18 +176,19 @@ DogAllOf <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#DogAllOf$unlock()
|
||||
# DogAllOf$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#DogAllOf$set("public", "print", function(...) {
|
||||
# DogAllOf$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||
#DogAllOf$lock()
|
||||
# DogAllOf$lock()
|
||||
|
||||
|
@ -34,9 +34,7 @@ ModelApiResponse <- R6::R6Class(
|
||||
#' @param additional_properties additonal properties (optional)
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`code`)) {
|
||||
stopifnot(is.numeric(`code`), length(`code`) == 1)
|
||||
self$`code` <- `code`
|
||||
@ -224,18 +222,19 @@ ModelApiResponse <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#ModelApiResponse$unlock()
|
||||
# ModelApiResponse$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#ModelApiResponse$set("public", "print", function(...) {
|
||||
# ModelApiResponse$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`size` = NULL, `nested_pig` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`size` = NULL, `nested_pig` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`size`)) {
|
||||
stopifnot(is.numeric(`size`), length(`size`) == 1)
|
||||
self$`size` <- `size`
|
||||
@ -203,18 +201,19 @@ NestedOneOf <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#NestedOneOf$unlock()
|
||||
# NestedOneOf$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#NestedOneOf$set("public", "print", function(...) {
|
||||
# NestedOneOf$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `petId` = NULL, `quantity` = NULL, `shipDate` = NULL, `status` = NULL, `complete` = FALSE, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `petId` = NULL, `quantity` = NULL, `shipDate` = NULL, `status` = NULL, `complete` = FALSE, additional_properties = NULL, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -302,18 +300,19 @@ Order <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Order$unlock()
|
||||
# Order$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Order$set("public", "print", function(...) {
|
||||
# Order$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`name`, `photoUrls`, `id` = NULL, `category` = NULL, `tags` = NULL, `status` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`name`, `photoUrls`, `id` = NULL, `category` = NULL, `tags` = NULL, `status` = NULL, additional_properties = NULL, ...) {
|
||||
if (!missing(`name`)) {
|
||||
stopifnot(is.character(`name`), length(`name`) == 1)
|
||||
self$`name` <- `name`
|
||||
@ -339,18 +337,19 @@ Pet <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Pet$unlock()
|
||||
# Pet$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Pet$set("public", "print", function(...) {
|
||||
# Pet$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||
#Pet$lock()
|
||||
# Pet$lock()
|
||||
|
||||
|
@ -46,9 +46,7 @@ Special <- R6::R6Class(
|
||||
#' @param additional_properties additonal properties (optional)
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
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, ...
|
||||
) {
|
||||
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, ...) {
|
||||
if (!is.null(`set_test`)) {
|
||||
stopifnot(is.vector(`set_test`), length(`set_test`) != 0)
|
||||
sapply(`set_test`, function(x) stopifnot(is.character(x)))
|
||||
@ -328,18 +326,19 @@ Special <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Special$unlock()
|
||||
# Special$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Special$set("public", "print", function(...) {
|
||||
# Special$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||
#Special$lock()
|
||||
# Special$lock()
|
||||
|
||||
|
@ -31,9 +31,7 @@ Tag <- R6::R6Class(
|
||||
#' @param additional_properties additonal properties (optional)
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `name` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `name` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -201,18 +199,19 @@ Tag <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Tag$unlock()
|
||||
# Tag$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Tag$set("public", "print", function(...) {
|
||||
# Tag$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`jsonData` = NULL, `binaryDataN2Information` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`jsonData` = NULL, `binaryDataN2Information` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`jsonData`)) {
|
||||
stopifnot(R6::is.R6(`jsonData`))
|
||||
self$`jsonData` <- `jsonData`
|
||||
@ -202,18 +200,19 @@ UpdatePetRequest <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#UpdatePetRequest$unlock()
|
||||
# UpdatePetRequest$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#UpdatePetRequest$set("public", "print", function(...) {
|
||||
# UpdatePetRequest$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`id` = NULL, `username` = NULL, `firstName` = NULL, `lastName` = NULL, `email` = NULL, `password` = NULL, `phone` = NULL, `userStatus` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`id` = NULL, `username` = NULL, `firstName` = NULL, `lastName` = NULL, `email` = NULL, `password` = NULL, `phone` = NULL, `userStatus` = NULL, additional_properties = NULL, ...) {
|
||||
if (!is.null(`id`)) {
|
||||
stopifnot(is.numeric(`id`), length(`id`) == 1)
|
||||
self$`id` <- `id`
|
||||
@ -339,18 +337,19 @@ User <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#User$unlock()
|
||||
# User$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#User$set("public", "print", function(...) {
|
||||
# User$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## Uncomment below to lock the class to prevent modifications to the method or field
|
||||
#User$lock()
|
||||
# User$lock()
|
||||
|
||||
|
@ -34,9 +34,7 @@ Whale <- R6::R6Class(
|
||||
#' @param additional_properties additonal properties (optional)
|
||||
#' @param ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `hasBaleen` = NULL, `hasTeeth` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `hasBaleen` = NULL, `hasTeeth` = NULL, additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -240,18 +238,19 @@ Whale <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Whale$unlock()
|
||||
# Whale$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Whale$set("public", "print", function(...) {
|
||||
# Whale$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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 ... Other optional arguments.
|
||||
#' @export
|
||||
initialize = function(
|
||||
`className`, `type` = NULL, additional_properties = NULL, ...
|
||||
) {
|
||||
initialize = function(`className`, `type` = NULL, additional_properties = NULL, ...) {
|
||||
if (!missing(`className`)) {
|
||||
stopifnot(is.character(`className`), length(`className`) == 1)
|
||||
self$`className` <- `className`
|
||||
@ -226,18 +224,19 @@ Zebra <- R6::R6Class(
|
||||
print = function() {
|
||||
print(jsonlite::prettify(self$toJSONString()))
|
||||
invisible(self)
|
||||
}),
|
||||
}
|
||||
),
|
||||
# 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
|
||||
#Zebra$unlock()
|
||||
# Zebra$unlock()
|
||||
#
|
||||
## Below is an example to define the print fnuction
|
||||
#Zebra$set("public", "print", function(...) {
|
||||
# Zebra$set("public", "print", function(...) {
|
||||
# print(jsonlite::prettify(self$toJSONString()))
|
||||
# invisible(self)
|
||||
#})
|
||||
# })
|
||||
## 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)
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
All URIs are relative to *http://petstore.swagger.io/v2*
|
||||
|
Loading…
x
Reference in New Issue
Block a user