From 6b40f2ae3bcaede676beafe573b59d6a58a2a1fe Mon Sep 17 00:00:00 2001 From: Matthew Bain <66839492+rocketstack-matt@users.noreply.github.com> Date: Mon, 26 Oct 2026 21:17:58 +0000 Subject: [PATCH 1/3] fix(calm-hub): declare CALM 1.3 in the seed patterns The API Gateway, Conference Signup, Conference Secure Signup and Demo patterns referred to https://calm.finos.org/calm/schemas/2025-03/meta/, which never resolved. Each named 2025-03 interface is now interface-type with the same fields, and the secure signup pattern uses the 1.0 control keys. Refs #3240. --- calm-hub/mongo/init-mongo.js | 246 ++++++++++++++++++++++--------- calm-hub/nitrite/init-nitrite.sh | 244 +++++++++++++++++++++--------- 2 files changed, 345 insertions(+), 145 deletions(-) diff --git a/calm-hub/mongo/init-mongo.js b/calm-hub/mongo/init-mongo.js index 8b59514031..749c90827a 100644 --- a/calm-hub/mongo/init-mongo.js +++ b/calm-hub/mongo/init-mongo.js @@ -735,7 +735,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { versions: { "1.0.0": { - "$schema": "https://calm.finos.org/calm/schemas/2025-03/meta/calm.json", + "$schema": "https://calm.finos.org/release/1.3/meta/calm.json", "$id": "https://calm.finos.org/calm/namespaces/finos/patterns/1/versions/1.0.0", "title": "API Gateway Pattern", "type": "object", @@ -745,7 +745,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "minItems": 4, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "properties": { "well-known-endpoint": { "type": "string" @@ -767,12 +767,22 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "minItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/host-port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "api-gateway-ingress" + }, + "host": { + "type": "string" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "host", + "port" + ] } ] } @@ -783,7 +793,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "properties": { "description": { "const": "The API Consumer making an authenticated and authorized request" @@ -800,7 +810,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "properties": { "description": { "const": "The API Producer serving content" @@ -819,12 +829,22 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "minItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/host-port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "producer-ingress" + }, + "host": { + "type": "string" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "host", + "port" + ] } ] } @@ -834,7 +854,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "properties": { "description": { "const": "The Identity Provider used to verify the bearer token" @@ -857,7 +877,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "minItems": 4, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "properties": { "unique-id": { "const": "api-consumer-api-gateway" @@ -890,7 +910,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "properties": { "unique-id": { "const": "api-gateway-idp" @@ -916,7 +936,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "properties": { "unique-id": { "const": "api-gateway-api-producer" @@ -945,7 +965,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "properties": { "unique-id": { "const": "api-consumer-idp" @@ -992,7 +1012,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { versions: { "1.0.0": { - "$schema": "https://calm.finos.org/calm/schemas/2025-03/meta/calm.json", + "$schema": "https://calm.finos.org/release/1.3/meta/calm.json", "$id": "https://calm.finos.org/calm/namespaces/workshop/patterns/1/versions/1.0.0", "type": "object", "title": "Conference Signup Pattern", @@ -1004,7 +1024,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 5, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1025,19 +1045,25 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/url-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "conference-website-url" + }, + "url": { + "type": "string" } - } + }, + "required": [ + "url" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1058,19 +1084,29 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/host-port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "load-balancer-host-port" + }, + "host": { + "type": "string" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "host", + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1091,27 +1127,39 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 2, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/container-image-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "attendees-image" + }, + "image": { + "type": "string" } - } + }, + "required": [ + "image" + ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "attendees-port" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1132,27 +1180,39 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 2, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/container-image-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "database-image" + }, + "image": { + "type": "string" } - } + }, + "required": [ + "image" + ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "database-port" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1177,7 +1237,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 4, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -1207,7 +1267,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -1237,7 +1297,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -1267,7 +1327,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "properties": { "unique-id": { "const": "deployed-in-k8s-cluster" @@ -1309,7 +1369,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { versions: { "1.0.0": { - "$schema": "https://calm.finos.org/calm/schemas/2025-03/meta/calm.json", + "$schema": "https://calm.finos.org/release/1.3/meta/calm.json", "$id": "https://calm.finos.org/calm/namespaces/workshop/patterns/2/versions/1.0.0", "type": "object", "title": "Conference Secure Signup Pattern", @@ -1321,7 +1381,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 5, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1342,19 +1402,25 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/url-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "conference-website-url" + }, + "url": { + "type": "string" } - } + }, + "required": [ + "url" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1375,19 +1441,29 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/host-port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "load-balancer-host-port" + }, + "host": { + "type": "string" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "host", + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1408,27 +1484,39 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 2, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/container-image-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "attendees-image" + }, + "image": { + "type": "string" } - } + }, + "required": [ + "image" + ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "attendees-port" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1449,27 +1537,39 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 2, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/container-image-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "database-image" + }, + "image": { + "type": "string" } - } + }, + "required": [ + "image" + ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "database-port" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1485,7 +1585,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "const": "system" }, "controls": { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/control.json#/defs/controls", + "$ref": "https://calm.finos.org/release/1.3/meta/control.json#/defs/controls", "properties": { "security": { "type": "object", @@ -1499,14 +1599,14 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/control.json#/defs/control-detail", + "$ref": "https://calm.finos.org/release/1.3/meta/control.json#/defs/control-detail", "properties": { - "control-requirement-url": { + "requirement-url": { "const": "https://calm.finos.org/workshop/controls/micro-segmentation.requirement.json" } }, "required": [ - "control-config-url" + "config-url" ] } ] @@ -1524,7 +1624,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "minItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -1549,7 +1649,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { } }, "controls": { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/control.json#/defs/controls", + "$ref": "https://calm.finos.org/release/1.3/meta/control.json#/defs/controls", "properties": { "security": { "type": "object", @@ -1563,14 +1663,14 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/control.json#/defs/control-detail", + "$ref": "https://calm.finos.org/release/1.3/meta/control.json#/defs/control-detail", "properties": { - "control-requirement-url": { + "requirement-url": { "const": "https://calm.finos.org/workshop/controls/permitted-connection.requirement.json" } }, "required": [ - "control-config-url" + "config-url" ] } ] @@ -1585,7 +1685,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -1610,7 +1710,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { } }, "controls": { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/control.json#/defs/controls", + "$ref": "https://calm.finos.org/release/1.3/meta/control.json#/defs/controls", "properties": { "security": { "type": "object", @@ -1624,14 +1724,14 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/control.json#/defs/control-detail", + "$ref": "https://calm.finos.org/release/1.3/meta/control.json#/defs/control-detail", "properties": { - "control-requirement-url": { + "requirement-url": { "const": "https://calm.finos.org/workshop/controls/permitted-connection.requirement.json" } }, "required": [ - "control-config-url" + "config-url" ] } ] @@ -1646,7 +1746,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -1671,7 +1771,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { } }, "controls": { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/control.json#/defs/controls", + "$ref": "https://calm.finos.org/release/1.3/meta/control.json#/defs/controls", "properties": { "security": { "type": "object", @@ -1685,14 +1785,14 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { "maxItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/control.json#/defs/control-detail", + "$ref": "https://calm.finos.org/release/1.3/meta/control.json#/defs/control-detail", "properties": { - "control-requirement-url": { + "requirement-url": { "const": "https://calm.finos.org/workshop/controls/permitted-connection.requirement.json" } }, "required": [ - "control-config-url" + "config-url" ] } ] @@ -1708,7 +1808,7 @@ if (isEmptyDatabase && db.patterns.countDocuments() === 0) { ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "properties": { "unique-id": { "const": "deployed-in-k8s-cluster" diff --git a/calm-hub/nitrite/init-nitrite.sh b/calm-hub/nitrite/init-nitrite.sh index 1c63c3bed1..5aeba4dd75 100755 --- a/calm-hub/nitrite/init-nitrite.sh +++ b/calm-hub/nitrite/init-nitrite.sh @@ -409,7 +409,7 @@ create_patterns() { local doc doc=$(cat <<'CALMDOC' { - "$schema": "https://calm.finos.org/calm/schemas/2025-03/meta/calm.json", + "$schema": "https://calm.finos.org/release/1.3/meta/calm.json", "$id": "https://calm.finos.org/calm/namespaces/finos/patterns/1/versions/1.0.0", "title": "API Gateway Pattern", "type": "object", @@ -419,7 +419,7 @@ create_patterns() { "minItems": 4, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "properties": { "well-known-endpoint": { "type": "string" @@ -441,12 +441,22 @@ create_patterns() { "minItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/host-port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "api-gateway-ingress" + }, + "host": { + "type": "string" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "host", + "port" + ] } ] } @@ -457,7 +467,7 @@ create_patterns() { ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "properties": { "description": { "const": "The API Consumer making an authenticated and authorized request" @@ -474,7 +484,7 @@ create_patterns() { } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "properties": { "description": { "const": "The API Producer serving content" @@ -493,12 +503,22 @@ create_patterns() { "minItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/host-port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "producer-ingress" + }, + "host": { + "type": "string" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "host", + "port" + ] } ] } @@ -508,7 +528,7 @@ create_patterns() { ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "properties": { "description": { "const": "The Identity Provider used to verify the bearer token" @@ -531,7 +551,7 @@ create_patterns() { "minItems": 4, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "properties": { "unique-id": { "const": "api-consumer-api-gateway" @@ -564,7 +584,7 @@ create_patterns() { } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "properties": { "unique-id": { "const": "api-gateway-idp" @@ -590,7 +610,7 @@ create_patterns() { } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "properties": { "unique-id": { "const": "api-gateway-api-producer" @@ -619,7 +639,7 @@ create_patterns() { } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "properties": { "unique-id": { "const": "api-consumer-idp" @@ -661,7 +681,7 @@ CALMDOC local doc doc=$(cat <<'CALMDOC' { - "$schema": "https://calm.finos.org/calm/schemas/2025-03/meta/calm.json", + "$schema": "https://calm.finos.org/release/1.3/meta/calm.json", "$id": "https://calm.finos.org/calm/namespaces/workshop/patterns/1/versions/1.0.0", "type": "object", "title": "Conference Signup Pattern", @@ -673,7 +693,7 @@ CALMDOC "maxItems": 5, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -694,19 +714,25 @@ CALMDOC "maxItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/url-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "conference-website-url" + }, + "url": { + "type": "string" } - } + }, + "required": [ + "url" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -727,19 +753,29 @@ CALMDOC "maxItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/host-port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "load-balancer-host-port" + }, + "host": { + "type": "string" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "host", + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -760,27 +796,39 @@ CALMDOC "maxItems": 2, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/container-image-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "attendees-image" + }, + "image": { + "type": "string" } - } + }, + "required": [ + "image" + ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "attendees-port" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -801,27 +849,39 @@ CALMDOC "maxItems": 2, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/container-image-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "database-image" + }, + "image": { + "type": "string" } - } + }, + "required": [ + "image" + ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "database-port" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -846,7 +906,7 @@ CALMDOC "maxItems": 4, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -876,7 +936,7 @@ CALMDOC ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -906,7 +966,7 @@ CALMDOC ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -936,7 +996,7 @@ CALMDOC ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "properties": { "unique-id": { "const": "deployed-in-k8s-cluster" @@ -983,7 +1043,7 @@ CALMDOC local pattern_v2 pattern_v2=$(cat <<'CALMDOC' { - "$schema": "https://calm.finos.org/calm/schemas/2025-03/meta/calm.json", + "$schema": "https://calm.finos.org/release/1.3/meta/calm.json", "type": "object", "title": "Conference Signup Pattern", "description": "A reusable architecture pattern for conference signup systems with Kubernetes deployment.", @@ -994,7 +1054,7 @@ CALMDOC "maxItems": 6, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { "const": "conference-website" }, @@ -1004,7 +1064,7 @@ CALMDOC } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { "const": "load-balancer" }, @@ -1014,7 +1074,7 @@ CALMDOC } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { "const": "attendees" }, @@ -1024,7 +1084,7 @@ CALMDOC } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { "const": "attendees-store" }, @@ -1034,7 +1094,7 @@ CALMDOC } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { "const": "attendees-cache" }, @@ -1044,7 +1104,7 @@ CALMDOC } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { "const": "k8s-cluster" }, @@ -1061,7 +1121,7 @@ CALMDOC "maxItems": 5, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { "const": "conference-website-load-balancer" }, @@ -1074,7 +1134,7 @@ CALMDOC "required": [ "description" ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { "const": "load-balancer-attendees-service" }, @@ -1087,7 +1147,7 @@ CALMDOC "required": [ "description" ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { "const": "attendees-attendees-store" }, @@ -1100,7 +1160,7 @@ CALMDOC "required": [ "description" ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { "const": "attendees-attendees-cache" }, @@ -1113,7 +1173,7 @@ CALMDOC "required": [ "description" ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "properties": { "unique-id": { "const": "deployed-in-k8s-cluster" }, "description": { "const": "Components deployed on the k8s cluster" }, @@ -1144,7 +1204,7 @@ CALMDOC local doc doc=$(cat <<'CALMDOC' { - "$schema": "https://calm.finos.org/calm/schemas/2025-03/meta/calm.json", + "$schema": "https://calm.finos.org/release/1.3/meta/calm.json", "$id": "https://calm.finos.org/calm/namespaces/workshop/patterns/2/versions/1.0.0", "type": "object", "title": "Conference Secure Signup Pattern", @@ -1156,7 +1216,7 @@ CALMDOC "maxItems": 5, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1177,19 +1237,25 @@ CALMDOC "maxItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/url-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "conference-website-url" + }, + "url": { + "type": "string" } - } + }, + "required": [ + "url" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1210,19 +1276,29 @@ CALMDOC "maxItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/host-port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "load-balancer-host-port" + }, + "host": { + "type": "string" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "host", + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1243,27 +1319,39 @@ CALMDOC "maxItems": 2, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/container-image-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "attendees-image" + }, + "image": { + "type": "string" } - } + }, + "required": [ + "image" + ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "attendees-port" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1284,27 +1372,39 @@ CALMDOC "maxItems": 2, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/container-image-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "database-image" + }, + "image": { + "type": "string" } - } + }, + "required": [ + "image" + ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "database-port" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -1329,7 +1429,7 @@ CALMDOC "maxItems": 4, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -1359,7 +1459,7 @@ CALMDOC ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -1389,7 +1489,7 @@ CALMDOC ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -1419,7 +1519,7 @@ CALMDOC ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "properties": { "unique-id": { "const": "deployed-in-k8s-cluster" @@ -6127,7 +6227,7 @@ create_timeline_demo() { # Patterns have no explicit timeline, so the bar always shows the implied # projection — useful for testing the pattern path of the timeline UI. local pattern_v1='{ - "$schema": "https://calm.finos.org/calm/schemas/2025-03/meta/calm.json", + "$schema": "https://calm.finos.org/release/1.3/meta/calm.json", "title": "Demo Pattern", "type": "object", "properties": { @@ -6149,7 +6249,7 @@ create_timeline_demo() { } }' local pattern_v2='{ - "$schema": "https://calm.finos.org/calm/schemas/2025-03/meta/calm.json", + "$schema": "https://calm.finos.org/release/1.3/meta/calm.json", "title": "Demo Pattern", "type": "object", "properties": { @@ -6180,7 +6280,7 @@ create_timeline_demo() { } }' local pattern_v3='{ - "$schema": "https://calm.finos.org/calm/schemas/2025-03/meta/calm.json", + "$schema": "https://calm.finos.org/release/1.3/meta/calm.json", "title": "Demo Pattern", "type": "object", "properties": { From 0e6de7c5df3b7a789aa319b3e6b122d918530956 Mon Sep 17 00:00:00 2001 From: Matthew Bain <66839492+rocketstack-matt@users.noreply.github.com> Date: Mon, 26 Oct 2026 21:17:58 +0000 Subject: [PATCH 2/3] test(calm-hub-ui): use CALM 1.3 in the conference signup pattern fixture --- .../fixtures/conference-signup-pattern.json | 84 ++++++++++++++----- 1 file changed, 62 insertions(+), 22 deletions(-) diff --git a/calm-hub-ui/cypress/fixtures/conference-signup-pattern.json b/calm-hub-ui/cypress/fixtures/conference-signup-pattern.json index ecb267898b..ed3f61bf34 100644 --- a/calm-hub-ui/cypress/fixtures/conference-signup-pattern.json +++ b/calm-hub-ui/cypress/fixtures/conference-signup-pattern.json @@ -1,5 +1,5 @@ { - "$schema": "https://calm.finos.org/calm/schemas/2025-03/meta/calm.json", + "$schema": "https://calm.finos.org/release/1.3/meta/calm.json", "$id": "https://calm.finos.org/calm/namespaces/workshop/patterns/1/versions/1.0.0", "type": "object", "title": "Conference Signup Pattern", @@ -11,7 +11,7 @@ "maxItems": 5, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -32,19 +32,25 @@ "maxItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/url-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "conference-website-url" + }, + "url": { + "type": "string" } - } + }, + "required": [ + "url" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -65,19 +71,29 @@ "maxItems": 1, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/host-port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "load-balancer-host-port" + }, + "host": { + "type": "string" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "host", + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -98,27 +114,39 @@ "maxItems": 2, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/container-image-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "attendees-image" + }, + "image": { + "type": "string" } - } + }, + "required": [ + "image" + ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "attendees-port" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -139,27 +167,39 @@ "maxItems": 2, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/container-image-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "database-image" + }, + "image": { + "type": "string" } - } + }, + "required": [ + "image" + ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/interface.json#/defs/port-interface", + "$ref": "https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type", "properties": { "unique-id": { "const": "database-port" + }, + "port": { + "type": "integer" } - } + }, + "required": [ + "port" + ] } ] } } }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/node", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/node", "type": "object", "properties": { "unique-id": { @@ -184,7 +224,7 @@ "maxItems": 4, "prefixItems": [ { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -214,7 +254,7 @@ ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -244,7 +284,7 @@ ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "type": "object", "properties": { "unique-id": { @@ -274,7 +314,7 @@ ] }, { - "$ref": "https://calm.finos.org/calm/schemas/2025-03/meta/core.json#/defs/relationship", + "$ref": "https://calm.finos.org/release/1.3/meta/core.json#/defs/relationship", "properties": { "unique-id": { "const": "deployed-in-k8s-cluster" From 805c809481f179f0e7c6073edde4a72fa5fa9fb3 Mon Sep 17 00:00:00 2001 From: Matthew Bain <66839492+rocketstack-matt@users.noreply.github.com> Date: Tue, 27 Oct 2026 07:07:32 +0000 Subject: [PATCH 3/3] fix(calm-hub-ui): do not show a generic interface definition as the interface type --- .../utils/patternTransformer.test.ts | 29 +++++++++++++++++++ .../reactflow/utils/patternTransformer.ts | 6 +++- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/calm-hub-ui/src/visualizer/components/reactflow/utils/patternTransformer.test.ts b/calm-hub-ui/src/visualizer/components/reactflow/utils/patternTransformer.test.ts index 39038efc07..fe4e7f81a9 100644 --- a/calm-hub-ui/src/visualizer/components/reactflow/utils/patternTransformer.test.ts +++ b/calm-hub-ui/src/visualizer/components/reactflow/utils/patternTransformer.test.ts @@ -289,6 +289,35 @@ describe('parsePatternData', () => { expect(node?.data.interfaces[1].type).toBe('port-interface'); }); + it('does not use a generic interface definition as the interface type', () => { + const pattern = makePattern([ + schemaNode('svc-1', 'Service', 'service', { + interfaces: { + prefixItems: [ + { + $ref: 'https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-type', + properties: { + 'unique-id': { const: 'svc-1-host-port' }, + }, + }, + { + $ref: 'https://calm.finos.org/release/1.3/meta/interface.json#/defs/interface-definition', + properties: { + 'unique-id': { const: 'svc-1-definition' }, + }, + }, + ], + }, + }), + ]); + const result = parsePatternData(pattern); + const node = result.nodes.find((n) => n.id === 'svc-1'); + expect(node?.data.interfaces).toEqual([ + { 'unique-id': 'svc-1-host-port' }, + { 'unique-id': 'svc-1-definition' }, + ]); + }); + it('extracts controls from pattern schema', () => { const pattern = makePattern( [ diff --git a/calm-hub-ui/src/visualizer/components/reactflow/utils/patternTransformer.ts b/calm-hub-ui/src/visualizer/components/reactflow/utils/patternTransformer.ts index e608ee2d7f..efa19d5dc8 100644 --- a/calm-hub-ui/src/visualizer/components/reactflow/utils/patternTransformer.ts +++ b/calm-hub-ui/src/visualizer/components/reactflow/utils/patternTransformer.ts @@ -76,6 +76,9 @@ function readSchemaValue(obj: SchemaObject | undefined, key: string): string | u return undefined; } +// These generic definitions do not name an interface type. From CALM 1.3, an interface can refer only to them. +const GENERIC_INTERFACE_DEFINITIONS = new Set(['interface-type', 'interface-definition']); + /** * Extracts interfaces from a pattern node's schema item. * Reads prefixItems and extracts unique-id and $ref type for each interface. @@ -91,7 +94,8 @@ function extractInterfaces(item: SchemaObject): SchemaObject[] | undefined { const uniqueId = iface['properties']?.['unique-id']?.['const']; const ref = iface['$ref'] as string | undefined; // Extract the interface type from the $ref (e.g., "url-interface" from ".../defs/url-interface") - const interfaceType = ref?.split('/').pop(); + const definition = ref?.split('/').pop(); + const interfaceType = definition && !GENERIC_INTERFACE_DEFINITIONS.has(definition) ? definition : undefined; return { 'unique-id': uniqueId || '', ...(interfaceType && { type: interfaceType }),