Skip to content

Commit 627c143

Browse files
committed
regenerate samples
1 parent 9fcd82a commit 627c143

1,884 files changed

Lines changed: 1706 additions & 31241 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

samples/client/petstore/R-httr2-wrapper/R/allof_tag_api_response.R

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
#' @field code integer [optional]
1313
#' @field type character [optional]
1414
#' @field message character [optional]
15-
#' @field _field_list a list of fields list(character)
16-
#' @field additional_properties additional properties list(character) [optional]
1715
#' @importFrom R6 R6Class
1816
#' @importFrom jsonlite fromJSON toJSON
1917
#' @export
@@ -25,8 +23,6 @@ AllofTagApiResponse <- R6::R6Class(
2523
`code` = NULL,
2624
`type` = NULL,
2725
`message` = NULL,
28-
`_field_list` = c("id", "name", "code", "type", "message"),
29-
`additional_properties` = list(),
3026

3127
#' @description
3228
#' Initialize a new AllofTagApiResponse class.
@@ -36,9 +32,8 @@ AllofTagApiResponse <- R6::R6Class(
3632
#' @param code code
3733
#' @param type type
3834
#' @param message message
39-
#' @param additional_properties additional properties (optional)
4035
#' @param ... Other optional arguments.
41-
initialize = function(`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, additional_properties = NULL, ...) {
36+
initialize = function(`id` = NULL, `name` = NULL, `code` = NULL, `type` = NULL, `message` = NULL, ...) {
4237
if (!is.null(`id`)) {
4338
if (!(is.numeric(`id`) && length(`id`) == 1)) {
4439
stop(paste("Error! Invalid data for `id`. Must be an integer:", `id`))
@@ -69,11 +64,6 @@ AllofTagApiResponse <- R6::R6Class(
6964
}
7065
self$`message` <- `message`
7166
}
72-
if (!is.null(additional_properties)) {
73-
for (key in names(additional_properties)) {
74-
self$additional_properties[[key]] <- additional_properties[[key]]
75-
}
76-
}
7767
},
7868

7969
#' @description
@@ -127,10 +117,6 @@ AllofTagApiResponse <- R6::R6Class(
127117
AllofTagApiResponseObject[["message"]] <-
128118
self$`message`
129119
}
130-
for (key in names(self$additional_properties)) {
131-
AllofTagApiResponseObject[[key]] <- self$additional_properties[[key]]
132-
}
133-
134120
return(AllofTagApiResponseObject)
135121
},
136122

@@ -156,13 +142,6 @@ AllofTagApiResponse <- R6::R6Class(
156142
if (!is.null(this_object$`message`)) {
157143
self$`message` <- this_object$`message`
158144
}
159-
# process additional properties/fields in the payload
160-
for (key in names(this_object)) {
161-
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
162-
self$additional_properties[[key]] <- this_object[[key]]
163-
}
164-
}
165-
166145
self
167146
},
168147

@@ -173,9 +152,6 @@ AllofTagApiResponse <- R6::R6Class(
173152
#' @return AllofTagApiResponse in JSON format
174153
toJSONString = function(...) {
175154
simple <- self$toSimpleType()
176-
for (key in names(self$additional_properties)) {
177-
simple[[key]] <- self$additional_properties[[key]]
178-
}
179155
json <- jsonlite::toJSON(simple, auto_unbox = TRUE, digits = NA, ...)
180156
return(as.character(jsonlite::minify(json)))
181157
},
@@ -192,13 +168,6 @@ AllofTagApiResponse <- R6::R6Class(
192168
self$`code` <- this_object$`code`
193169
self$`type` <- this_object$`type`
194170
self$`message` <- this_object$`message`
195-
# process additional properties/fields in the payload
196-
for (key in names(this_object)) {
197-
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
198-
self$additional_properties[[key]] <- this_object[[key]]
199-
}
200-
}
201-
202171
self
203172
},
204173

samples/client/petstore/R-httr2-wrapper/R/animal.R

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
#' @format An \code{R6Class} generator object
1010
#' @field className character
1111
#' @field color character [optional]
12-
#' @field _field_list a list of fields list(character)
13-
#' @field additional_properties additional properties list(character) [optional]
1412
#' @importFrom R6 R6Class
1513
#' @importFrom jsonlite fromJSON toJSON
1614
#' @export
@@ -19,8 +17,6 @@ Animal <- R6::R6Class(
1917
public = list(
2018
`className` = NULL,
2119
`color` = NULL,
22-
`_field_list` = c("className", "color"),
23-
`additional_properties` = list(),
2420
`_discriminator_property_name` = 'className',
2521
`_discriminator_mapping_name` = c('Cat' = 'Cat', 'Dog' = 'Dog'),
2622

@@ -29,9 +25,8 @@ Animal <- R6::R6Class(
2925
#'
3026
#' @param className className
3127
#' @param color color. Default to "red".
32-
#' @param additional_properties additional properties (optional)
3328
#' @param ... Other optional arguments.
34-
initialize = function(`className`, `color` = "red", additional_properties = NULL, ...) {
29+
initialize = function(`className`, `color` = "red", ...) {
3530
if (!missing(`className`)) {
3631
if (!(is.character(`className`) && length(`className`) == 1)) {
3732
stop(paste("Error! Invalid data for `className`. Must be a string:", `className`))
@@ -44,11 +39,6 @@ Animal <- R6::R6Class(
4439
}
4540
self$`color` <- `color`
4641
}
47-
if (!is.null(additional_properties)) {
48-
for (key in names(additional_properties)) {
49-
self$additional_properties[[key]] <- additional_properties[[key]]
50-
}
51-
}
5242
},
5343

5444
#' @description
@@ -90,10 +80,6 @@ Animal <- R6::R6Class(
9080
AnimalObject[["color"]] <-
9181
self$`color`
9282
}
93-
for (key in names(self$additional_properties)) {
94-
AnimalObject[[key]] <- self$additional_properties[[key]]
95-
}
96-
9783
return(AnimalObject)
9884
},
9985

@@ -110,13 +96,6 @@ Animal <- R6::R6Class(
11096
if (!is.null(this_object$`color`)) {
11197
self$`color` <- this_object$`color`
11298
}
113-
# process additional properties/fields in the payload
114-
for (key in names(this_object)) {
115-
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
116-
self$additional_properties[[key]] <- this_object[[key]]
117-
}
118-
}
119-
12099
self
121100
},
122101

@@ -127,9 +106,6 @@ Animal <- R6::R6Class(
127106
#' @return Animal in JSON format
128107
toJSONString = function(...) {
129108
simple <- self$toSimpleType()
130-
for (key in names(self$additional_properties)) {
131-
simple[[key]] <- self$additional_properties[[key]]
132-
}
133109
json <- jsonlite::toJSON(simple, auto_unbox = TRUE, digits = NA, ...)
134110
return(as.character(jsonlite::minify(json)))
135111
},
@@ -143,13 +119,6 @@ Animal <- R6::R6Class(
143119
this_object <- jsonlite::fromJSON(input_json)
144120
self$`className` <- this_object$`className`
145121
self$`color` <- this_object$`color`
146-
# process additional properties/fields in the payload
147-
for (key in names(this_object)) {
148-
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
149-
self$additional_properties[[key]] <- this_object[[key]]
150-
}
151-
}
152-
153122
self
154123
},
155124

samples/client/petstore/R-httr2-wrapper/R/basque_pig.R

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
#' @format An \code{R6Class} generator object
1010
#' @field className character
1111
#' @field color character
12-
#' @field _field_list a list of fields list(character)
13-
#' @field additional_properties additional properties list(character) [optional]
1412
#' @importFrom R6 R6Class
1513
#' @importFrom jsonlite fromJSON toJSON
1614
#' @export
@@ -19,17 +17,14 @@ BasquePig <- R6::R6Class(
1917
public = list(
2018
`className` = NULL,
2119
`color` = NULL,
22-
`_field_list` = c("className", "color"),
23-
`additional_properties` = list(),
2420

2521
#' @description
2622
#' Initialize a new BasquePig class.
2723
#'
2824
#' @param className className
2925
#' @param color color
30-
#' @param additional_properties additional properties (optional)
3126
#' @param ... Other optional arguments.
32-
initialize = function(`className`, `color`, additional_properties = NULL, ...) {
27+
initialize = function(`className`, `color`, ...) {
3328
if (!missing(`className`)) {
3429
if (!(is.character(`className`) && length(`className`) == 1)) {
3530
stop(paste("Error! Invalid data for `className`. Must be a string:", `className`))
@@ -42,11 +37,6 @@ BasquePig <- R6::R6Class(
4237
}
4338
self$`color` <- `color`
4439
}
45-
if (!is.null(additional_properties)) {
46-
for (key in names(additional_properties)) {
47-
self$additional_properties[[key]] <- additional_properties[[key]]
48-
}
49-
}
5040
},
5141

5242
#' @description
@@ -88,10 +78,6 @@ BasquePig <- R6::R6Class(
8878
BasquePigObject[["color"]] <-
8979
self$`color`
9080
}
91-
for (key in names(self$additional_properties)) {
92-
BasquePigObject[[key]] <- self$additional_properties[[key]]
93-
}
94-
9581
return(BasquePigObject)
9682
},
9783

@@ -108,13 +94,6 @@ BasquePig <- R6::R6Class(
10894
if (!is.null(this_object$`color`)) {
10995
self$`color` <- this_object$`color`
11096
}
111-
# process additional properties/fields in the payload
112-
for (key in names(this_object)) {
113-
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
114-
self$additional_properties[[key]] <- this_object[[key]]
115-
}
116-
}
117-
11897
self
11998
},
12099

@@ -125,9 +104,6 @@ BasquePig <- R6::R6Class(
125104
#' @return BasquePig in JSON format
126105
toJSONString = function(...) {
127106
simple <- self$toSimpleType()
128-
for (key in names(self$additional_properties)) {
129-
simple[[key]] <- self$additional_properties[[key]]
130-
}
131107
json <- jsonlite::toJSON(simple, auto_unbox = TRUE, digits = NA, ...)
132108
return(as.character(jsonlite::minify(json)))
133109
},
@@ -141,13 +117,6 @@ BasquePig <- R6::R6Class(
141117
this_object <- jsonlite::fromJSON(input_json)
142118
self$`className` <- this_object$`className`
143119
self$`color` <- this_object$`color`
144-
# process additional properties/fields in the payload
145-
for (key in names(this_object)) {
146-
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
147-
self$additional_properties[[key]] <- this_object[[key]]
148-
}
149-
}
150-
151120
self
152121
},
153122

samples/client/petstore/R-httr2-wrapper/R/cat.R

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,6 @@
1010
#' @field className character
1111
#' @field color character [optional]
1212
#' @field declawed character [optional]
13-
#' @field _field_list a list of fields list(character)
14-
#' @field additional_properties additional properties list(character) [optional]
1513
#' @importFrom R6 R6Class
1614
#' @importFrom jsonlite fromJSON toJSON
1715
#' @export
@@ -22,18 +20,15 @@ Cat <- R6::R6Class(
2220
`className` = NULL,
2321
`color` = NULL,
2422
`declawed` = NULL,
25-
`_field_list` = c("className", "color", "declawed"),
26-
`additional_properties` = list(),
2723

2824
#' @description
2925
#' Initialize a new Cat class.
3026
#'
3127
#' @param className className
3228
#' @param color color. Default to "red".
3329
#' @param declawed declawed
34-
#' @param additional_properties additional properties (optional)
3530
#' @param ... Other optional arguments.
36-
initialize = function(`className`, `color` = "red", `declawed` = NULL, additional_properties = NULL, ...) {
31+
initialize = function(`className`, `color` = "red", `declawed` = NULL, ...) {
3732
if (!missing(`className`)) {
3833
if (!(is.character(`className`) && length(`className`) == 1)) {
3934
stop(paste("Error! Invalid data for `className`. Must be a string:", `className`))
@@ -52,11 +47,6 @@ Cat <- R6::R6Class(
5247
}
5348
self$`declawed` <- `declawed`
5449
}
55-
if (!is.null(additional_properties)) {
56-
for (key in names(additional_properties)) {
57-
self$additional_properties[[key]] <- additional_properties[[key]]
58-
}
59-
}
6050
},
6151

6252
#' @description
@@ -102,10 +92,6 @@ Cat <- R6::R6Class(
10292
CatObject[["declawed"]] <-
10393
self$`declawed`
10494
}
105-
for (key in names(self$additional_properties)) {
106-
CatObject[[key]] <- self$additional_properties[[key]]
107-
}
108-
10995
return(CatObject)
11096
},
11197

@@ -125,13 +111,6 @@ Cat <- R6::R6Class(
125111
if (!is.null(this_object$`declawed`)) {
126112
self$`declawed` <- this_object$`declawed`
127113
}
128-
# process additional properties/fields in the payload
129-
for (key in names(this_object)) {
130-
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
131-
self$additional_properties[[key]] <- this_object[[key]]
132-
}
133-
}
134-
135114
self
136115
},
137116

@@ -142,9 +121,6 @@ Cat <- R6::R6Class(
142121
#' @return Cat in JSON format
143122
toJSONString = function(...) {
144123
simple <- self$toSimpleType()
145-
for (key in names(self$additional_properties)) {
146-
simple[[key]] <- self$additional_properties[[key]]
147-
}
148124
json <- jsonlite::toJSON(simple, auto_unbox = TRUE, digits = NA, ...)
149125
return(as.character(jsonlite::minify(json)))
150126
},
@@ -159,13 +135,6 @@ Cat <- R6::R6Class(
159135
self$`className` <- this_object$`className`
160136
self$`color` <- this_object$`color`
161137
self$`declawed` <- this_object$`declawed`
162-
# process additional properties/fields in the payload
163-
for (key in names(this_object)) {
164-
if (!(key %in% self$`_field_list`)) { # json key not in list of fields
165-
self$additional_properties[[key]] <- this_object[[key]]
166-
}
167-
}
168-
169138
self
170139
},
171140

0 commit comments

Comments
 (0)