File tree Expand file tree Collapse file tree
modules/openapi-generator/src/main/java/org/openapitools/codegen/languages Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -430,6 +430,26 @@ public void processOpts() {
430430 documentationProvider = DocumentationProvider .NONE ;
431431 annotationLibrary = AnnotationLibrary .NONE ;
432432 useJakartaEe = true ;
433+ if (!additionalProperties .containsKey (USE_BEANVALIDATION )) {
434+ useBeanValidation = false ;
435+ } else {
436+ Object beanValidationValue = additionalProperties .get (USE_BEANVALIDATION );
437+ if (beanValidationValue instanceof Boolean ) {
438+ useBeanValidation = (Boolean ) beanValidationValue ;
439+ } else if (beanValidationValue instanceof String ) {
440+ useBeanValidation = Boolean .parseBoolean ((String ) beanValidationValue );
441+ }
442+ }
443+ if (!additionalProperties .containsKey (PERFORM_BEANVALIDATION )) {
444+ performBeanValidation = false ;
445+ } else {
446+ Object performBeanValidationValue = additionalProperties .get (PERFORM_BEANVALIDATION );
447+ if (performBeanValidationValue instanceof Boolean ) {
448+ performBeanValidation = (Boolean ) performBeanValidationValue ;
449+ } else if (performBeanValidationValue instanceof String ) {
450+ performBeanValidation = Boolean .parseBoolean ((String ) performBeanValidationValue );
451+ }
452+ }
433453
434454 additionalProperties .put (USE_JAKARTA_EE , useJakartaEe );
435455 additionalProperties .put (USE_BEANVALIDATION , useBeanValidation );
You can’t perform that action at this time.
0 commit comments