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

Commit 907509c

Browse files
committed
#85, do not generate duplicate properties
1 parent 4ec9003 commit 907509c

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

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

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,8 @@ class AllOfObjectDataType(
5555
}
5656

5757
override fun forEach(action: (property: String, dataType: DataType) -> Unit) {
58-
items.filterIsInstance<ObjectDataType>()
59-
.forEach {
60-
it.forEach(action)
58+
properties.forEach {
59+
action(it.key, it.value)
6160
}
6261
}
6362

src/testInt/resources/tests/schema-composed-allof/inputs/openapi.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,7 @@ paths:
2121
properties:
2222
prop2:
2323
type: string
24+
- type: object
25+
properties:
26+
prop2:
27+
type: string

0 commit comments

Comments
 (0)