Commit 7c283838 by Rizal Hermawan

add script

parent 9fd3c6ea
const schema = {
"type": "array",
"items": {
"$ref": "#/definitions/TreeViewElement"
},
"definitions": {
"TreeViewElement": {
"type": "object",
"additionalProperties": false,
"properties": {
"text": {
"type": "string"
},
"has_checkbox": {
"type": "boolean"
},
"value": {
"type": "string"
},
"children": {
"type": "array",
"items": {
"$ref": "#/definitions/TreeViewElement"
}
}
},
"required": [
"text"
],
"title": "TreeViewElement",
"if": {
"properties": {
"has_checkbox": {
"const": true
}
}
},
"then": {
"required": [
"text",
"has_checkbox",
"value"
]
},
"else": {
"required": [
"text"
]
}
}
}
}
pm.test("Validating schema", () => {
pm.response.to.have.jsonSchema(schema);
});
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment