[netinstall] Schema validates also groups file

main
benne-dee 4 years ago committed by GitHub
parent f8385d2cb8
commit f0aa515c8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,4 +1,5 @@
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
# SPDX-FileContributor: benne-dee ( worked on groups schema )
# SPDX-License-Identifier: GPL-3.0-or-later
---
$schema: https://json-schema.org/draft-07/schema#
@ -59,16 +60,30 @@ definitions:
type: array
items: { $ref: '#definitions/group' }
additionalProperties: false
type: object
properties:
groupsUrl: { type: string }
required: { type: boolean, default: false }
label: # Translatable labels
type: object
additionalProperties: true
properties:
sidebar: { type: string }
title: { type: string }
groups: { $ref: '#definitions/groups' } # DONE: the schema for groups
required: [ groupsUrl ]
oneOf:
- # netinstall.conf
type: object
description: netinstall.conf schema
additionalProperties: false
properties:
groupsUrl: { type: string }
required: { type: boolean, default: false }
label: # Translatable labels
type: object
additionalProperties: true
properties:
sidebar: { type: string }
title: { type: string }
groups: { $ref: '#definitions/groups' }
required: [ groupsUrl ]
- # Groups file with top level *groups* key
type: object
description: Groups file with top level *groups* key
additionalProperties: false
properties:
groups: { $ref: '#definitions/groups' }
required: [ groups ]
- # Groups file bare
{ $ref: '#definitions/groups' }

Loading…
Cancel
Save