Skip to content

Commit 2c344a8

Browse files
fix(validator): add FilterBlock to schema validators (#270)
* fix(validator): add FilterBlock to schema validators * fix(FilterBlock): fix schema
1 parent e684da0 commit 2c344a8

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

src/blocks/FilterBlock/schema.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const FilterItemProps = {
2929
type: 'string',
3030
},
3131
},
32-
card: {$ref: 'self#/definitions/card'},
32+
card: {$ref: 'self#/definitions/cards'},
3333
},
3434
};
3535

src/schema/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
CardLayoutBlock,
2525
ShareBlock,
2626
MapBlock,
27+
FilterBlock,
2728
} from './validators/blocks';
2829

2930
import {
@@ -84,6 +85,7 @@ export function generateDefaultSchema(config?: SchemaCustomConfig) {
8485
...CardLayoutBlock,
8586
...ContentLayoutBlock,
8687
...ShareBlock,
88+
...FilterBlock,
8789
};
8890

8991
const cardValidators = {
@@ -127,6 +129,7 @@ export function generateDefaultSchema(config?: SchemaCustomConfig) {
127129
'card-layout-block',
128130
'content-layout-block',
129131
'share-block',
132+
'filter-block',
130133
];
131134

132135
const constructorCardSchemaNames = [

src/schema/validators/blocks.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,4 @@ export * from '../../blocks/Icons/schema';
1919
export * from '../../blocks/CardLayout/schema';
2020
export * from '../../blocks/ContentLayout/schema';
2121
export * from '../../blocks/Share/schema';
22+
export * from '../../blocks/FilterBlock/schema';

0 commit comments

Comments
 (0)