[netinstall] Schema validates also groups file
This commit is contained in:
parent
f8385d2cb8
commit
f0aa515c8b
@ -1,4 +1,5 @@
|
|||||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
# 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
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
---
|
---
|
||||||
$schema: https://json-schema.org/draft-07/schema#
|
$schema: https://json-schema.org/draft-07/schema#
|
||||||
@ -59,8 +60,11 @@ definitions:
|
|||||||
type: array
|
type: array
|
||||||
items: { $ref: '#definitions/group' }
|
items: { $ref: '#definitions/group' }
|
||||||
|
|
||||||
additionalProperties: false
|
oneOf:
|
||||||
|
- # netinstall.conf
|
||||||
type: object
|
type: object
|
||||||
|
description: netinstall.conf schema
|
||||||
|
additionalProperties: false
|
||||||
properties:
|
properties:
|
||||||
groupsUrl: { type: string }
|
groupsUrl: { type: string }
|
||||||
required: { type: boolean, default: false }
|
required: { type: boolean, default: false }
|
||||||
@ -70,5 +74,16 @@ properties:
|
|||||||
properties:
|
properties:
|
||||||
sidebar: { type: string }
|
sidebar: { type: string }
|
||||||
title: { type: string }
|
title: { type: string }
|
||||||
groups: { $ref: '#definitions/groups' } # DONE: the schema for groups
|
groups: { $ref: '#definitions/groups' }
|
||||||
required: [ groupsUrl ]
|
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…
Reference in New Issue
Block a user