Commit 4370b5c
authored
Fix bool enums (#1080)
* add (failing) test case for boolean enum and const values
failing with:
```
[
{
code: 1,
data: {
schemaUri: [ 'file:///default_schema_id.yaml' ],
values: [ true, false ]
},
message: 'Value is not accepted. Valid values: true, false.',
range: {
end: { character: 15, line: 0 },
start: { character: 11, line: 0 }
},
severity: 1,
source: 'yaml-schema: file:///default_schema_id.yaml'
}
]
```
* fix the issue for `boolean` values in `enum`
this is the same fix for `enum` that has been applied a while back for `const` values here: e6165e4
fixes issue: #1078
---------
Co-authored-by: xxx <xxx>1 parent 2086df4 commit 4370b5c
File tree
2 files changed
+37
-1
lines changed- src/languageservice/parser
- test
2 files changed
+37
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
876 | 876 | | |
877 | 877 | | |
878 | 878 | | |
879 | | - | |
| 879 | + | |
880 | 880 | | |
881 | 881 | | |
882 | 882 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
192 | 228 | | |
193 | 229 | | |
194 | 230 | | |
| |||
0 commit comments