Skip to content

Commit b97adc9

Browse files
committed
fix: update publish catalog item schema to use definitions from CatalogDataDefinitionV1Alpha1Schema
Signed-off-by: amitamrutiya <[email protected]>
1 parent 1239e59 commit b97adc9

File tree

1 file changed

+15
-27
lines changed

1 file changed

+15
-27
lines changed

src/schemas/publishCatalogItem/schema.tsx

Lines changed: 15 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { CatalogDataDefinitionV1Alpha1Schema } from '@layer5/schemas';
2+
13
/**
24
* Schema for publish catalog item modal;
35
* Can be use for publishing filters and designs
@@ -6,51 +8,37 @@ const publishCatalogItemSchema = {
68
type: 'object',
79
properties: {
810
compatibility: {
9-
type: 'array',
11+
type: CatalogDataDefinitionV1Alpha1Schema.properties.compatibility.type,
1012
title: 'Technology',
11-
items: {
12-
enum: ['kubernetes'],
13-
type: 'string'
14-
},
13+
items: CatalogDataDefinitionV1Alpha1Schema.properties.compatibility.items,
1514
uniqueItems: true,
1615
minItems: 1,
1716
description:
1817
'A list of technologies included in or implicated by this design; a list of relevant technology tags.',
1918
'x-rjsf-grid-area': 6
2019
},
2120
pattern_caveats: {
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.',
21+
type: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_caveats.type,
22+
title: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_caveats.title,
23+
description: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_caveats,
2624
format: 'textarea',
2725
'x-rjsf-grid-area': 12,
2826
'x-encode-in-uri': true
2927
},
3028
pattern_info: {
31-
type: 'string',
32-
title: 'Description',
33-
description: 'Purpose of the design along with its intended and unintended uses.',
29+
type: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_info.type,
30+
title: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_info.title,
31+
description: CatalogDataDefinitionV1Alpha1Schema.properties.pattern_info,
3432
format: 'textarea',
3533
'x-rjsf-grid-area': 12,
3634
'x-encode-in-uri': true
3735
},
3836
type: {
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.',
37+
type: CatalogDataDefinitionV1Alpha1Schema.properties.type.type,
38+
title: CatalogDataDefinitionV1Alpha1Schema.properties.type.title,
39+
enum: CatalogDataDefinitionV1Alpha1Schema.properties.type.enum,
40+
default: CatalogDataDefinitionV1Alpha1Schema.properties.type.default,
41+
description: CatalogDataDefinitionV1Alpha1Schema.properties.type.description,
5442
'x-rjsf-grid-area': 6
5543
}
5644
},

0 commit comments

Comments
 (0)