File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -161,8 +161,15 @@ func (v *TypeChecker) validatePropertyValue(
161161
162162 switch typeSpec .Type {
163163 case "boolean" :
164- // The bridge permits the strings "true" and "false" to read as boolean, so allow strings.
165- if ! propertyValue .IsBool () && ! propertyValue .IsString () {
164+ // Check for strings that are values "true" or "false".
165+ // These are handled as booleans in the bridge, so they should be skipped by the type checker.
166+ var boolString bool
167+ if propertyValue .IsString () {
168+ if propertyValue .StringValue () == "true" || propertyValue .StringValue () == "false" {
169+ boolString = true
170+ }
171+ }
172+ if ! propertyValue .IsBool () && ! boolString {
166173 return []Failure {newTypeFailure (propertyPath , typeSpec .Type , propertyValue )}
167174 }
168175 return nil
You can’t perform that action at this time.
0 commit comments