-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,6 @@ install( | |
config.yaml | ||
manifest.yaml | ||
type.yaml | ||
error.yaml | ||
DESTINATION "${CMAKE_INSTALL_DATADIR}/everest/schemas" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
$schema: http://json-schema.org/draft-07/schema# | ||
description: Json schema for EVerest error definition files | ||
$defs: | ||
error_list_subschema: | ||
allOf: | ||
- $ref: http://json-schema.org/draft-07/schema# | ||
- type: object | ||
# require at least a type declaration | ||
required: | ||
- name | ||
- description | ||
properties: | ||
name: | ||
type: string | ||
minLength: 2 | ||
description: | ||
type: string | ||
minLength: 2 | ||
# allow all sorts of entries (should be a json schema!) | ||
additionalProperties: true | ||
type: object | ||
required: | ||
- description | ||
properties: | ||
description: | ||
type: string | ||
minLength: 2 | ||
errors: | ||
description: This describes a list of errors of this unit | ||
type: array | ||
patternProperties: | ||
# arbitrary type name | ||
^[a-zA-Z_][a-zA-Z0-9_.-]*$: | ||
description: json schema declaring the error | ||
$ref: '#/$defs/error_list_subschema' | ||
# don't allow arbitrary additional properties | ||
additionalProperties: false | ||
# add empty types if not already present | ||
default: {} | ||
additionalProperties: false |