Skip to content

Commit

Permalink
chore: has_consistency_check fix
Browse files Browse the repository at this point in the history
  • Loading branch information
k0stik committed Nov 27, 2024
1 parent 9dc1f51 commit 5febbc0
Show file tree
Hide file tree
Showing 5 changed files with 88 additions and 52 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,48 +4,6 @@
"title": "has consistency check has metadata named defaultable in-memory entity schema",
"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.",
"consistencyChecks": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-07/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": {
"type": "string",
"enum": [
"default",
"atomsTooClose",
"atomsOverlap"
],
"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"
]
}
},
"properties": {
"_id": {
"description": "entity identity",
Expand Down Expand Up @@ -74,6 +32,48 @@
},
"metadata": {
"type": "object"
},
"consistencyChecks": {
"type": "array",
"items": {
"$schema": "http://json-schema.org/draft-07/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.",
"required": [
"key",
"name",
"severity",
"message"
],
"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": {
"type": "string",
"enum": [
"default",
"atomsTooClose",
"atomsOverlap"
],
"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."
}
}
}
}
}
}
16 changes: 8 additions & 8 deletions dist/js/schema/system/has_consistency_check.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
"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.",
"required": [
"key",
"name",
"severity",
"message"
],
"properties": {
"key": {
"type": "string",
Expand All @@ -38,14 +44,8 @@
"type": "string",
"description": "Message generated by the consistency check describing the problem."
}
},
"required": [
"key",
"name",
"severity",
"message"
]
}
}
}
}
}
}
2 changes: 1 addition & 1 deletion dist/js/schemas.json

Large diffs are not rendered by default.

36 changes: 36 additions & 0 deletions dist/js/types.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2898,6 +2898,24 @@ export interface HasConsistencyCheckHasMetadataNamedDefaultableInMemoryEntitySch
*/
isDefault?: boolean;
metadata?: {};
consistencyChecks?: {
/**
* Key of the property of the entity on which the consistency check is performed in Mongo dot notation, e.g. 'basis.coordinates.1'
*/
key: string;
/**
* Name of the consistency check that is performed, which is listed in an enum.
*/
name: "default" | "atomsTooClose" | "atomsOverlap";
/**
* Severity level of the problem, which is used in UI to differentiate.
*/
severity: "info" | "warning" | "error";
/**
* Message generated by the consistency check describing the problem.
*/
message: string;
}[];
}
/** Schema dist/js/schema/in_memory_entity/named.json */
export interface NamedInMemoryEntitySchema {
Expand Down Expand Up @@ -22042,6 +22060,24 @@ export interface FileSourceSchema {
* The output of consistency checks performed on data adhering to JSON schema, but inconsistent with scientific or logical rules, to show problems in UI.
*/
export interface HasConsistencyCheckSchema {
consistencyChecks?: {
/**
* Key of the property of the entity on which the consistency check is performed in Mongo dot notation, e.g. 'basis.coordinates.1'
*/
key: string;
/**
* Name of the consistency check that is performed, which is listed in an enum.
*/
name: "default" | "atomsTooClose" | "atomsOverlap";
/**
* Severity level of the problem, which is used in UI to differentiate.
*/
severity: "info" | "warning" | "error";
/**
* Message generated by the consistency check describing the problem.
*/
message: string;
}[];
}
/** Schema dist/js/schema/system/history.json */
export interface HistorySchema {
Expand Down
2 changes: 1 addition & 1 deletion src/py/mat3ra/esse/data/schemas.py

Large diffs are not rendered by default.

0 comments on commit 5febbc0

Please sign in to comment.