Skip to content

Instantly share code, notes, and snippets.

@pawndev
Last active May 18, 2023 14:50
Show Gist options
  • Save pawndev/6e007e24f95176c3fd132a5d84efc82e to your computer and use it in GitHub Desktop.
Save pawndev/6e007e24f95176c3fd132a5d84efc82e to your computer and use it in GitHub Desktop.
{
"$schema": "http://json-schema.org/draft-06/schema#",
"$ref": "#/definitions/Welcome6",
"definitions": {
"YamlAssertBase": {
"type": "object",
"additionalProperties": false,
"properties": {
"tests": {
"type": "array",
"items": {
"$ref": "#/definitions/Test"
}
}
},
"required": [
"tests"
],
"title": "YamlAssertBase"
},
"Test": {
"type": "object",
"additionalProperties": false,
"properties": {
"name": {
"type": "string"
},
"description": {
"type": "string"
},
"asserts": {
"type": "array",
"items": {
"$ref": "#/definitions/Assert"
}
}
},
"required": [
"asserts",
"name"
],
"title": "Test"
},
"Assert": {
"type": "object",
"additionalProperties": false,
"properties": {
"expression": {
"type": "string"
},
"operand": {
"type": "string",
"enum": ["==", ">", "<", "!="]
},
"castResultTo": {
"type": "string",
"enum": ["int", "float", "string"]
},
"expected": {
"type": "integer"
}
},
"required": [
"expected",
"expression",
"operand"
],
"title": "Assert"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment