CLI Generate Command Does not Generate Additional Properties in CALM Schema
Bug Report
Steps to Reproduce:
Create an additional node in a pattern template e.g.
{
"$schema": "https://raw.githubusercontent.com/finos-labs/architecture-as-code/main/calm/draft/2024-04/meta/calm.json",
"$id": "https://raw.githubusercontent.com/finos-labs/architecture-as-code/main/calm/pattern/api-gateway",
"title": "API Gateway Pattern",
"type": "object",
"properties": {
"nodes": {
...
},
"relationships": {
....
},
"custom-pattern-information" : {
...
}
},
"required": [
"nodes",
"relationships",
"custom-pattern-information"
]
}
Running the generate command will not add an object for custom-pattern-information
Expected Result:
All properties appear in the pattern instantiation.
Perhaps a good second step to help us discover any strange bugs or possible issues in a pattern would be to run the validate command against the produced pattern instantiation?
@willosborne I believe this is expected behaviour as the calm generator is opinionated based on the core meta-schema (like nodes, relationships)?
Indeed: the generate command will only do nodes and relationships. I did write code to have it handle additional top level properties, but there were concerned this was too custom and potentially indicative of some missing design in the CALM schema.
See #92
We can definitely add this feature if it'd be worth having.
With the addition of the metadata section, we no longer support additional top level properties. Closing this issue