Skip to content

Commit ed2441f

Browse files
committed
rename expanded and wrap
1 parent a16adca commit ed2441f

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

packages/compass-schema/src/components/export-schema-modal.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ type SupportedFormat = Exclude<SchemaFormat, 'legacyJSON'>;
7474
const exportSchemaFormatOptions: SupportedFormat[] = [
7575
'standardJSON',
7676
'mongoDBJSON',
77-
'extendedJSON',
77+
'expandedJSON',
7878
];
7979

8080
const exportSchemaFormatOptionDetails: Record<
@@ -103,7 +103,7 @@ const exportSchemaFormatOptionDetails: Record<
103103
</div>
104104
),
105105
},
106-
extendedJSON: {
106+
expandedJSON: {
107107
title: 'Expanded',
108108
description: (
109109
<div>

packages/compass-schema/src/stores/schema-export-reducer.ts

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import type { ConnectionInfoRef } from '@mongodb-js/compass-connections/provider
1818
export type SchemaFormat =
1919
| 'standardJSON'
2020
| 'mongoDBJSON'
21-
| 'extendedJSON'
21+
| 'expandedJSON'
2222
| 'legacyJSON';
2323
export type ExportStatus = 'inprogress' | 'complete' | 'error';
2424
export type SchemaExportState = {
@@ -134,7 +134,7 @@ async function getSchemaByFormat({
134134
}): Promise<string> {
135135
let schema:
136136
| StandardJSONSchema
137-
| MongoDBJSONSchema
137+
| { $jsonSchema: MongoDBJSONSchema }
138138
| ExpandedJSONSchema
139139
| InternalSchema;
140140
switch (exportFormat) {
@@ -144,11 +144,13 @@ async function getSchemaByFormat({
144144
});
145145
break;
146146
case 'mongoDBJSON':
147-
schema = await schemaAccessor.getMongoDBJsonSchema({
148-
signal,
149-
});
147+
schema = {
148+
$jsonSchema: await schemaAccessor.getMongoDBJsonSchema({
149+
signal,
150+
}),
151+
};
150152
break;
151-
case 'extendedJSON':
153+
case 'expandedJSON':
152154
schema = await schemaAccessor.getExpandedJSONSchema({
153155
signal,
154156
});

0 commit comments

Comments
 (0)