From bb05deca33f1042bb5706eae1b85bc00a5fc1d14 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 27 Jun 2022 23:12:31 +0200 Subject: [PATCH] [netinstall] Repair schema IDs The schema is considered invalid by **some** versions of configvalidator (or rather, the underlying jsonschema): ``` 128: '#definitions/groups' does not match '^[^#]*#?$' 128: 128: Failed validating 'pattern' in metaschema['properties']['definitions']['additionalProperties']['$dynamicRef']['allOf'][0]['properties']['$id']: 128: {'$comment': 'Non-empty fragments not allowed.', 128: '$ref': '#/$defs/uriReferenceString', 128: 'pattern': '^[^#]*#?$'} ``` Remove the `#` from the IDs. --- src/modules/netinstall/netinstall.schema.yaml | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/modules/netinstall/netinstall.schema.yaml b/src/modules/netinstall/netinstall.schema.yaml index 05ab4cd08..3ec63daed 100644 --- a/src/modules/netinstall/netinstall.schema.yaml +++ b/src/modules/netinstall/netinstall.schema.yaml @@ -6,7 +6,7 @@ $schema: https://json-schema.org/draft-07/schema# $id: https://calamares.io/schemas/netinstall definitions: package: - $id: '#definitions/package' + $id: 'definitions/package' oneOf: - type: string @@ -20,7 +20,7 @@ definitions: name: { type: string } description: { type: string } group: - $id: '#definitions/group' + $id: 'definitions/group' type: object description: Longer discussion in `netinstall.conf` file under 'Groups Format' properties: @@ -28,7 +28,7 @@ definitions: description: { type: string } packages: type: array - items: { $ref: '#definitions/package' } + items: { $ref: 'definitions/package' } hidden: { type: boolean, default: false } selected: { type: boolean } critical: { type: boolean, default: false } @@ -36,7 +36,7 @@ definitions: expanded: { type: boolean } subgroups: type: array - items: { $ref: '#definitions/group' } + items: { $ref: 'definitions/group' } pre-install: type: string description: an optional command to run within the new system before the group's @@ -56,9 +56,9 @@ definitions: required: [name, description, packages] # bottom-most (sub)group requires some package (otherwise, why bother?) # This should validate `netinstall.yaml` also. groups: - $id: '#definitions/groups' + $id: 'definitions/groups' type: array - items: { $ref: '#definitions/group' } + items: { $ref: 'definitions/group' } oneOf: - # netinstall.conf @@ -74,16 +74,16 @@ oneOf: properties: sidebar: { type: string } title: { type: string } - groups: { $ref: '#definitions/groups' } + 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' } + groups: { $ref: 'definitions/groups' } required: [ groups ] - + - # Groups file bare - { $ref: '#definitions/groups' } + { $ref: 'definitions/groups' }