Skip to content

Commit dc8b817

Browse files
Merge pull request finos#1422 from LeighFinegold/1418
Add Metadata Flexibility & Update v1.0-rc2 Release Notes
2 parents aed5e78 + 05149b9 commit dc8b817

File tree

3 files changed

+50
-4
lines changed

3 files changed

+50
-4
lines changed

calm/release/1.0-rc2/RELEASE_NOTES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,11 @@ The following built-in interface types have been removed from the schema:
8181
- Prototype examples updated with new schema references
8282
- Control requirement examples updated
8383

84+
### 5. Metadata Flexibility (Non‑Breaking Change)
85+
**What Changed:**
86+
The `metadata` property now accepts **either** a single object **or** an array of objects, rather than only an array.
87+
88+
8489
## Prototype Examples
8590

8691
All existing prototype examples have been updated to use the new v1.0-rc2 schema references:
@@ -93,6 +98,7 @@ All existing prototype examples have been updated to use the new v1.0-rc2 schema
9398
- `example-inline-config.json` - Inline control configurations
9499
- `example-mixed-config.json` - Mixed inline and URL-based configurations
95100
- `throughput-control-prototype.json` - Performance control requirements
101+
- `meta-example.json` - Object based metadata
96102

97103
## Migration Guide
98104

@@ -118,6 +124,10 @@ All existing prototype examples have been updated to use the new v1.0-rc2 schema
118124
5. **Simplify Interface References:**
119125
- Update node interface references to use simple string identifiers
120126

127+
6. **Metadata Format Flexibility:**
128+
- You can now use **either** an object or an array for any `metadata` field
129+
- No changes are required for existing array‑based metadata
130+
121131
## Compatibility Notes
122132

123133
- **Breaking Changes:** This release contains breaking changes that require migration from v1.0-rc1

calm/release/1.0-rc2/meta/core.json

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -306,10 +306,18 @@
306306
]
307307
},
308308
"metadata": {
309-
"type": "array",
310-
"items": {
311-
"type": "object"
312-
}
309+
"oneOf": [
310+
{
311+
"type": "array",
312+
"items": {
313+
"type": "object"
314+
}
315+
},
316+
{
317+
"type": "object",
318+
"additionalProperties": true
319+
}
320+
]
313321
}
314322
}
315323
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{
2+
"nodes": [
3+
{
4+
"unique-id": "a-node",
5+
"node-type": "service",
6+
"name": "A Service",
7+
"description": "This node uses a metadata format of an object",
8+
"metadata": {
9+
"environment": "production",
10+
"owner": "team-a"
11+
}
12+
},
13+
{
14+
"unique-id": "another-node",
15+
"node-type": "service",
16+
"name": "Another Service",
17+
"description": "This node uses a metadata format of an array",
18+
"metadata": [
19+
{
20+
"environment": "staging"
21+
},
22+
{
23+
"owner": "team-b"
24+
}
25+
]
26+
}
27+
]
28+
}

0 commit comments

Comments
 (0)