Skip to content

Commit 97c96bc

Browse files
committed
feat(calm-widgets): imply context if not specified and fix dot notation bugs
1 parent b242933 commit 97c96bc

File tree

7 files changed

+951
-45
lines changed

7 files changed

+951
-45
lines changed

cli/test_fixtures/template/expected-output/widget-tests/json-viewer-test.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,4 +316,26 @@
316316
}
317317
}
318318
]
319+
```
320+
321+
322+
323+
### Test Partial Document With DotNotation
324+
325+
```json
326+
[
327+
{
328+
"unique-id": "load-balancer",
329+
"node-type": "network",
330+
"name": "Load Balancer",
331+
"description": "The attendees service, or a placeholder for another application",
332+
"interfaces": [
333+
{
334+
"unique-id": "load-balancer-host-port",
335+
"host": "[[ HOST ]]",
336+
"port": -1
337+
}
338+
]
339+
}
340+
]
319341
```
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{{flow-sequence this flow-id="flow-conference-signup"}}
1+
{{flow-sequence flow-id="flow-conference-signup"}}

cli/test_fixtures/template/widget-tests/json-viewer-test.hbs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44

55
### Test Partial Document
66

7-
{{json-viewer nodes}}
7+
{{json-viewer nodes}}
8+
9+
### Test Partial Document With DotNotation
10+
11+
{{json-viewer nodes['load-balancer']}}

package-lock.json

Lines changed: 10 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

shared/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@
3030
"module": "esnext",
3131
"type": "module",
3232
"dependencies": {
33-
"@finos/calm-models": "file:../calm-models",
3433
"@apidevtools/json-schema-ref-parser": "^14.0.0",
34+
"@finos/calm-models": "file:../calm-models",
3535
"@stoplight/spectral-cli": "^6.14.3",
3636
"@stoplight/spectral-core": "^1.19.5",
3737
"@stoplight/spectral-functions": "^1.9.4",
@@ -43,6 +43,7 @@
4343
"json-pointer": "^0.6.2",
4444
"jsonpath-plus": "^10.3.0",
4545
"junit-report-builder": "^5.1.1",
46+
"lines-and-columns": "^2.0.4",
4647
"lodash": "^4.17.21",
4748
"loglevel": "^1.9.2",
4849
"mkdirp": "^3.0.1",

0 commit comments

Comments
 (0)