Skip to content

Commit cc64f06

Browse files
Merge pull request #831 from SAHU-01/schemas_updated
[Chore]: Schemas updated
2 parents ba7a767 + 7f7aa9e commit cc64f06

File tree

1 file changed

+58
-14
lines changed

1 file changed

+58
-14
lines changed

src/schemas/importDesign/schema.tsx

+58-14
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,7 @@ const importDesignSchema = {
2222
if: {
2323
properties: {
2424
designType: {
25-
not: {
26-
const: 'Helm Chart'
27-
}
25+
const: 'Helm Chart'
2826
}
2927
}
3028
},
@@ -36,7 +34,7 @@ const importDesignSchema = {
3634
default: 'URL Import',
3735
'x-rjsf-grid-area': '12',
3836
description:
39-
"Choose the method you prefer to upload your design file. Select 'File Upload' if you have the file on your local system, or 'URL Import' if you have the file hosted online."
37+
"Choose the method you prefer to upload your Helm Chart design file. Select 'File Upload' if you have the file on your local system, or 'URL Import' if you have the file hosted online."
4038
}
4139
},
4240
allOf: [
@@ -53,7 +51,7 @@ const importDesignSchema = {
5351
file: {
5452
type: 'string',
5553
format: 'file',
56-
description: 'Browse the design file from your file system',
54+
description: 'Browse the Helm Chart file from your file system',
5755
'x-rjsf-grid-area': '12'
5856
}
5957
},
@@ -75,7 +73,7 @@ const importDesignSchema = {
7573
format: 'uri',
7674
title: 'URL',
7775
description:
78-
'Provide the URL of the design file you want to import. This should be a direct URL to the file, for example: https://raw.github.com/your-design-file.yaml',
76+
'Provide the URL of the Helm Chart design file you want to import. This should be a direct URL to the file, for example: https://raw.github.com/your-design-file.yaml',
7977
'x-rjsf-grid-area': '12'
8078
}
8179
},
@@ -90,22 +88,68 @@ const importDesignSchema = {
9088
if: {
9189
properties: {
9290
designType: {
93-
const: 'Helm Chart'
91+
not: {
92+
const: 'Helm Chart'
93+
}
9494
}
9595
}
9696
},
9797
then: {
9898
properties: {
99-
url: {
100-
type: 'string',
101-
format: 'uri',
102-
title: 'URL',
99+
uploadType: {
100+
title: 'Upload method',
101+
enum: ['File Upload', 'URL Import'],
102+
default: 'URL Import',
103+
'x-rjsf-grid-area': '12',
103104
description:
104-
'Provide the URL of the design file you want to import. This should be a direct URL to the file, for example: https://raw.github.com/your-design-file.yaml',
105-
'x-rjsf-grid-area': '12'
105+
"Choose the method you prefer to upload your design file. Select 'File Upload' if you have the file on your local system, or 'URL Import' if you have the file hosted online."
106106
}
107107
},
108-
required: ['url']
108+
allOf: [
109+
{
110+
if: {
111+
properties: {
112+
uploadType: {
113+
const: 'File Upload'
114+
}
115+
}
116+
},
117+
then: {
118+
properties: {
119+
file: {
120+
type: 'string',
121+
format: 'file',
122+
description: 'Browse the design file from your file system',
123+
'x-rjsf-grid-area': '12'
124+
}
125+
},
126+
required: ['file']
127+
}
128+
},
129+
{
130+
if: {
131+
properties: {
132+
uploadType: {
133+
const: 'URL Import'
134+
}
135+
}
136+
},
137+
then: {
138+
properties: {
139+
url: {
140+
type: 'string',
141+
format: 'uri',
142+
title: 'URL',
143+
description:
144+
'Provide the URL of the design file you want to import. This should be a direct URL to the file, for example: https://raw.github.com/your-design-file.yaml',
145+
'x-rjsf-grid-area': '12'
146+
}
147+
},
148+
required: ['url']
149+
}
150+
}
151+
],
152+
required: ['uploadType']
109153
}
110154
},
111155
{

0 commit comments

Comments
 (0)