Skip to content

Commit 1392b09

Browse files
committed
update samples
1 parent d1cd514 commit 1392b09

23 files changed

Lines changed: 163 additions & 161 deletions

File tree

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ BodyApi <- R6::R6Class(
300300
oauth_scopes <- NULL
301301
is_oauth <- FALSE
302302

303-
if (is.null(`body`)) {
303+
if (!missing(`body`) && is.null(`body`)) {
304304
stop("Invalid value for `body` when calling BodyApi$TestBodyApplicationOctetstreamBinary, `body` is not nullable")
305305
}
306306

@@ -403,7 +403,7 @@ BodyApi <- R6::R6Class(
403403
stop("Missing required parameter `files`.")
404404
}
405405

406-
if (is.null(`files`)) {
406+
if (!missing(`files`) && is.null(`files`)) {
407407
stop("Invalid value for `files` when calling BodyApi$TestBodyMultipartFormdataArrayOfBinary, `files` is not nullable")
408408
}
409409

@@ -497,7 +497,7 @@ BodyApi <- R6::R6Class(
497497
oauth_scopes <- NULL
498498
is_oauth <- FALSE
499499

500-
if (is.null(`my_file`)) {
500+
if (!missing(`my_file`) && is.null(`my_file`)) {
501501
stop("Invalid value for `my_file` when calling BodyApi$TestBodyMultipartFormdataSingleBinary, `my_file` is not nullable")
502502
}
503503

@@ -591,7 +591,7 @@ BodyApi <- R6::R6Class(
591591
oauth_scopes <- NULL
592592
is_oauth <- FALSE
593593

594-
if (is.null(`pet`)) {
594+
if (!missing(`pet`) && is.null(`pet`)) {
595595
stop("Invalid value for `pet` when calling BodyApi$TestEchoBodyAllOfPet, `pet` is not nullable")
596596
}
597597

@@ -690,7 +690,7 @@ BodyApi <- R6::R6Class(
690690
oauth_scopes <- NULL
691691
is_oauth <- FALSE
692692

693-
if (is.null(`body`)) {
693+
if (!missing(`body`) && is.null(`body`)) {
694694
stop("Invalid value for `body` when calling BodyApi$TestEchoBodyFreeFormObjectResponseString, `body` is not nullable")
695695
}
696696

@@ -789,7 +789,7 @@ BodyApi <- R6::R6Class(
789789
oauth_scopes <- NULL
790790
is_oauth <- FALSE
791791

792-
if (is.null(`pet`)) {
792+
if (!missing(`pet`) && is.null(`pet`)) {
793793
stop("Invalid value for `pet` when calling BodyApi$TestEchoBodyPet, `pet` is not nullable")
794794
}
795795

@@ -888,7 +888,7 @@ BodyApi <- R6::R6Class(
888888
oauth_scopes <- NULL
889889
is_oauth <- FALSE
890890

891-
if (is.null(`pet`)) {
891+
if (!missing(`pet`) && is.null(`pet`)) {
892892
stop("Invalid value for `pet` when calling BodyApi$TestEchoBodyPetResponseString, `pet` is not nullable")
893893
}
894894

@@ -987,7 +987,7 @@ BodyApi <- R6::R6Class(
987987
oauth_scopes <- NULL
988988
is_oauth <- FALSE
989989

990-
if (is.null(`body`)) {
990+
if (!missing(`body`) && is.null(`body`)) {
991991
stop("Invalid value for `body` when calling BodyApi$TestEchoBodyStringEnum, `body` is not nullable")
992992
}
993993

@@ -1086,7 +1086,7 @@ BodyApi <- R6::R6Class(
10861086
oauth_scopes <- NULL
10871087
is_oauth <- FALSE
10881088

1089-
if (is.null(`tag`)) {
1089+
if (!missing(`tag`) && is.null(`tag`)) {
10901090
stop("Invalid value for `tag` when calling BodyApi$TestEchoBodyTagResponseString, `tag` is not nullable")
10911091
}
10921092

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

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -127,15 +127,15 @@ FormApi <- R6::R6Class(
127127
oauth_scopes <- NULL
128128
is_oauth <- FALSE
129129

130-
if (is.null(`integer_form`)) {
130+
if (!missing(`integer_form`) && is.null(`integer_form`)) {
131131
stop("Invalid value for `integer_form` when calling FormApi$TestFormIntegerBooleanString, `integer_form` is not nullable")
132132
}
133133

134-
if (is.null(`boolean_form`)) {
134+
if (!missing(`boolean_form`) && is.null(`boolean_form`)) {
135135
stop("Invalid value for `boolean_form` when calling FormApi$TestFormIntegerBooleanString, `boolean_form` is not nullable")
136136
}
137137

138-
if (is.null(`string_form`)) {
138+
if (!missing(`string_form`) && is.null(`string_form`)) {
139139
stop("Invalid value for `string_form` when calling FormApi$TestFormIntegerBooleanString, `string_form` is not nullable")
140140
}
141141

@@ -235,7 +235,7 @@ FormApi <- R6::R6Class(
235235
stop("Missing required parameter `marker`.")
236236
}
237237

238-
if (is.null(`marker`)) {
238+
if (!missing(`marker`) && is.null(`marker`)) {
239239
stop("Invalid value for `marker` when calling FormApi$TestFormObjectMultipart, `marker` is not nullable")
240240
}
241241

@@ -339,27 +339,27 @@ FormApi <- R6::R6Class(
339339
oauth_scopes <- NULL
340340
is_oauth <- FALSE
341341

342-
if (is.null(`form1`)) {
342+
if (!missing(`form1`) && is.null(`form1`)) {
343343
stop("Invalid value for `form1` when calling FormApi$TestFormOneof, `form1` is not nullable")
344344
}
345345

346-
if (is.null(`form2`)) {
346+
if (!missing(`form2`) && is.null(`form2`)) {
347347
stop("Invalid value for `form2` when calling FormApi$TestFormOneof, `form2` is not nullable")
348348
}
349349

350-
if (is.null(`form3`)) {
350+
if (!missing(`form3`) && is.null(`form3`)) {
351351
stop("Invalid value for `form3` when calling FormApi$TestFormOneof, `form3` is not nullable")
352352
}
353353

354-
if (is.null(`form4`)) {
354+
if (!missing(`form4`) && is.null(`form4`)) {
355355
stop("Invalid value for `form4` when calling FormApi$TestFormOneof, `form4` is not nullable")
356356
}
357357

358-
if (is.null(`id`)) {
358+
if (!missing(`id`) && is.null(`id`)) {
359359
stop("Invalid value for `id` when calling FormApi$TestFormOneof, `id` is not nullable")
360360
}
361361

362-
if (is.null(`name`)) {
362+
if (!missing(`name`) && is.null(`name`)) {
363363
stop("Invalid value for `name` when calling FormApi$TestFormOneof, `name` is not nullable")
364364
}
365365

samples/client/echo_api/r/R/header_api.R

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,23 +100,23 @@ HeaderApi <- R6::R6Class(
100100
oauth_scopes <- NULL
101101
is_oauth <- FALSE
102102

103-
if (is.null(`integer_header`)) {
103+
if (!missing(`integer_header`) && is.null(`integer_header`)) {
104104
stop("Invalid value for `integer_header` when calling HeaderApi$TestHeaderIntegerBooleanStringEnums, `integer_header` is not nullable")
105105
}
106106

107-
if (is.null(`boolean_header`)) {
107+
if (!missing(`boolean_header`) && is.null(`boolean_header`)) {
108108
stop("Invalid value for `boolean_header` when calling HeaderApi$TestHeaderIntegerBooleanStringEnums, `boolean_header` is not nullable")
109109
}
110110

111-
if (is.null(`string_header`)) {
111+
if (!missing(`string_header`) && is.null(`string_header`)) {
112112
stop("Invalid value for `string_header` when calling HeaderApi$TestHeaderIntegerBooleanStringEnums, `string_header` is not nullable")
113113
}
114114

115-
if (is.null(`enum_nonref_string_header`)) {
115+
if (!missing(`enum_nonref_string_header`) && is.null(`enum_nonref_string_header`)) {
116116
stop("Invalid value for `enum_nonref_string_header` when calling HeaderApi$TestHeaderIntegerBooleanStringEnums, `enum_nonref_string_header` is not nullable")
117117
}
118118

119-
if (is.null(`enum_ref_string_header`)) {
119+
if (!missing(`enum_ref_string_header`) && is.null(`enum_ref_string_header`)) {
120120
stop("Invalid value for `enum_ref_string_header` when calling HeaderApi$TestHeaderIntegerBooleanStringEnums, `enum_ref_string_header` is not nullable")
121121
}
122122

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,19 +113,19 @@ PathApi <- R6::R6Class(
113113
stop("Missing required parameter `enum_ref_string_path`.")
114114
}
115115

116-
if (is.null(`path_string`)) {
116+
if (!missing(`path_string`) && is.null(`path_string`)) {
117117
stop("Invalid value for `path_string` when calling PathApi$TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath, `path_string` is not nullable")
118118
}
119119

120-
if (is.null(`path_integer`)) {
120+
if (!missing(`path_integer`) && is.null(`path_integer`)) {
121121
stop("Invalid value for `path_integer` when calling PathApi$TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath, `path_integer` is not nullable")
122122
}
123123

124-
if (is.null(`enum_nonref_string_path`)) {
124+
if (!missing(`enum_nonref_string_path`) && is.null(`enum_nonref_string_path`)) {
125125
stop("Invalid value for `enum_nonref_string_path` when calling PathApi$TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath, `enum_nonref_string_path` is not nullable")
126126
}
127127

128-
if (is.null(`enum_ref_string_path`)) {
128+
if (!missing(`enum_ref_string_path`) && is.null(`enum_ref_string_path`)) {
129129
stop("Invalid value for `enum_ref_string_path` when calling PathApi$TestsPathStringPathStringIntegerPathIntegerEnumNonrefStringPathEnumRefStringPath, `enum_ref_string_path` is not nullable")
130130
}
131131

samples/client/echo_api/r/R/query_api.R

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,11 @@ QueryApi <- R6::R6Class(
221221
oauth_scopes <- NULL
222222
is_oauth <- FALSE
223223

224-
if (is.null(`enum_nonref_string_query`)) {
224+
if (!missing(`enum_nonref_string_query`) && is.null(`enum_nonref_string_query`)) {
225225
stop("Invalid value for `enum_nonref_string_query` when calling QueryApi$TestEnumRefString, `enum_nonref_string_query` is not nullable")
226226
}
227227

228-
if (is.null(`enum_ref_string_query`)) {
228+
if (!missing(`enum_ref_string_query`) && is.null(`enum_ref_string_query`)) {
229229
stop("Invalid value for `enum_ref_string_query` when calling QueryApi$TestEnumRefString, `enum_ref_string_query` is not nullable")
230230
}
231231

@@ -329,15 +329,15 @@ QueryApi <- R6::R6Class(
329329
oauth_scopes <- NULL
330330
is_oauth <- FALSE
331331

332-
if (is.null(`datetime_query`)) {
332+
if (!missing(`datetime_query`) && is.null(`datetime_query`)) {
333333
stop("Invalid value for `datetime_query` when calling QueryApi$TestQueryDatetimeDateString, `datetime_query` is not nullable")
334334
}
335335

336-
if (is.null(`date_query`)) {
336+
if (!missing(`date_query`) && is.null(`date_query`)) {
337337
stop("Invalid value for `date_query` when calling QueryApi$TestQueryDatetimeDateString, `date_query` is not nullable")
338338
}
339339

340-
if (is.null(`string_query`)) {
340+
if (!missing(`string_query`) && is.null(`string_query`)) {
341341
stop("Invalid value for `string_query` when calling QueryApi$TestQueryDatetimeDateString, `string_query` is not nullable")
342342
}
343343

@@ -440,15 +440,15 @@ QueryApi <- R6::R6Class(
440440
oauth_scopes <- NULL
441441
is_oauth <- FALSE
442442

443-
if (is.null(`integer_query`)) {
443+
if (!missing(`integer_query`) && is.null(`integer_query`)) {
444444
stop("Invalid value for `integer_query` when calling QueryApi$TestQueryIntegerBooleanString, `integer_query` is not nullable")
445445
}
446446

447-
if (is.null(`boolean_query`)) {
447+
if (!missing(`boolean_query`) && is.null(`boolean_query`)) {
448448
stop("Invalid value for `boolean_query` when calling QueryApi$TestQueryIntegerBooleanString, `boolean_query` is not nullable")
449449
}
450450

451-
if (is.null(`string_query`)) {
451+
if (!missing(`string_query`) && is.null(`string_query`)) {
452452
stop("Invalid value for `string_query` when calling QueryApi$TestQueryIntegerBooleanString, `string_query` is not nullable")
453453
}
454454

@@ -547,7 +547,7 @@ QueryApi <- R6::R6Class(
547547
oauth_scopes <- NULL
548548
is_oauth <- FALSE
549549

550-
if (is.null(`query_object`)) {
550+
if (!missing(`query_object`) && is.null(`query_object`)) {
551551
stop("Invalid value for `query_object` when calling QueryApi$TestQueryStyleDeepObjectExplodeTrueObject, `query_object` is not nullable")
552552
}
553553

@@ -642,7 +642,7 @@ QueryApi <- R6::R6Class(
642642
oauth_scopes <- NULL
643643
is_oauth <- FALSE
644644

645-
if (is.null(`query_object`)) {
645+
if (!missing(`query_object`) && is.null(`query_object`)) {
646646
stop("Invalid value for `query_object` when calling QueryApi$TestQueryStyleDeepObjectExplodeTrueObjectAllOf, `query_object` is not nullable")
647647
}
648648

@@ -737,7 +737,7 @@ QueryApi <- R6::R6Class(
737737
oauth_scopes <- NULL
738738
is_oauth <- FALSE
739739

740-
if (is.null(`query_object`)) {
740+
if (!missing(`query_object`) && is.null(`query_object`)) {
741741
stop("Invalid value for `query_object` when calling QueryApi$TestQueryStyleFormExplodeFalseArrayInteger, `query_object` is not nullable")
742742
}
743743

@@ -833,7 +833,7 @@ QueryApi <- R6::R6Class(
833833
oauth_scopes <- NULL
834834
is_oauth <- FALSE
835835

836-
if (is.null(`query_object`)) {
836+
if (!missing(`query_object`) && is.null(`query_object`)) {
837837
stop("Invalid value for `query_object` when calling QueryApi$TestQueryStyleFormExplodeFalseArrayString, `query_object` is not nullable")
838838
}
839839

@@ -929,7 +929,7 @@ QueryApi <- R6::R6Class(
929929
oauth_scopes <- NULL
930930
is_oauth <- FALSE
931931

932-
if (is.null(`query_object`)) {
932+
if (!missing(`query_object`) && is.null(`query_object`)) {
933933
stop("Invalid value for `query_object` when calling QueryApi$TestQueryStyleFormExplodeTrueArrayString, `query_object` is not nullable")
934934
}
935935

@@ -1024,7 +1024,7 @@ QueryApi <- R6::R6Class(
10241024
oauth_scopes <- NULL
10251025
is_oauth <- FALSE
10261026

1027-
if (is.null(`query_object`)) {
1027+
if (!missing(`query_object`) && is.null(`query_object`)) {
10281028
stop("Invalid value for `query_object` when calling QueryApi$TestQueryStyleFormExplodeTrueObject, `query_object` is not nullable")
10291029
}
10301030

@@ -1119,7 +1119,7 @@ QueryApi <- R6::R6Class(
11191119
oauth_scopes <- NULL
11201120
is_oauth <- FALSE
11211121

1122-
if (is.null(`query_object`)) {
1122+
if (!missing(`query_object`) && is.null(`query_object`)) {
11231123
stop("Invalid value for `query_object` when calling QueryApi$TestQueryStyleFormExplodeTrueObjectAllOf, `query_object` is not nullable")
11241124
}
11251125

samples/client/others/typescript/builds/null-types-simple/.openapi-generator/FILES

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/client/others/typescript/builds/null-types-simple/models/ObjectSerializer.ts

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/client/others/typescript/builds/null-types-simple/models/all.ts

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/client/others/typescript/builds/null-types-simple/types/ObjectParamAPI.ts

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

samples/client/others/typescript/builds/null-types-simple/types/ObservableAPI.ts

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)