Skip to content

Commit e01ae0c

Browse files
committed
Copy the title field when creating the ArraySchema object in processNormalize31Spec()
1 parent dd06acc commit e01ae0c

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

modules/openapi-generator/src/main/java/org/openapitools/codegen/OpenAPINormalizer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ protected void normalizeProperties(Map<String, Schema> properties, Set<Schema> v
860860
}
861861
for (Map.Entry<String, Schema> propertiesEntry : properties.entrySet()) {
862862
Schema property = propertiesEntry.getValue();
863-
863+
864864
// remove x-internal if needed (same logic as normalizeComponentsSchemas)
865865
if (property.getExtensions() != null && getRule(REMOVE_X_INTERNAL)) {
866866
Object xInternalValue = property.getExtensions().get(X_INTERNAL);

modules/openapi-generator/src/test/resources/3_1/issue_18291.yaml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,15 @@ components:
6666
- type: integer
6767
maxItems: 3
6868
minItems: 3
69-
- type: array
69+
- type: array
70+
OneOfArrayWithTitle:
71+
oneOf:
72+
- title: dog_array
73+
type: array
74+
items:
75+
type: string
76+
- title: cat_object
77+
type: object
78+
properties:
79+
name:
80+
type: string

0 commit comments

Comments
 (0)