Skip to content

Commit

Permalink
fix: update json-schema (#22262)
Browse files Browse the repository at this point in the history
  • Loading branch information
viceice committed May 17, 2023
1 parent 3fccfbe commit 1c13cf4
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions tools/docs/schema.ts
Expand Up @@ -49,7 +49,12 @@ function createSingleConfig(option: RenovateOptions): Record<string, unknown> {
if (hasKey('format', option) && option.format) {
temp.format = option.format;
}
if (option.allowedValues) {
if (option.name === 'versioning') {
temp.oneOf = [
{ enum: option.allowedValues },
{ type: 'string', pattern: '^regex:' },
];
} else if (option.allowedValues) {
temp.enum = option.allowedValues;
}
}
Expand Down Expand Up @@ -83,7 +88,13 @@ function addChildrenArrayInParents(): void {
allOf: [
{
type: 'object',
properties: {},
properties: {
description: {
type: 'string',
description:
'A custom description for this configuration object',
},
},
},
],
};
Expand Down

0 comments on commit 1c13cf4

Please sign in to comment.