AutoRestTest-TrackA / tools /tcases /docs /schema /system-test-schema.json
minhhungg's picture
feat: initial upload for AutoRestTest Track A datasets
6c50d1f
Raw
History Blame Contribute Delete
3.88 kB
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://www.cornutum.org/tcases/system-test-schema.json",
"title": "System Test Model",
"description": "Defines test cases for a system (version: 4.0.1)",
"type": "object",
"properties": {
"system": {
"type": "string"
},
"has": {
"$ref": "#/definitions/annotation"
}
},
"required": [ "system" ],
"additionalProperties": {
"$ref": "#/definitions/function"
},
"definitions": {
"annotation": {
"description": "Defines a set of output annotations",
"type": "object",
"patternProperties": {
".": {
"type": "string"
}
},
"minProperties": 1
},
"function": {
"description": "Defines the test cases for a system function",
"oneOf": [
{
"description": "Deprecated: For compatibility with version<=3.0.1",
"type": "array",
"items": {
"$ref": "#/definitions/testCase"
}
},
{
"type": "object",
"properties": {
"testCases": {
"type": "array",
"items": {
"$ref": "#/definitions/testCase"
}
},
"has": {
"$ref": "#/definitions/annotation"
}
},
"required": ["testCases"]
}
]
},
"testCase": {
"description": "Defines a test case for a system function",
"type": "object",
"properties": {
"id": {
"type": "integer",
"minimum": 0
},
"name": {
"type": "string"
},
"has": {
"$ref": "#/definitions/annotation"
}
},
"additionalProperties": {
"$ref": "#/definitions/inputDef"
},
"required": ["id"]
},
"inputDef": {
"description": "Defines bindings for a set of input variables of the same type",
"type": "object",
"minProperties": 1,
"patternProperties": {
".": {
"$ref": "#/definitions/bindingDef"
}
}
},
"bindingDef": {
"type": "object",
"properties": {
"has": {
"$ref": "#/definitions/annotation"
},
"value": {
"type": ["null", "boolean", "array", "number", "string"]
},
"source": {
"type": ["null", "boolean", "array", "number", "string"]
},
"NA": {
"type": "boolean"
},
"failure": {
"type": "boolean"
}
},
"additionalProperties": false,
"oneOf": [
{
"required": ["value"],
"properties": {
"NA": false
}
},
{
"required": ["NA"],
"properties": {
"value": false,
"source": false,
"failure": false
}
}
]
}
}
}