Skip to content

Commit 8d1598f

Browse files
committed
Chnges made to pass the should-generate-JSON-schema-for-a-subdocument-property test
1 parent ede9ab5 commit 8d1598f

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

src/pods/toolbar/components/export-button/export-button.business.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,11 @@ export const getPropertyJsonSchema = (field: FieldVm): string => {
154154
export const getItemType = (field: FieldVm): string => {
155155
if (field.children && field.children.length > 0) {
156156
const properties = getPropertiesJsonSchema(field.children);
157-
158-
return `{ bsonType: "object", title: "${field.name}", required: [${getRequiredFields(field.children)}], properties: {${properties}} } `;
157+
158+
return `{ bsonType: "object", title: "${field.name}", properties: {${properties}} } `;
159+
160+
// Perhaps to be changed for this later.
161+
//return `{ bsonType: "object", title: "${field.name}", required: [${getRequiredFields(field.children)}], properties: {${properties}} } `;
159162
}
160163
return `{ bsonType: "${field.type}" }`;
161164
}

0 commit comments

Comments
 (0)