Skip to content
Snippets Groups Projects
Unverified Commit 68e559cf authored by Michael Kriese's avatar Michael Kriese Committed by GitHub
Browse files

fix: allow strings in json schema (#8524)

parent 83a511a0
No related branches found
No related tags found
No related merge requests found
......@@ -34,6 +34,12 @@ function createSingleConfig(option) {
temp.items.enum = option.allowedValues;
}
}
if (option.subType == 'string' && option.allowString === true) {
const items = temp.items;
delete temp.items;
delete temp.type;
temp.oneOf = [{ type: 'array', items }, { ...items }];
}
} else {
if (option.format) {
temp.format = option.format;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment