test(jspg): rename items fixture to array and resolve unused HashMap warning
- Rename fixtures/items.json to fixtures/array.json to better reflect array testing constraints. - Update reference paths in src/tests/fixtures.rs and across other fixture JSON files. - Remove unused HashMap import in src/validator/rules/dict.rs to resolve the compiler warning.
This commit is contained in:
@ -177,8 +177,8 @@
|
||||
{
|
||||
"code": "CONTAINS_VIOLATED",
|
||||
"values": {
|
||||
"count": "0",
|
||||
"limit": "1"
|
||||
"limit": "1",
|
||||
"count": "0"
|
||||
},
|
||||
"details": {
|
||||
"path": "",
|
||||
@ -227,8 +227,8 @@
|
||||
{
|
||||
"code": "CONTAINS_VIOLATED",
|
||||
"values": {
|
||||
"limit": "1",
|
||||
"count": "0"
|
||||
"count": "0",
|
||||
"limit": "1"
|
||||
},
|
||||
"details": {
|
||||
"path": "",
|
||||
@ -275,16 +275,6 @@
|
||||
"path": "",
|
||||
"schema": "contains_3_0"
|
||||
}
|
||||
},
|
||||
{
|
||||
"code": "STRICT_ITEM_VIOLATION",
|
||||
"values": {
|
||||
"index": "0"
|
||||
},
|
||||
"details": {
|
||||
"path": "0",
|
||||
"schema": "contains_3_0"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -383,8 +373,8 @@
|
||||
{
|
||||
"code": "MULTIPLE_OF_VIOLATED",
|
||||
"values": {
|
||||
"value": "3",
|
||||
"multiple_of": "2"
|
||||
"multiple_of": "2",
|
||||
"value": "3"
|
||||
},
|
||||
"details": {
|
||||
"path": "0",
|
||||
@ -394,8 +384,8 @@
|
||||
{
|
||||
"code": "MULTIPLE_OF_VIOLATED",
|
||||
"values": {
|
||||
"multiple_of": "2",
|
||||
"value": "9"
|
||||
"value": "9",
|
||||
"multiple_of": "2"
|
||||
},
|
||||
"details": {
|
||||
"path": "2",
|
||||
@ -431,8 +421,8 @@
|
||||
{
|
||||
"code": "CONTAINS_VIOLATED",
|
||||
"values": {
|
||||
"limit": "1",
|
||||
"count": "0"
|
||||
"count": "0",
|
||||
"limit": "1"
|
||||
},
|
||||
"details": {
|
||||
"path": "",
|
||||
@ -599,7 +589,7 @@
|
||||
},
|
||||
"tests": [
|
||||
{
|
||||
"description": "extra items cause failure",
|
||||
"description": "extra items do not cause failure",
|
||||
"data": [
|
||||
1,
|
||||
2
|
||||
@ -607,19 +597,7 @@
|
||||
"schema_id": "contains_8_0",
|
||||
"action": "validate",
|
||||
"expect": {
|
||||
"success": false,
|
||||
"errors": [
|
||||
{
|
||||
"code": "STRICT_ITEM_VIOLATION",
|
||||
"values": {
|
||||
"index": "1"
|
||||
},
|
||||
"details": {
|
||||
"path": "1",
|
||||
"schema": "contains_8_0"
|
||||
}
|
||||
}
|
||||
]
|
||||
"success": true
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user