-
Notifications
You must be signed in to change notification settings - Fork 38
Open
Labels
Description
Description:
When exporting a schema that contains an array of objects with nested properties, only items: { bsonType: "object" } is exported. All nested property definitions inside the array items are missing from the export.
Steps to Reproduce:
- Load the "theaters" example schema (or any schema with arrays containing objects with nested properties)
- Verify the schema includes an array field with object items that have defined nested properties
- Export the schema
- Compare the exported code to the expected output
Current Output:
"location": { bsonType: "array", items: { bsonType: "object" } }Expected Output:
"location": {
bsonType: "array",
items: {
bsonType: "object",
properties: {
"address": {
bsonType: "object",
properties: {
"street1": { bsonType: "string" },
"city": { bsonType: "string" }
}
}
}
}
}Note:
Export works correctly for non-array objects. Nested properties are included when the field is a direct object type.