AbdulElahGwaith's picture
Upload folder using huggingface_hub
88df9e4 verified
const section = {
anyOf: [
{
type: 'array',
items: {
type: 'string',
lintable: true,
},
minItems: 1,
},
{
type: 'array',
minItems: 1,
items: {
type: 'object',
required: ['heading', 'notes'],
additionalProperties: false,
properties: {
heading: {
type: 'string',
lintable: true,
},
notes: {
type: 'array',
items: {
type: 'string',
lintable: true,
},
minItems: 1,
},
},
},
},
],
} as const
export default {
type: 'object',
required: ['date', 'sections'],
properties: {
intro: {
type: 'string',
lintable: true,
},
date: {
type: 'string',
format: 'date',
},
release_candidate: {
type: 'boolean',
default: false,
},
deprecated: {
type: 'boolean',
default: false,
},
sections: {
type: 'object',
minProperties: 1,
additionalProperties: false,
properties: [
'bugs',
'known_issues',
'features',
'changes',
'deprecations',
'security_fixes',
'backups',
'errata',
'closing_down',
'retired',
].reduce(
(prev: Record<string, typeof section>, curr: string) => ({ ...prev, [curr]: section }),
{},
),
},
},
} as const