Skip to content

Commit

Permalink
fix: add maximum to reffed bloks in storyblok
Browse files Browse the repository at this point in the history
  • Loading branch information
julrich committed Oct 24, 2024
1 parent e8ffdee commit 5edfbac
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@kickstartds/jsonschema2storyblok",
"comment": "add maximum to reffed bloks entries",
"type": "patch"
}
],
"packageName": "@kickstartds/jsonschema2storyblok"
}
4 changes: 3 additions & 1 deletion tools/jsonschema2storyblok/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,9 @@ function processRef({
type: 'bloks',
restrict_type: '',
restrict_components: true,
component_whitelist: [blokName]
component_whitelist: [blokName],
maximum: 1,
minimum: 0
};

const blok: IStoryblokBlock = {
Expand Down

0 comments on commit 5edfbac

Please sign in to comment.