Skip to content

Commit

Permalink
Merge pull request #264 from Exabyte-io/feature/SOF-6588
Browse files Browse the repository at this point in the history
Feature/SOF-6588 feat: add ConsistencyChecks schema
  • Loading branch information
VsevolodX authored Nov 1, 2023
2 parents 329e344 + 4c5dcce commit ae03944
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 0 deletions.
6 changes: 6 additions & 0 deletions example/system/consistency_check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"key": "basis.coordinates.0",
"name": "atomsTooClose",
"severity": "warning",
"message": "Atom 0 is too close to atom X"
}
6 changes: 6 additions & 0 deletions schema/in_memory_entity/base.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,12 @@
},
"systemName": {
"type": "string"
},
"consistencyChecks": {
"type": "array",
"items": {
"$ref": "../system/consistency_check.json"
}
}
}
}
38 changes: 38 additions & 0 deletions schema/system/consistency_check.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
{
"$id": "system/consistency-check",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "consistency check",
"type": "object",
"description": "The output of consistency checks performed on data adhering to JSON schema, but inconsistent with scientific or logical rules, to show problems in UI.",
"properties": {
"key": {
"type": "string",
"description": "Key of the property of the entity on which the consistency check is performed in Mongo dot notation, e.g. 'basis.coordinates.1'"
},
"name": {
"enum": [
"default",
"atomsTooClose"
],
"description": "Name of the consistency check that is performed, which is listed in an enum."
},
"severity": {
"enum": [
"info",
"warning",
"error"
],
"description": "Severity level of the problem, which is used in UI to differentiate."
},
"message": {
"type": "string",
"description": "Message generated by the consistency check describing the problem."
}
},
"required": [
"key",
"name",
"severity",
"message"
]
}

0 comments on commit ae03944

Please sign in to comment.