Skip to content

Commit b40dd13

Browse files
committed
feat: update layer5 schema package
Signed-off-by: Amit Amrutiya <[email protected]>
1 parent 2979048 commit b40dd13

File tree

3 files changed

+32
-22
lines changed

3 files changed

+32
-22
lines changed

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@
9999
"@emotion/react": "^11.11.3",
100100
"@emotion/styled": "^11.11.0",
101101
"@layer5/meshery-design-embed": "^0.4.0",
102-
"@layer5/schemas": "^0.0.6-6",
102+
"@layer5/schemas": "^0.0.6-8",
103103
"@mui/material": "^5.15.11",
104104
"@types/mui-datatables": "*",
105105
"billboard.js": "^3.14.3",

src/schemas/publishCatalogItem/schema.tsx

Lines changed: 27 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
import { CatalogDataDefinitionV1Alpha1OpenApiSchema } from '@layer5/schemas';
2-
3-
const CatalogDataDefinitionV1Alpha1Schema =
4-
CatalogDataDefinitionV1Alpha1OpenApiSchema.components.schemas.CatalogData;
51
/**
62
* Schema for publish catalog item modal;
73
* Can be use for publishing filters and designs
@@ -10,37 +6,51 @@ const publishCatalogItemSchema = {
106
type: 'object',
117
properties: {
128
compatibility: {
13-
type: CatalogDataDefinitionV1Alpha1Schema.properties.compatibility.type,
9+
type: 'array',
1410
title: 'Technology',
15-
items: CatalogDataDefinitionV1Alpha1Schema.properties.compatibility.items,
11+
items: {
12+
enum: ['kubernetes'],
13+
type: 'string'
14+
},
1615
uniqueItems: true,
1716
minItems: 1,
1817
description:
1918
'A list of technologies included in or implicated by this design; a list of relevant technology tags.',
2019
'x-rjsf-grid-area': 6
2120
},
2221
pattern_caveats: {
23-
type: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_caveats.type,
24-
title: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_caveats.title,
25-
description: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_caveats.description,
22+
type: 'string',
23+
title: 'Caveats and Considerations',
24+
description:
25+
'Specific stipulations to consider and known behaviors to be aware of when using this design.',
2626
format: 'textarea',
2727
'x-rjsf-grid-area': 12,
2828
'x-encode-in-uri': true
2929
},
3030
pattern_info: {
31-
type: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_info.type,
32-
title: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_info.title,
33-
description: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_info.description,
31+
type: 'string',
32+
title: 'Description',
33+
description: 'Purpose of the design along with its intended and unintended uses.',
3434
format: 'textarea',
3535
'x-rjsf-grid-area': 12,
3636
'x-encode-in-uri': true
3737
},
3838
type: {
39-
type: CatalogDataDefinitionV1Alpha1Schema.properties.type.type,
40-
title: CatalogDataDefinitionV1Alpha1Schema.properties.type.title,
41-
enum: CatalogDataDefinitionV1Alpha1Schema.properties.type.enum,
42-
default: CatalogDataDefinitionV1Alpha1Schema.properties.type.default,
43-
description: CatalogDataDefinitionV1Alpha1Schema.properties.type.description,
39+
type: 'string',
40+
title: 'Type',
41+
enum: [
42+
'Deployment',
43+
'Observability',
44+
'Resiliency',
45+
'Scaling',
46+
'Security',
47+
'Traffic-management',
48+
'Troubleshooting',
49+
'Workloads'
50+
],
51+
default: 'Deployment',
52+
description:
53+
'Categorization of the type of design or operational flow depicted in this design.',
4454
'x-rjsf-grid-area': 6
4555
}
4656
},

0 commit comments

Comments
 (0)