Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: update json-schema #22262

Merged
merged 3 commits into from May 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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