Skip to content

Commit b13582f

Browse files
committed
feat: update schema for the import model
Signed-off-by: amitamrutiya <[email protected]>
1 parent 9b212ae commit b13582f

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

src/schemas/importModel/schema.tsx

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
const importModelSchema = {
22
type: 'object',
3+
required: ['uploadType'],
34
properties: {
45
uploadType: {
6+
type: 'string',
57
title: 'Upload method',
6-
enum: ['File Import', 'URL Import'],
8+
enum: ['File Import', 'URL Import', 'CSV Import'],
9+
enumDescriptions: [
10+
'Upload a model file (.tar, .tar.gz, .tgz) from your local system',
11+
'Import a model file using a direct URL to the source',
12+
'Upload separate CSV files for model definitions, components, and their relationships'
13+
],
714
default: 'Select the Upload Method',
815
'x-rjsf-grid-area': '12',
916
description:
10-
"Choose the method you prefer to upload your model file. Select 'File Upload' if you have the file on your local system or 'URL Import' if you have the file hosted online."
17+
"Choose the method you prefer to upload your model file. Select 'File Import' or 'CSV Import' if you have the file on your local system or 'URL Import' if you have the file hosted online."
1118
}
1219
},
1320
allOf: [
@@ -51,11 +58,11 @@ const importModelSchema = {
5158
'x-rjsf-grid-area': '12',
5259
disabled: true
5360
}
54-
}
61+
},
62+
required: ['url']
5563
}
5664
}
57-
],
58-
required: ['uploadType']
65+
]
5966
};
6067

6168
export default importModelSchema;

src/schemas/importModel/uiSchema.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const importModelUiSchema = {
22
uploadType: {
33
'ui:widget': 'radio'
44
},
5-
'ui:order': ['uploadType', 'file', 'url']
5+
'ui:order': ['uploadType', 'file', 'url', 'csv']
66
};
77

88
export default importModelUiSchema;

0 commit comments

Comments
 (0)