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

Commit eb64b16

Browse files
committed
1 parent bfb03d1 commit eb64b16

3 files changed

Lines changed: 7 additions & 8 deletions

File tree

src/main/kotlin/io/openapiprocessor/core/converter/DataTypeConverter.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class DataTypeConverter(
155155
}
156156

157157
private fun createObjectDataType(schemaInfo: SchemaInfo, dataTypes: DataTypes): DataType {
158-
val properties = LinkedHashMap<String, DataType>()
158+
val properties = LinkedHashMap<String, PropertyDataType>()
159159
schemaInfo.eachProperty { propName: String, propSchemaInfo: SchemaInfo ->
160160
var propDataType = convert(propSchemaInfo, dataTypes)
161161

src/main/kotlin/io/openapiprocessor/core/model/datatypes/ObjectDataType.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ open class ObjectDataType(
1414
private val name: DataTypeName,
1515
private val pkg: String,
1616
/** linked map to preserve order */
17-
private val properties: LinkedHashMap<String, DataType> = linkedMapOf(),
17+
private val properties: LinkedHashMap<String, PropertyDataType> = linkedMapOf(),
1818
override val constraints: DataTypeConstraints? = null,
1919
override val deprecated: Boolean = false,
2020
override val documentation: Documentation? = null
@@ -44,15 +44,15 @@ open class ObjectDataType(
4444
.toSet()
4545
}
4646

47-
fun addObjectProperty(name: String, type: DataType) {
47+
fun addObjectProperty(name: String, type: PropertyDataType) {
4848
properties[name] = type
4949
}
5050

51-
fun getObjectProperty(name: String): DataType {
51+
fun getObjectProperty(name: String): PropertyDataType {
5252
return properties[name]!!
5353
}
5454

55-
fun getProperties(): Map<String, DataType> {
55+
fun getProperties(): Map<String, PropertyDataType> {
5656
return properties
5757
}
5858

src/test/kotlin/io/openapiprocessor/core/support/datatypes/ObjectDataType.kt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@
66
package io.openapiprocessor.core.support.datatypes
77

88
import io.openapiprocessor.core.model.Documentation
9-
import io.openapiprocessor.core.model.datatypes.DataType
10-
import io.openapiprocessor.core.model.datatypes.DataTypeConstraints
9+
import io.openapiprocessor.core.model.datatypes.*
1110
import io.openapiprocessor.core.model.datatypes.DataTypeName
1211
import io.openapiprocessor.core.model.datatypes.ObjectDataType
1312

@@ -17,7 +16,7 @@ import io.openapiprocessor.core.model.datatypes.ObjectDataType
1716
class ObjectDataType(
1817
nameId: String,
1918
pkg: String,
20-
properties: LinkedHashMap<String, DataType> = linkedMapOf(),
19+
properties: LinkedHashMap<String, PropertyDataType> = linkedMapOf(),
2120
constraints: DataTypeConstraints? = null,
2221
deprecated: Boolean = false,
2322
documentation: Documentation? = null

0 commit comments

Comments
 (0)