File tree Expand file tree Collapse file tree
modules/openapi-generator/src/main/resources/r Expand file tree Collapse file tree Original file line number Diff line number Diff line change 206206
207207 { { /requiredParams} }
208208 { { #allParams} }
209+ { { ^isNullable} }
210+ if (is.null(`{ { paramName} } `)) {
211+ { { #useDefaultExceptionHandling} }
212+ stop(" Invalid value for `{ { paramName} } ` when calling { { classname} } ${ { operationId} } , `{ { paramName} } ` is not nullable" )
213+ { { /useDefaultExceptionHandling} }
214+ { { #useRlangExceptionHandling} }
215+ rlang::abort(message = " Invalid value for `{ { paramName} } ` when calling { { classname} } ${ { operationId} } , `{ { paramName} } ` is not nullable" ,
216+ .subclass = " ApiException" ,
217+ ApiException = ApiException$new (status = 0,
218+ reason = " Invalid value for `{ { paramName} } ` when calling { { classname} } ${ { operationId} } , `{ { paramName} } ` is not nullable" ))
219+ { { /useRlangExceptionHandling} }
220+ }
221+ { { /isNullable} }
209222 { { #maxLength} }
210223 if (! is.null(`{ { paramName} } `) && nchar(`{ { paramName} } `) > { { maxLength} } ) {
211224 { { #useDefaultExceptionHandling} }
You can’t perform that action at this time.
0 commit comments