From cd474949f49734dbec07847185808da3240e71fe Mon Sep 17 00:00:00 2001 From: Jim Gough Date: Wed, 3 Apr 2024 10:35:32 +0100 Subject: [PATCH] Copy over to April version of schema --- calm/draft/2024-04/meta/calm.json | 21 +++ calm/draft/2024-04/meta/core.json | 228 ++++++++++++++++++++++++++++++ 2 files changed, 249 insertions(+) create mode 100644 calm/draft/2024-04/meta/calm.json create mode 100644 calm/draft/2024-04/meta/core.json diff --git a/calm/draft/2024-04/meta/calm.json b/calm/draft/2024-04/meta/calm.json new file mode 100644 index 00000000..7d7ac56d --- /dev/null +++ b/calm/draft/2024-04/meta/calm.json @@ -0,0 +1,21 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/finos-labs/architecture-as-code/main/calm/draft/2024-04/meta/calm.json", + + "$vocabulary": { + "https://json-schema.org/draft/2020-12/vocab/core": true, + "https://json-schema.org/draft/2020-12/vocab/applicator": true, + "https://json-schema.org/draft/2020-12/vocab/validation": true, + "https://json-schema.org/draft/2020-12/vocab/meta-data": true, + "https://json-schema.org/draft/2020-12/vocab/format-annotation": true, + "https://json-schema.org/draft/2020-12/vocab/content": true, + "https://raw.githubusercontent.com/finos-labs/architecture-as-code/main/calm/draft/2024-04/meta/core.json": true + }, + "$dynamicAnchor": "meta", + + "title": "Common Architecture Language Model (CALM) Schema", + "allOf": [ + {"$ref": "https://json-schema.org/draft/2020-12/schema"}, + {"$ref": "https://raw.githubusercontent.com/finos-labs/architecture-as-code/main/calm/draft/2024-04/meta/core.json"} + ] +} diff --git a/calm/draft/2024-04/meta/core.json b/calm/draft/2024-04/meta/core.json new file mode 100644 index 00000000..1bade15e --- /dev/null +++ b/calm/draft/2024-04/meta/core.json @@ -0,0 +1,228 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://raw.githubusercontent.com/finos-labs/architecture-as-code/main/calm/draft/2024-04/meta/core.json", + "title": "Common Architecture Language Model (CALM) Vocab", + "properties": { + "nodes": { + "type": "array", + "items": { + "$ref": "#/defs/node" + } + }, + "relationships": { + "type": "array", + "items": { + "$ref": "#/defs/relationship" + } + } + }, + "defs": { + "node": { + "type": "object", + "properties": { + "unique-id": { + "type": "string" + }, + "node-type": { + "$ref": "#/defs/node-type-definition" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + }, + "data-classification": { + "$ref": "#/defs/data-classification" + }, + "run-as": { + "type": "string" + }, + "instance": { + "type": "string" + } + }, + "required": [ + "unique-id", + "node-type", + "name", + "description" + ], + "additionalProperties": true + }, + "relationship": { + "type": "object", + "properties": { + "unique-id": { + "type": "string" + }, + "description": { + "type": "string" + }, + "relationship-type": { + "type": "object", + "properties": { + "interacts": { + "$ref": "#/defs/interacts-type" + }, + "connects": { + "$ref": "#/defs/connects-type" + }, + "deployed-in": { + "$ref": "#/defs/deployed-in-type" + }, + "composed-of": { + "$ref": "#/defs/composed-of-type" + } + }, + "oneOf": [ + { + "required": [ + "deployed-in" + ] + }, + { + "required": [ + "composed-of" + ] + }, + { + "required": [ + "interacts" + ] + }, + { + "required": [ + "connects" + ] + } + ] + }, + "protocol": { + "$ref": "#/defs/protocol" + }, + "authentication": { + "$ref": "#/defs/authentication" + } + }, + "required": [ + "unique-id", + "relationship-type" + ], + "additionalProperties": true + }, + "data-classification": { + "enum": [ + "Public", + "Confidential", + "Highly Restricted", + "MNPI", + "PII" + ] + }, + "protocol": { + "enum": [ + "HTTP", + "HTTPS", + "FTP", + "SFTP", + "JDBC", + "WebSocket", + "SocketIO", + "LDAP", + "AMQP", + "TLS", + "mTLS", + "TCP" + ] + }, + "authentication": { + "enum": [ + "Basic", + "OAuth2", + "Kerberos", + "SPNEGO", + "Certificate" + ] + }, + "node-type-definition": { + "enum": [ + "actor", + "system", + "service", + "database", + "internal-network", + "ldap", + "webclient" + ] + }, + "interacts-type": { + "type": "object", + "required": [ + "actor", + "nodes" + ], + "properties": { + "actor": { + "type": "string" + }, + "nodes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + } + }, + "connects-type": { + "type": "object", + "required": [ + "source", + "destination" + ], + "properties": { + "source": { + "type": "string" + }, + "destination": { + "type": "string" + } + } + }, + "deployed-in-type": { + "type": "object", + "properties": { + "container": { + "type": "string" + }, + "nodes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + } + }, + "composed-of-type": { + "required": [ + "container", + "nodes" + ], + "type": "object", + "properties": { + "container": { + "type": "string" + }, + "nodes": { + "type": "array", + "minItems": 1, + "items": { + "type": "string" + } + } + } + } + } +}