File tree Expand file tree Collapse file tree
openapi-processor-core/src
main/kotlin/io/openapiprocessor/core
test/kotlin/io/openapiprocessor/core/converter Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -72,7 +72,11 @@ class OptionsConverter(private val checkObsoleteProcessorOptions: Boolean = fals
7272 options.oneOfInterface = mapping.options.oneOfInterface
7373 options.formatCode = mapping.options.formatCode
7474 options.generatedDate = mapping.options.generatedDate
75- options.beanValidationValidOnReactive = mapping.options.beanValidationValidOnReactive
75+
76+ with (mapping.compatibility) {
77+ options.beanValidationValidOnReactive = beanValidationValidOnReactive
78+ options.identifierWordBreakFromDigitToLetter = identifierWordBreakFromDigitToLetter
79+ }
7680 }
7781 }
7882
Original file line number Diff line number Diff line change @@ -65,12 +65,5 @@ data class Options(
6565 /* *
6666 * enable/disable the @Generated date (optional)
6767 */
68- val generatedDate : Boolean = true ,
69-
70- /* *
71- * bean validation (compatibility)
72- *
73- * add @Valid on reactive type and not on the wrapped type
74- */
75- val beanValidationValidOnReactive : Boolean = true
68+ val generatedDate : Boolean = true
7669)
Original file line number Diff line number Diff line change @@ -31,7 +31,9 @@ class OptionsConverterSpec: StringSpec({
3131 options.formatCode.shouldBeFalse()
3232
3333 options.typeMappings shouldHaveSize 0
34- options.formatCode.shouldBeFalse()
34+
35+ options.beanValidationValidOnReactive.shouldBeTrue()
36+ options.identifierWordBreakFromDigitToLetter.shouldBeTrue()
3537 }
3638
3739 " should set target dir" {
@@ -106,6 +108,9 @@ class OptionsConverterSpec: StringSpec({
106108 bean-validation: true
107109 javadoc: true
108110 format-code: false
111+ compatibility:
112+ bean-validation-valid-on-reactive: false
113+ identifier-word-break-from-digit-to-letter: false
109114 """.trimIndent()
110115 ))
111116
@@ -117,6 +122,9 @@ class OptionsConverterSpec: StringSpec({
117122 options.beanValidation shouldBe true
118123 options.javadoc shouldBe true
119124 options.formatCode.shouldBeFalse()
125+
126+ options.beanValidationValidOnReactive.shouldBeFalse()
127+ options.identifierWordBreakFromDigitToLetter.shouldBeFalse()
120128 }
121129
122130 data class BeanData (val source: String , val enabled: Boolean , val format: String? )
You can’t perform that action at this time.
0 commit comments