Skip to content

Commit a53d4d4

Browse files
committed
fixed wrong Schema resolution in TArray and TObject
1 parent c8a1b3f commit a53d4d4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/main/java/org/dynapi/openapispec/core/schema/TArray.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ protected JSONObject finalized() {
7272
finalizedItems = types.get(0).finalized();
7373
} else {
7474
finalizedItems = new JSONObject()
75-
.put("oneOf", new JSONArray(types.stream().map(Schema::finalized).toList()));
75+
.put("oneOf", new JSONArray(types.stream().map(Schema::getOpenApiSpec).toList()));
7676
}
7777

7878
return new JSONObject()

src/main/java/org/dynapi/openapispec/core/schema/TObject.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected JSONObject finalized() {
7171

7272
Map<String, JSONObject> finalizedProperties = properties.entrySet()
7373
.stream()
74-
.collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().finalized()));
74+
.collect(Collectors.toMap(Map.Entry::getKey, e -> e.getValue().getOpenApiSpec()));
7575

7676
return new JSONObject()
7777
.put("type", "object")

0 commit comments

Comments
 (0)