Skip to content

Commit 1fa8d73

Browse files
committed
update petstore for nonnull required params
1 parent 740de6d commit 1fa8d73

File tree

15 files changed

+87
-87
lines changed

15 files changed

+87
-87
lines changed

samples/client/echo_api/r/R/body_api.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,7 +396,7 @@ BodyApi <- R6::R6Class(
396396
oauth_scopes <- NULL
397397
is_oauth <- FALSE
398398

399-
if (missing(`files`)) {
399+
if (missing(`files`) || is.null(`files`)) {
400400
stop("Missing required parameter `files`.")
401401
}
402402

samples/client/echo_api/r/R/form_api.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ FormApi <- R6::R6Class(
222222
oauth_scopes <- NULL
223223
is_oauth <- FALSE
224224

225-
if (missing(`marker`)) {
225+
if (missing(`marker`) || is.null(`marker`)) {
226226
stop("Missing required parameter `marker`.")
227227
}
228228

samples/client/echo_api/r/R/path_api.R

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,19 +97,19 @@ PathApi <- R6::R6Class(
9797
oauth_scopes <- NULL
9898
is_oauth <- FALSE
9999

100-
if (missing(`path_string`)) {
100+
if (missing(`path_string`) || is.null(`path_string`)) {
101101
stop("Missing required parameter `path_string`.")
102102
}
103103

104-
if (missing(`path_integer`)) {
104+
if (missing(`path_integer`) || is.null(`path_integer`)) {
105105
stop("Missing required parameter `path_integer`.")
106106
}
107107

108-
if (missing(`enum_nonref_string_path`)) {
108+
if (missing(`enum_nonref_string_path`) || is.null(`enum_nonref_string_path`)) {
109109
stop("Missing required parameter `enum_nonref_string_path`.")
110110
}
111111

112-
if (missing(`enum_ref_string_path`)) {
112+
if (missing(`enum_ref_string_path`) || is.null(`enum_ref_string_path`)) {
113113
stop("Missing required parameter `enum_ref_string_path`.")
114114
}
115115

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ FakeApi <- R6::R6Class(
338338
oauth_scopes <- NULL
339339
is_oauth <- FALSE
340340

341-
if (missing(`dummy`)) {
341+
if (missing(`dummy`) || is.null(`dummy`)) {
342342
rlang::abort(message = "Missing required parameter `dummy`.",
343343
.subclass = "ApiException",
344344
ApiException = ApiException$new(status = 0,
@@ -453,7 +453,7 @@ FakeApi <- R6::R6Class(
453453
oauth_scopes <- NULL
454454
is_oauth <- FALSE
455455

456-
if (missing(`path_array`)) {
456+
if (missing(`path_array`) || is.null(`path_array`)) {
457457
rlang::abort(message = "Missing required parameter `path_array`.",
458458
.subclass = "ApiException",
459459
ApiException = ApiException$new(status = 0,
@@ -554,7 +554,7 @@ FakeApi <- R6::R6Class(
554554
oauth_scopes <- NULL
555555
is_oauth <- FALSE
556556

557-
if (missing(`reg_exp_test`)) {
557+
if (missing(`reg_exp_test`) || is.null(`reg_exp_test`)) {
558558
rlang::abort(message = "Missing required parameter `reg_exp_test`.",
559559
.subclass = "ApiException",
560560
ApiException = ApiException$new(status = 0,
@@ -661,14 +661,14 @@ FakeApi <- R6::R6Class(
661661
oauth_scopes <- NULL
662662
is_oauth <- FALSE
663663

664-
if (missing(`set_dummy`)) {
664+
if (missing(`set_dummy`) || is.null(`set_dummy`)) {
665665
rlang::abort(message = "Missing required parameter `set_dummy`.",
666666
.subclass = "ApiException",
667667
ApiException = ApiException$new(status = 0,
668668
reason = "Missing required parameter `set_dummy`."))
669669
}
670670

671-
if (missing(`array_dummy`)) {
671+
if (missing(`array_dummy`) || is.null(`array_dummy`)) {
672672
rlang::abort(message = "Missing required parameter `array_dummy`.",
673673
.subclass = "ApiException",
674674
ApiException = ApiException$new(status = 0,

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ PetApi <- R6::R6Class(
424424
oauth_scopes <- NULL
425425
is_oauth <- FALSE
426426

427-
if (missing(`pet`)) {
427+
if (missing(`pet`) || is.null(`pet`)) {
428428
rlang::abort(message = "Missing required parameter `pet`.",
429429
.subclass = "ApiException",
430430
ApiException = ApiException$new(status = 0,
@@ -546,7 +546,7 @@ PetApi <- R6::R6Class(
546546
oauth_scopes <- NULL
547547
is_oauth <- FALSE
548548

549-
if (missing(`pet_id`)) {
549+
if (missing(`pet_id`) || is.null(`pet_id`)) {
550550
rlang::abort(message = "Missing required parameter `pet_id`.",
551551
.subclass = "ApiException",
552552
ApiException = ApiException$new(status = 0,
@@ -655,7 +655,7 @@ PetApi <- R6::R6Class(
655655
oauth_scopes <- NULL
656656
is_oauth <- FALSE
657657

658-
if (missing(`status`)) {
658+
if (missing(`status`) || is.null(`status`)) {
659659
rlang::abort(message = "Missing required parameter `status`.",
660660
.subclass = "ApiException",
661661
ApiException = ApiException$new(status = 0,
@@ -782,7 +782,7 @@ PetApi <- R6::R6Class(
782782
oauth_scopes <- NULL
783783
is_oauth <- FALSE
784784

785-
if (missing(`tags`)) {
785+
if (missing(`tags`) || is.null(`tags`)) {
786786
rlang::abort(message = "Missing required parameter `tags`.",
787787
.subclass = "ApiException",
788788
ApiException = ApiException$new(status = 0,
@@ -897,7 +897,7 @@ PetApi <- R6::R6Class(
897897
oauth_scopes <- NULL
898898
is_oauth <- FALSE
899899

900-
if (missing(`pet_id`)) {
900+
if (missing(`pet_id`) || is.null(`pet_id`)) {
901901
rlang::abort(message = "Missing required parameter `pet_id`.",
902902
.subclass = "ApiException",
903903
ApiException = ApiException$new(status = 0,
@@ -1023,7 +1023,7 @@ PetApi <- R6::R6Class(
10231023
oauth_scopes <- NULL
10241024
is_oauth <- FALSE
10251025

1026-
if (missing(`pet_id`)) {
1026+
if (missing(`pet_id`) || is.null(`pet_id`)) {
10271027
rlang::abort(message = "Missing required parameter `pet_id`.",
10281028
.subclass = "ApiException",
10291029
ApiException = ApiException$new(status = 0,
@@ -1154,7 +1154,7 @@ PetApi <- R6::R6Class(
11541154
oauth_scopes <- NULL
11551155
is_oauth <- FALSE
11561156

1157-
if (missing(`header_test_int`)) {
1157+
if (missing(`header_test_int`) || is.null(`header_test_int`)) {
11581158
rlang::abort(message = "Missing required parameter `header_test_int`.",
11591159
.subclass = "ApiException",
11601160
ApiException = ApiException$new(status = 0,
@@ -1277,7 +1277,7 @@ PetApi <- R6::R6Class(
12771277
oauth_scopes <- NULL
12781278
is_oauth <- FALSE
12791279

1280-
if (missing(`pet`)) {
1280+
if (missing(`pet`) || is.null(`pet`)) {
12811281
rlang::abort(message = "Missing required parameter `pet`.",
12821282
.subclass = "ApiException",
12831283
ApiException = ApiException$new(status = 0,
@@ -1400,7 +1400,7 @@ PetApi <- R6::R6Class(
14001400
oauth_scopes <- NULL
14011401
is_oauth <- FALSE
14021402

1403-
if (missing(`pet_id`)) {
1403+
if (missing(`pet_id`) || is.null(`pet_id`)) {
14041404
rlang::abort(message = "Missing required parameter `pet_id`.",
14051405
.subclass = "ApiException",
14061406
ApiException = ApiException$new(status = 0,
@@ -1511,7 +1511,7 @@ PetApi <- R6::R6Class(
15111511
oauth_scopes <- NULL
15121512
is_oauth <- FALSE
15131513

1514-
if (missing(`pet_id`)) {
1514+
if (missing(`pet_id`) || is.null(`pet_id`)) {
15151515
rlang::abort(message = "Missing required parameter `pet_id`.",
15161516
.subclass = "ApiException",
15171517
ApiException = ApiException$new(status = 0,

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ StoreApi <- R6::R6Class(
198198
oauth_scopes <- NULL
199199
is_oauth <- FALSE
200200

201-
if (missing(`order_id`)) {
201+
if (missing(`order_id`) || is.null(`order_id`)) {
202202
rlang::abort(message = "Missing required parameter `order_id`.",
203203
.subclass = "ApiException",
204204
ApiException = ApiException$new(status = 0,
@@ -407,7 +407,7 @@ StoreApi <- R6::R6Class(
407407
oauth_scopes <- NULL
408408
is_oauth <- FALSE
409409

410-
if (missing(`order_id`)) {
410+
if (missing(`order_id`) || is.null(`order_id`)) {
411411
rlang::abort(message = "Missing required parameter `order_id`.",
412412
.subclass = "ApiException",
413413
ApiException = ApiException$new(status = 0,
@@ -535,7 +535,7 @@ StoreApi <- R6::R6Class(
535535
oauth_scopes <- NULL
536536
is_oauth <- FALSE
537537

538-
if (missing(`order`)) {
538+
if (missing(`order`) || is.null(`order`)) {
539539
rlang::abort(message = "Missing required parameter `order`.",
540540
.subclass = "ApiException",
541541
ApiException = ApiException$new(status = 0,

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ UserApi <- R6::R6Class(
307307
oauth_scopes <- NULL
308308
is_oauth <- FALSE
309309

310-
if (missing(`user`)) {
310+
if (missing(`user`) || is.null(`user`)) {
311311
rlang::abort(message = "Missing required parameter `user`.",
312312
.subclass = "ApiException",
313313
ApiException = ApiException$new(status = 0,
@@ -414,7 +414,7 @@ UserApi <- R6::R6Class(
414414
oauth_scopes <- NULL
415415
is_oauth <- FALSE
416416

417-
if (missing(`user`)) {
417+
if (missing(`user`) || is.null(`user`)) {
418418
rlang::abort(message = "Missing required parameter `user`.",
419419
.subclass = "ApiException",
420420
ApiException = ApiException$new(status = 0,
@@ -524,7 +524,7 @@ UserApi <- R6::R6Class(
524524
oauth_scopes <- NULL
525525
is_oauth <- FALSE
526526

527-
if (missing(`user`)) {
527+
if (missing(`user`) || is.null(`user`)) {
528528
rlang::abort(message = "Missing required parameter `user`.",
529529
.subclass = "ApiException",
530530
ApiException = ApiException$new(status = 0,
@@ -634,7 +634,7 @@ UserApi <- R6::R6Class(
634634
oauth_scopes <- NULL
635635
is_oauth <- FALSE
636636

637-
if (missing(`username`)) {
637+
if (missing(`username`) || is.null(`username`)) {
638638
rlang::abort(message = "Missing required parameter `username`.",
639639
.subclass = "ApiException",
640640
ApiException = ApiException$new(status = 0,
@@ -741,7 +741,7 @@ UserApi <- R6::R6Class(
741741
oauth_scopes <- NULL
742742
is_oauth <- FALSE
743743

744-
if (missing(`username`)) {
744+
if (missing(`username`) || is.null(`username`)) {
745745
rlang::abort(message = "Missing required parameter `username`.",
746746
.subclass = "ApiException",
747747
ApiException = ApiException$new(status = 0,
@@ -859,14 +859,14 @@ UserApi <- R6::R6Class(
859859
oauth_scopes <- NULL
860860
is_oauth <- FALSE
861861

862-
if (missing(`username`)) {
862+
if (missing(`username`) || is.null(`username`)) {
863863
rlang::abort(message = "Missing required parameter `username`.",
864864
.subclass = "ApiException",
865865
ApiException = ApiException$new(status = 0,
866866
reason = "Missing required parameter `username`."))
867867
}
868868

869-
if (missing(`password`)) {
869+
if (missing(`password`) || is.null(`password`)) {
870870
rlang::abort(message = "Missing required parameter `password`.",
871871
.subclass = "ApiException",
872872
ApiException = ApiException$new(status = 0,
@@ -1080,14 +1080,14 @@ UserApi <- R6::R6Class(
10801080
oauth_scopes <- NULL
10811081
is_oauth <- FALSE
10821082

1083-
if (missing(`username`)) {
1083+
if (missing(`username`) || is.null(`username`)) {
10841084
rlang::abort(message = "Missing required parameter `username`.",
10851085
.subclass = "ApiException",
10861086
ApiException = ApiException$new(status = 0,
10871087
reason = "Missing required parameter `username`."))
10881088
}
10891089

1090-
if (missing(`user`)) {
1090+
if (missing(`user`) || is.null(`user`)) {
10911091
rlang::abort(message = "Missing required parameter `user`.",
10921092
.subclass = "ApiException",
10931093
ApiException = ApiException$new(status = 0,

samples/client/petstore/R-httr2/R/fake_api.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ FakeApi <- R6::R6Class(
338338
oauth_scopes <- NULL
339339
is_oauth <- FALSE
340340

341-
if (missing(`dummy`)) {
341+
if (missing(`dummy`) || is.null(`dummy`)) {
342342
rlang::abort(message = "Missing required parameter `dummy`.",
343343
.subclass = "ApiException",
344344
ApiException = ApiException$new(status = 0,
@@ -453,7 +453,7 @@ FakeApi <- R6::R6Class(
453453
oauth_scopes <- NULL
454454
is_oauth <- FALSE
455455

456-
if (missing(`path_array_parameter`)) {
456+
if (missing(`path_array_parameter`) || is.null(`path_array_parameter`)) {
457457
rlang::abort(message = "Missing required parameter `path_array_parameter`.",
458458
.subclass = "ApiException",
459459
ApiException = ApiException$new(status = 0,
@@ -554,7 +554,7 @@ FakeApi <- R6::R6Class(
554554
oauth_scopes <- NULL
555555
is_oauth <- FALSE
556556

557-
if (missing(`reg_exp_test`)) {
557+
if (missing(`reg_exp_test`) || is.null(`reg_exp_test`)) {
558558
rlang::abort(message = "Missing required parameter `reg_exp_test`.",
559559
.subclass = "ApiException",
560560
ApiException = ApiException$new(status = 0,
@@ -661,14 +661,14 @@ FakeApi <- R6::R6Class(
661661
oauth_scopes <- NULL
662662
is_oauth <- FALSE
663663

664-
if (missing(`set_dummy`)) {
664+
if (missing(`set_dummy`) || is.null(`set_dummy`)) {
665665
rlang::abort(message = "Missing required parameter `set_dummy`.",
666666
.subclass = "ApiException",
667667
ApiException = ApiException$new(status = 0,
668668
reason = "Missing required parameter `set_dummy`."))
669669
}
670670

671-
if (missing(`array_dummy`)) {
671+
if (missing(`array_dummy`) || is.null(`array_dummy`)) {
672672
rlang::abort(message = "Missing required parameter `array_dummy`.",
673673
.subclass = "ApiException",
674674
ApiException = ApiException$new(status = 0,

0 commit comments

Comments
 (0)