File tree Expand file tree Collapse file tree 1 file changed +16
-15
lines changed
openapi-processor-core/src/main/kotlin/io/openapiprocessor/core/writer/java Expand file tree Collapse file tree 1 file changed +16
-15
lines changed Original file line number Diff line number Diff line change @@ -177,28 +177,29 @@ open class BeanValidationFactory(
177177}
178178
179179private fun DataType.shouldHaveValid (options : ApiOptions ): Boolean {
180- if (this is SingleDataType && options.beanValidationValidOnReactive)
181- return true
180+ return if (this is SingleDataType && options.beanValidationValidOnReactive)
181+ true
182182
183- if (this is ModelDataType )
184- return true
183+ else if (this is ModelDataType )
184+ true
185185
186- if (this is ArrayDataType )
187- return item is ModelDataType
186+ else if (this is ArrayDataType )
187+ item is ModelDataType
188188
189- if (this is InterfaceDataType )
190- return true
189+ else if (this is InterfaceDataType )
190+ true
191191
192- if (this is MappedCollectionDataType && options.beanValidationValidOnReactive)
193- return multi
192+ else if (this is MappedCollectionDataType && options.beanValidationValidOnReactive)
193+ multi
194194
195- if (this is MappedCollectionDataType )
196- return false
195+ else if (this is MappedCollectionDataType )
196+ false
197197
198- if (this is MappedSourceDataType )
199- return sourceDataType?.shouldHaveValid(options) ? : false
198+ else if (this is MappedSourceDataType )
199+ sourceDataType?.shouldHaveValid(options) ? : false
200200
201- return false
201+ else
202+ false
202203}
203204
204205private fun DataType.isString (): Boolean = this is StringDataType
You can’t perform that action at this time.
0 commit comments