File tree Expand file tree Collapse file tree 1 file changed +13
-5
lines changed
src/main/kotlin/io/openapiprocessor/spring/model/parameters Expand file tree Collapse file tree 1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change 55
66package io.openapiprocessor.spring.model.parameters
77
8- import io.openapiprocessor.core.model.datatypes.DataType
8+ import io.openapiprocessor.core.model.datatypes.*
99import io.openapiprocessor.core.model.parameters.ParameterBase
10- import io.openapiprocessor.core.model.datatypes.MappedDataType
11- import io.openapiprocessor.core.model.datatypes.ObjectDataType
1210
1311val Maps = listOf (
1412 Map ::class .java.name,
@@ -43,8 +41,8 @@ class QueryParameter(
4341
4442 // Mapped should NOT be annotated if it was object schema
4543 // Mapped should be annotated if it was a simple schema
46- if (dataType is MappedDataType ) {
47- return (dataType as MappedDataType ).simpleDataType
44+ if (isMappedObject ) {
45+ return false
4846 }
4947
5048 return true
@@ -77,4 +75,14 @@ class QueryParameter(
7775 val type = dataType.getImports().first()
7876 return Maps .contains(type)
7977 }
78+
79+ private val isMappedObject: Boolean
80+ get() {
81+ if (dataType !is MappedSourceDataType ) {
82+ return false
83+ }
84+
85+ val mapped = dataType as MappedSourceDataType
86+ return mapped.sourceDataType is ObjectDataType
87+ }
8088}
You can’t perform that action at this time.
0 commit comments