R - better code format (#13691)

* r - beter code format

* better readme

* update instruction
This commit is contained in:
William Cheng 2022-10-15 10:47:27 +08:00 committed by GitHub
parent 3ed6503075
commit daf475a96d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
80 changed files with 943 additions and 960 deletions

View File

@ -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}}*

View File

@ -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}}
@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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*

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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*

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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 the class to prevent modifications to the method or field
lock_class = TRUE 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()

View File

@ -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*