Skip to content

Commit

Permalink
feature(stackbit): inlining almost done
Browse files Browse the repository at this point in the history
  • Loading branch information
julrich committed Jul 9, 2024
1 parent 6634439 commit 386d397
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@kickstartds/jsonschema-utils",
"comment": "add inlining cms flag to allowed keywords",
"type": "patch"
}
],
"packageName": "@kickstartds/jsonschema-utils"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"changes": [
{
"packageName": "@kickstartds/jsonschema2stackbit",
"comment": "fix inlining code",
"type": "patch"
}
],
"packageName": "@kickstartds/jsonschema2stackbit"
}
5 changes: 5 additions & 0 deletions tools/jsonschema-utils/src/helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ export function getSchemaRegistry({ support2019 = false }: { support2019?: boole
schemaType: 'string',
validate: () => true
});
ajv.addKeyword({
keyword: 'x-cms-group-inline',
schemaType: 'boolean',
validate: () => true
});

return ajv;
}
Expand Down
2 changes: 1 addition & 1 deletion tools/jsonschema2stackbit/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export function convert({
group: value.name
});
}
parent.splice(parent.indexOf(schema));
parent.splice(parent.indexOf(schema), 1);
}
}
},
Expand Down

0 comments on commit 386d397

Please sign in to comment.