Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

Commit fcda743

Browse files
committed
1 parent b76b519 commit fcda743

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/main/kotlin/io/openapiprocessor/core/writer/java/InterfaceWriter.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,9 @@ class InterfaceWriter(
102102
imports.addAll(body.dataTypeImports)
103103

104104
if (apiOptions.beanValidation) {
105-
val info = validationAnnotations.validate(body.dataType, false)
106-
imports.addAll(info.imports)
105+
val info = validationAnnotations.validate(body.dataType, body.required)
106+
val io = info.inout
107+
imports.addAll(io.imports)
107108
}
108109
}
109110

src/main/kotlin/io/openapiprocessor/core/writer/java/MethodWriter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ open class MethodWriter(
104104
val body = endpoint.getRequestBody()
105105

106106
val dataTypeValue = if (apiOptions.beanValidation) {
107-
val info = beanValidationFactory.validate(body.dataType, false)
107+
val info = beanValidationFactory.validate(body.dataType, body.required)
108108
info.inout.dataTypeValue
109109
} else {
110110
body.dataType.getTypeName()

0 commit comments

Comments
 (0)