fix(cli): iss2150 pattern interface defs error#2152
fix(cli): iss2150 pattern interface defs error#2152jimthompson5802 wants to merge 12 commits intofinos:mainfrom
Conversation
|
@markscott-ms After making the change, I noticed one more issue. The conference sign-up example does not fully support use of architecture-as-code/calm-ai/tools/pattern-creation.md Lines 323 to 381 in 2952002 The issues I see:
I'll make the changes to the example to address the above. |
…in pattern definitions
|
@markscott-ms I completed refactoring the full example in This PR is ready for review. here is a description of the pattern Pattern: Conference Signup SystemThis CALM pattern defines a complete 3-tier conference registration system architecture deployed on Kubernetes, with the option to choose between PostgreSQL or MySQL database. Architecture OverviewA full-stack conference signup application with:
StructureNodes (4 total):
Relationships (4 total):**
MetadataRequired Kubernetes metadata:
|
|
@markscott-ms I've addressed all comments. |
|
@jimthompson5802 whilst you've changed the services to require 2 interfaces in the interfaces array, only the |
…s for API and database patterns
|
@markscott-ms hopefully, this is now correct. I have to admit, I have to get a better mental model of how the schema works. For the API"$ref": "https://calm.finos.org/release/1.2/meta/core.json#/defs/node",
"type": "object",
"properties": {
"unique-id": {"const": "api-service"},
"name": {"const": "Registration API"},
"node-type": {"const": "service"},
"description": {"type": "string"},
"interfaces": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"prefixItems": [
{
"$ref": "https://calm.finos.org/release/1.2/meta/interface.json#/defs/interface-type",
"properties": {
"unique-id": {"const": "api-image"},
"image": {"type": "string"}
},
"required": ["image"]
},
{
"$ref": "https://calm.finos.org/release/1.2/meta/interface.json#/defs/interface-type",
"properties": {
"unique-id": {"const": "api-port"},
"port": { "type": "integer" }
},
"required": ["port"]
}
]
}
},
"required": [
"description"
]For Postgres Choice"$ref": "https://calm.finos.org/release/1.2/meta/core.json#/defs/node",
"type": "object",
"properties": {
"unique-id": {"const": "postgres-registration-database"},
"name": {"const": "PostgreSQL Database"},
"node-type": {"const": "database"},
"description": {"const": "conference registration database using PostgreSQL"},
"interfaces": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"prefixItems": [
{
"$ref": "https://calm.finos.org/release/1.2/meta/interface.json#/defs/interface-type",
"properties": {
"unique-id": {"const": "postgres-image"},
"image": {"type": "string"}
},
"required": ["image"]
},
{
"$ref": "https://calm.finos.org/release/1.2/meta/interface.json#/defs/interface-type",
"properties": {
"unique-id": {"const": "postgres-port"},
"port": { "type": "integer" }
},
"required": ["port"]
}
]
}
}MySQL Choice"$ref": "https://calm.finos.org/release/1.2/meta/core.json#/defs/node",
"type": "object",
"properties": {
"unique-id": {"const": "mysql-registration-database"},
"name": {"const": "MySQL Database"},
"node-type": {"const": "database"},
"description": {"const": "conference registration database using MySQL"},
"interfaces": {
"type": "array",
"minItems": 2,
"maxItems": 2,
"prefixItems": [
{
"$ref": "https://calm.finos.org/release/1.2/meta/interface.json#/defs/interface-type",
"properties": {
"unique-id": {"const": "mysql-image"},
"image": {"type": "string"}
},
"required": ["image"]
},
{
"$ref": "https://calm.finos.org/release/1.2/meta/interface.json#/defs/interface-type",
"properties": {
"unique-id": {"const": "mysql-port"},
"port": { "type": "integer" }
},
"required": ["port"]
}
]
}
} |

Description
Fix #2150
Reworked JSON-schema snippets for pattern node/interface/relationship definitions — replaced references to obsolete interface defs (e.g., url-interface, container-image-interface, port-interface) with a current schema 1.2 interface types. and moved interface-specific fields into explicit properties (examples: added typed fields like api-port, postgres-port, mysql-port as integers). Also normalized object formatting and expanded required arrays for readability/consistency.
Updated other parts of the prompt to be consistent with the new interface definitions used in the pattern example.
Type of Change
Affected Components
cli/)shared/)calm-widgets/)calm-hub/)calm-hub-ui/)docs/)calm-plugins/vscode/)Commit Message Format ✅
Examples:
This helps with our automated versioning and changelog generation!
Note: Only commits with (cli) scope will trigger CLI releases.
-->
Testing
Checklist