Skip to content

Commit ec198fe

Browse files
authored
Merge pull request #21 from eva-foundry/fix/validation-api-calls-property
fix(validation): Use HasProp() to safely check api_calls on screens
2 parents f2b4329 + 0fc5bb5 commit ec198fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/validate-model.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ foreach ($obj in $m.endpoints) {
7070
foreach ($obj in $m.screens) {
7171
if (-not $obj.id) { Fail "screens: object missing 'id'" }
7272
if (-not $obj.route) { Fail "screens: '$($obj.id)' missing 'route'" }
73-
if ($null -eq $obj.api_calls) { Fail "screens: '$($obj.id)' missing 'api_calls' (use [] not null)" }
73+
if (-not (HasProp $obj "api_calls")) { Fail "screens: '$($obj.id)' missing 'api_calls'" }
7474
}
7575

7676
foreach ($obj in $m.literals) {

0 commit comments

Comments
 (0)