Skip to content

Commit

Permalink
Merge pull request #831 from SAHU-01/schemas_updated
Browse files Browse the repository at this point in the history
[Chore]: Schemas updated
  • Loading branch information
sudhanshutech authored Nov 29, 2024
2 parents ba7a767 + 7f7aa9e commit cc64f06
Showing 1 changed file with 58 additions and 14 deletions.
72 changes: 58 additions & 14 deletions src/schemas/importDesign/schema.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ const importDesignSchema = {
if: {
properties: {
designType: {
not: {
const: 'Helm Chart'
}
const: 'Helm Chart'
}
}
},
Expand All @@ -36,7 +34,7 @@ const importDesignSchema = {
default: 'URL Import',
'x-rjsf-grid-area': '12',
description:
"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."
"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."
}
},
allOf: [
Expand All @@ -53,7 +51,7 @@ const importDesignSchema = {
file: {
type: 'string',
format: 'file',
description: 'Browse the design file from your file system',
description: 'Browse the Helm Chart file from your file system',
'x-rjsf-grid-area': '12'
}
},
Expand All @@ -75,7 +73,7 @@ const importDesignSchema = {
format: 'uri',
title: 'URL',
description:
'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',
'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',
'x-rjsf-grid-area': '12'
}
},
Expand All @@ -90,22 +88,68 @@ const importDesignSchema = {
if: {
properties: {
designType: {
const: 'Helm Chart'
not: {
const: 'Helm Chart'
}
}
}
},
then: {
properties: {
url: {
type: 'string',
format: 'uri',
title: 'URL',
uploadType: {
title: 'Upload method',
enum: ['File Upload', 'URL Import'],
default: 'URL Import',
'x-rjsf-grid-area': '12',
description:
'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',
'x-rjsf-grid-area': '12'
"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."
}
},
required: ['url']
allOf: [
{
if: {
properties: {
uploadType: {
const: 'File Upload'
}
}
},
then: {
properties: {
file: {
type: 'string',
format: 'file',
description: 'Browse the design file from your file system',
'x-rjsf-grid-area': '12'
}
},
required: ['file']
}
},
{
if: {
properties: {
uploadType: {
const: 'URL Import'
}
}
},
then: {
properties: {
url: {
type: 'string',
format: 'uri',
title: 'URL',
description:
'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',
'x-rjsf-grid-area': '12'
}
},
required: ['url']
}
}
],
required: ['uploadType']
}
},
{
Expand Down

0 comments on commit cc64f06

Please sign in to comment.