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

Commit b76b519

Browse files
committed
better name
1 parent df6cd27 commit b76b519

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ open class BeanValidationFactory {
1717
* override to add annotations to the model object class.
1818
*/
1919
open fun validate(dataType: ModelDataType): BeanValidationInfo {
20-
return BeanValidationInfoProperty(dataType, emptySet(), emptyList())
20+
return BeanValidationInfoSimple(dataType, emptySet(), emptyList())
2121
}
2222

2323
fun validate(dataType: DataType, required: Boolean = false): BeanValidationInfo {
@@ -29,7 +29,7 @@ open class BeanValidationFactory {
2929
validate(dataType.item, false)
3030
)
3131
} else {
32-
BeanValidationInfoProperty(
32+
BeanValidationInfoSimple(
3333
dataType,
3434
collectImports(dataType, required),
3535
collectAnnotations(dataType, required)

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@ interface BeanValidationInfo {
2121
val inout: BeanValidationValue
2222
}
2323

24-
// BeanValidationInfoSimple
25-
class BeanValidationInfoProperty(
24+
class BeanValidationInfoSimple(
2625
override val dataType: DataType,
2726
override val imports: Set<String>,
2827
override val annotations: List<String>

src/test/kotlin/io/openapiprocessor/core/writer/java/DataTypeWriterSpec.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class DataTypeWriterSpec: StringSpec({
7777
options.beanValidation = true
7878
val validation = object : BeanValidationFactory() {
7979
override fun validate(dataType: ModelDataType): BeanValidationInfo {
80-
return BeanValidationInfoProperty(
80+
return BeanValidationInfoSimple(
8181
dataType, setOf("foo.Foo"), listOf("@Foo"))
8282
}
8383
}
@@ -99,7 +99,7 @@ class DataTypeWriterSpec: StringSpec({
9999
options.beanValidation = true
100100
val validation = object : BeanValidationFactory() {
101101
override fun validate(dataType: ModelDataType): BeanValidationInfo {
102-
return BeanValidationInfoProperty(
102+
return BeanValidationInfoSimple(
103103
dataType, setOf("foo.Foo"), listOf("@Foo"))
104104
}
105105
}

0 commit comments

Comments
 (0)