Skip to content

Commit da9ab86

Browse files
committed
"DataTypes" should match without path prefix
1 parent 02eb8c0 commit da9ab86

File tree

1 file changed

+7
-2
lines changed
  • openapi-processor-core/src/main/kotlin/io/openapiprocessor/core/converter

1 file changed

+7
-2
lines changed

openapi-processor-core/src/main/kotlin/io/openapiprocessor/core/converter/SchemaInfo.kt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,13 +255,18 @@ class SchemaInfo(
255255
* @return a new {@link SchemaInfo}
256256
*/
257257
fun buildForItem(): SchemaInfo {
258+
val name = if (schema?.getItem()?.getRef() != null) {
259+
getRefName(schema.getItem())
260+
} else {
261+
schema?.getItem()?.getType()
262+
}
263+
258264
return SchemaInfo(
259265
path = path,
260-
name = schema?.getItem()?.getRef() ?: schema?.getItem()?.getType()!!,
266+
name = name!!,
261267
schema = schema?.getItem(),
262268
resolver = resolver
263269
)
264-
265270
}
266271

267272
override fun isPrimitive(): Boolean {

0 commit comments

Comments
 (0)