Skip to content

Commit 69e315f

Browse files
committed
flip export props
1 parent 467dbbb commit 69e315f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/compass-data-modeling/src/services/export-diagram.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ describe('export-diagram', function () {
1010
const expectedCollections = Object.fromEntries(
1111
FlightModel.collections
1212
// eslint-disable-next-line @typescript-eslint/no-unused-vars
13-
.map(({ displayPosition, indexes, ...rest }) => [rest.ns, rest])
13+
.map(({ ns, jsonSchema, ...rest }) => [ns, { ns, jsonSchema }])
1414
);
1515
expect(json.collections).to.deep.equal(expectedCollections);
1616

packages/compass-data-modeling/src/services/export-diagram.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export function getExportJsonFromModel({
2424
collections: Object.fromEntries(
2525
collections.map((collection) => {
2626
// eslint-disable-next-line @typescript-eslint/no-unused-vars
27-
const { displayPosition, indexes, ...restOfTheCollection } = collection;
28-
return [collection.ns, restOfTheCollection];
27+
const { ns, jsonSchema, ...ignoredProps } = collection;
28+
return [ns, { ns, jsonSchema }];
2929
})
3030
),
3131
relationships,

0 commit comments

Comments
 (0)