swagger/schemas/definitions/rule.json
{
"$schema": "http://json-schema.org/draft-04/schema#",
"definitions": {
"rule-items": {
"type": "array",
"items": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"file.type",
"file.name",
"file.measurements",
"container.has-type",
"container.has-measurement"
]
},
"value": { "type": "string" },
"regex": { "type": "boolean" }
},
"required": [ "type", "value" ],
"additionalProperties": false
}
},
"rule-input": {
"type": "object",
"properties": {
"_id": { "type": "string" },
"project_id": { "type": "string" },
"alg": { "type": "string" },
"name": { "type": "string" },
"any": { "$ref": "#/definitions/rule-items" },
"all": { "$ref": "#/definitions/rule-items" },
"disabled": { "type": "boolean" }
},
"additionalProperties": false,
"x-sdk-model": "rule"
},
"rule-output": {
"type": "object",
"properties": {
"_id": { "type": "string" },
"alg": { "type": "string" },
"name": { "type": "string" },
"any": { "$ref": "#/definitions/rule-items" },
"all": { "$ref": "#/definitions/rule-items" },
"disabled": { "type": "boolean" }
},
"x-sdk-model": "rule"
}
}
}