Define schema for groups in netinstall.schema.yaml
This commit is contained in:
parent
c1064c5e08
commit
13181a52ee
@ -1,8 +1,64 @@
|
|||||||
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
# SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
|
||||||
# SPDX-License-Identifier: GPL-3.0-or-later
|
# SPDX-License-Identifier: GPL-3.0-or-later
|
||||||
---
|
---
|
||||||
$schema: https://json-schema.org/schema#
|
$schema: http://json-schema.org/draft-07/schema#
|
||||||
$id: https://calamares.io/schemas/netinstall
|
$id: https://calamares.io/schemas/netinstall
|
||||||
|
definitions:
|
||||||
|
package:
|
||||||
|
$id: '#definitions/package'
|
||||||
|
oneOf:
|
||||||
|
-
|
||||||
|
type: string
|
||||||
|
description: bare package - actual package name as passed to the package manager
|
||||||
|
(e.g. `qt5-creator-dev`).
|
||||||
|
-
|
||||||
|
type: object
|
||||||
|
description: rich package - one with a package-name (for the package-manager) and
|
||||||
|
a description (for the human).
|
||||||
|
properties:
|
||||||
|
name: { type: string }
|
||||||
|
description: { type: string }
|
||||||
|
group:
|
||||||
|
$id: '#definitions/group'
|
||||||
|
type: object
|
||||||
|
description: Longer discussion in `netinstall.conf` file under 'Groups Format'
|
||||||
|
properties:
|
||||||
|
name: { type: string }
|
||||||
|
description: { type: string }
|
||||||
|
packages:
|
||||||
|
type: array
|
||||||
|
items: { $ref: '#definitions/package' }
|
||||||
|
hidden: { type: boolean, default: false }
|
||||||
|
selected: { type: boolean }
|
||||||
|
critical: { type: boolean, default: false }
|
||||||
|
immutable: { type: boolean }
|
||||||
|
expanded: { type: boolean }
|
||||||
|
subgroups:
|
||||||
|
type: array
|
||||||
|
items: { $ref: '#definitions/group' }
|
||||||
|
pre-install:
|
||||||
|
type: string
|
||||||
|
description: an optional command to run within the new system before the group's
|
||||||
|
packages are installed. It will run before **each** package in the group
|
||||||
|
is installed.
|
||||||
|
post-install:
|
||||||
|
type: string
|
||||||
|
description: an optional command to run within the new system after the group's
|
||||||
|
packages are installed. It will run after **each** package in the group
|
||||||
|
is installed.
|
||||||
|
required: [name, description] # Always required, at any level in the subgroups hirearchy
|
||||||
|
if:
|
||||||
|
properties:
|
||||||
|
subgroups:
|
||||||
|
maxItems: 0
|
||||||
|
then:
|
||||||
|
required: [name, description, packages] # bottom-most (sub)group requires some package (otherwise, why bother?)
|
||||||
|
# This should validate `netinstall.yaml` also.
|
||||||
|
groups:
|
||||||
|
$id: '#definitions/groups'
|
||||||
|
type: array
|
||||||
|
items: { $ref: '#definitions/group' }
|
||||||
|
|
||||||
additionalProperties: false
|
additionalProperties: false
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@ -14,5 +70,5 @@ properties:
|
|||||||
properties:
|
properties:
|
||||||
sidebar: { type: string }
|
sidebar: { type: string }
|
||||||
title: { type: string }
|
title: { type: string }
|
||||||
groups: { type: array } # TODO: the schema for the whole groups file
|
groups: { $ref: '#definitions/groups' } # DONE: the schema for groups
|
||||||
required: [ groupsUrl ]
|
required: [ groupsUrl ]
|
||||||
|
Loading…
Reference in New Issue
Block a user