[tests-only] use new json schema assertion lib that supports latest schema drafts (#8503)

* test(api): use new json schema assertion lib that supports latest schema drafts

* test(api): fix json schema

* test(api): fix method call

* test(api): update expected failure lines

* test(api): add custom schema validator

* test(api): add custom schema validator

* test(api): add custom schema validator

* test(api): add custom schema validator

* test(api): make json array validation strict

* test(api): fix php code style

* test(api): update expected failure lines
This commit is contained in:
Sawjan Gurung
2024-02-23 16:24:22 +05:45
committed by GitHub
parent ee501f225e
commit 3cea035d6d
17 changed files with 2563 additions and 2312 deletions
@@ -167,61 +167,61 @@ Feature: Change data of space
},
"special": {
"type": "array",
"items": [
{
"type": "object",
"required": [
"size",
"name",
"specialFolder",
"file",
"id",
"eTag"
],
"properties": {
"size": {
"type": "number",
"enum": [17]
},
"name": {
"type": "string",
"enum": ["readme.md"]
},
"specialFolder": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"enum": ["readme"]
}
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"size",
"name",
"specialFolder",
"file",
"id",
"eTag"
],
"properties": {
"size": {
"type": "number",
"enum": [17]
},
"name": {
"type": "string",
"enum": ["readme.md"]
},
"specialFolder": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"enum": ["readme"]
}
},
"file": {
"type": "object",
"required": [
"mimeType"
],
"properties": {
"mimeType": {
"type": "string",
"enum": ["text/markdown"]
}
}
},
"id": {
"type": "string",
"enum": ["%file_id%"]
},
"tag": {
"type": "string",
"enum": ["%eTag%"]
}
},
"file": {
"type": "object",
"required": [
"mimeType"
],
"properties": {
"mimeType": {
"type": "string",
"enum": ["text/markdown"]
}
}
},
"id": {
"type": "string",
"enum": ["%file_id%"]
},
"tag": {
"type": "string",
"enum": ["%eTag%"]
}
}
]
}
}
}
}
@@ -262,61 +262,61 @@ Feature: Change data of space
},
"special": {
"type": "array",
"items": [
{
"type": "object",
"required": [
"size",
"name",
"specialFolder",
"file",
"id",
"eTag"
],
"properties": {
"size": {
"type": "number",
"enum": [0]
},
"name": {
"type": "string",
"enum": ["<nameInResponse>"]
},
"specialFolder": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"enum": ["image"]
}
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"size",
"name",
"specialFolder",
"file",
"id",
"eTag"
],
"properties": {
"size": {
"type": "number",
"enum": [0]
},
"name": {
"type": "string",
"enum": ["<nameInResponse>"]
},
"specialFolder": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"enum": ["image"]
}
},
"file": {
"type": "object",
"required": [
"mimeType"
],
"properties": {
"mimeType": {
"type": "string",
"enum": ["<mimeType>"]
}
}
},
"id": {
"type": "string",
"enum": ["%file_id%"]
},
"tag": {
"type": "string",
"enum": ["%eTag%"]
}
},
"file": {
"type": "object",
"required": [
"mimeType"
],
"properties": {
"mimeType": {
"type": "string",
"enum": ["<mimeType>"]
}
}
},
"id": {
"type": "string",
"enum": ["%file_id%"]
},
"tag": {
"type": "string",
"enum": ["%eTag%"]
}
}
]
}
}
}
}
@@ -359,61 +359,61 @@ Feature: Change data of space
},
"special": {
"type": "array",
"items": [
{
"type": "object",
"required": [
"size",
"name",
"specialFolder",
"file",
"id",
"eTag"
],
"properties": {
"size": {
"type": "number",
"enum": [<expectedSize>]
},
"name": {
"type": "string",
"enum": ["readme.md"]
},
"specialFolder": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"enum": ["readme"]
}
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"size",
"name",
"specialFolder",
"file",
"id",
"eTag"
],
"properties": {
"size": {
"type": "number",
"enum": [<expectedSize>]
},
"name": {
"type": "string",
"enum": ["readme.md"]
},
"specialFolder": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"enum": ["readme"]
}
},
"file": {
"type": "object",
"required": [
"mimeType"
],
"properties": {
"mimeType": {
"type": "string",
"enum": ["text/markdown"]
}
}
},
"id": {
"type": "string",
"enum": ["%file_id%"]
},
"tag": {
"type": "string",
"enum": ["%eTag%"]
}
},
"file": {
"type": "object",
"required": [
"mimeType"
],
"properties": {
"mimeType": {
"type": "string",
"enum": ["text/markdown"]
}
}
},
"id": {
"type": "string",
"enum": ["%file_id%"]
},
"tag": {
"type": "string",
"enum": ["%eTag%"]
}
}
]
}
}
}
}
@@ -447,61 +447,61 @@ Feature: Change data of space
},
"special": {
"type": "array",
"items": [
{
"type": "object",
"required": [
"size",
"name",
"specialFolder",
"file",
"id",
"eTag"
],
"properties": {
"size": {
"type": "number",
"enum": [0]
},
"name": {
"type": "string",
"enum": ["newSpaceImage.png"]
},
"specialFolder": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"enum": ["image"]
}
"minItems": 1,
"maxItems": 1,
"items": {
"type": "object",
"required": [
"size",
"name",
"specialFolder",
"file",
"id",
"eTag"
],
"properties": {
"size": {
"type": "number",
"enum": [0]
},
"name": {
"type": "string",
"enum": ["newSpaceImage.png"]
},
"specialFolder": {
"type": "object",
"required": [
"name"
],
"properties": {
"name": {
"type": "string",
"enum": ["image"]
}
},
"file": {
"type": "object",
"required": [
"mimeType"
],
"properties": {
"mimeType": {
"type": "string",
"enum": ["image/png"]
}
}
},
"id": {
"type": "string",
"enum": ["%file_id%"]
},
"tag": {
"type": "string",
"enum": ["%eTag%"]
}
},
"file": {
"type": "object",
"required": [
"mimeType"
],
"properties": {
"mimeType": {
"type": "string",
"enum": ["image/png"]
}
}
},
"id": {
"type": "string",
"enum": ["%file_id%"]
},
"tag": {
"type": "string",
"enum": ["%eTag%"]
}
}
]
}
}
}
}