306 lines
9.3 KiB
JSON
306 lines
9.3 KiB
JSON
{
|
|
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
"$ref": "#/definitions/APITesting",
|
|
"definitions": {
|
|
"APITesting": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"id": {
|
|
"type": "string"
|
|
},
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"api": {
|
|
"type": "string"
|
|
},
|
|
"spec": {
|
|
"type": "object",
|
|
"spec": {
|
|
"$ref": "#/definitions/Spec"
|
|
}
|
|
},
|
|
"param": {
|
|
"description": "Parameters of the test suite",
|
|
"type": "object",
|
|
"title": "Param",
|
|
"additionalProperties": true
|
|
},
|
|
"proxy": {
|
|
"type": "object",
|
|
"properties": {
|
|
"http": {
|
|
"type": "string",
|
|
"description": "HTTP proxy URL"
|
|
},
|
|
"https": {
|
|
"type": "string",
|
|
"description": "HTTPS proxy URL"
|
|
},
|
|
"no": {
|
|
"type": "string",
|
|
"description": "Comma-separated list of hosts to exclude from proxying"
|
|
}
|
|
},
|
|
"additionalProperties": false
|
|
},
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/Item"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"name"
|
|
],
|
|
"title": "APITesting"
|
|
},
|
|
"Spec": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"kind": {
|
|
"type": "string",
|
|
"enum": [
|
|
"openapi",
|
|
"swagger",
|
|
"grpc",
|
|
"trpc",
|
|
"graphql"
|
|
]
|
|
},
|
|
"url": {
|
|
"type": "string",
|
|
"qt-uri-protocols": [
|
|
"https",
|
|
"http"
|
|
]
|
|
},
|
|
"rpc": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"import": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"protofile": {
|
|
"type": "string"
|
|
},
|
|
"protoset": {
|
|
"type": "string"
|
|
},
|
|
"serverReflection": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"secure": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"key": {
|
|
"type": "string"
|
|
},
|
|
"serverName": {
|
|
"type": "string"
|
|
},
|
|
"cert": {
|
|
"type": "string"
|
|
},
|
|
"insecure": {
|
|
"type": "boolean"
|
|
}
|
|
}
|
|
},
|
|
"raw": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"Item": {
|
|
"type": "object",
|
|
"additionalProperties": true,
|
|
"properties": {
|
|
"name": {
|
|
"type": "string"
|
|
},
|
|
"request": {
|
|
"$ref": "#/definitions/Request"
|
|
},
|
|
"expect": {
|
|
"$ref": "#/definitions/Expect"
|
|
},
|
|
"before": {
|
|
"$ref": "#/definitions/Job"
|
|
},
|
|
"after": {
|
|
"$ref": "#/definitions/Job"
|
|
}
|
|
},
|
|
"required": [
|
|
"name",
|
|
"request"
|
|
],
|
|
"title": "Item"
|
|
},
|
|
"Expect": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"statusCode": {
|
|
"type": "integer"
|
|
},
|
|
"body": {
|
|
"type": "string"
|
|
},
|
|
"header": {
|
|
"description": "HTTP response header",
|
|
"type": "object",
|
|
"title": "Header",
|
|
"additionalProperties": true
|
|
},
|
|
"bodyFieldsExpect": {
|
|
"description": "Body fields expect",
|
|
"type": "object",
|
|
"additionalProperties": true
|
|
},
|
|
"verify": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"conditionalVerify": {
|
|
"type": "array",
|
|
"items": {
|
|
"$ref": "#/definitions/ConditionalVerify"
|
|
}
|
|
},
|
|
"schema": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"title": "Expect"
|
|
},
|
|
"ConditionalVerify": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"condition": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"verify": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"Request": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"api": {
|
|
"type": "string",
|
|
"qt-uri-protocols": [
|
|
"https"
|
|
]
|
|
},
|
|
"method": {
|
|
"type": "string",
|
|
"enum": [
|
|
"GET",
|
|
"POST",
|
|
"PUT",
|
|
"PATCH",
|
|
"DELETE",
|
|
"HEAD"
|
|
]
|
|
},
|
|
"query": {
|
|
"description": "HTTP request query",
|
|
"type": "object",
|
|
"title": "Query",
|
|
"additionalProperties": true
|
|
},
|
|
"header": {
|
|
"description": "HTTP request header",
|
|
"type": "object",
|
|
"title": "Header",
|
|
"additionalProperties": true
|
|
},
|
|
"cookie": {
|
|
"description": "HTTP request cookie",
|
|
"type": "object",
|
|
"title": "Cookie",
|
|
"additionalProperties": true
|
|
},
|
|
"form": {
|
|
"description": "HTTP request form",
|
|
"type": "object",
|
|
"title": "Form",
|
|
"additionalProperties": true
|
|
},
|
|
"body": {
|
|
"anyOf": [{
|
|
"type": "string"
|
|
}, {
|
|
"$ref": "#/definitions/GraphQL"
|
|
}]
|
|
},
|
|
"bodyFromFile": {
|
|
"type": "string"
|
|
}
|
|
},
|
|
"required": [
|
|
"api"
|
|
],
|
|
"title": "Request"
|
|
},
|
|
"Job": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"properties": {
|
|
"items": {
|
|
"type": "array",
|
|
"items": {
|
|
"type": "string"
|
|
}
|
|
}
|
|
},
|
|
"required": [
|
|
"items"
|
|
],
|
|
"title": "Job"
|
|
},
|
|
"GraphQL": {
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"patternProperties": {
|
|
"query": {
|
|
"type": "string"
|
|
},
|
|
"operationName": {
|
|
"type": "string"
|
|
},
|
|
"variables": {
|
|
"type": "object"
|
|
}
|
|
},
|
|
"required": [
|
|
"query"
|
|
],
|
|
"description": "Know more from https://graphql.org/",
|
|
"title": "GraphQL"
|
|
}
|
|
}
|
|
} |