Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
158 changes: 158 additions & 0 deletions schemas/imageFilterAttribute.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
{
"$id":"https://raw.githubusercontent.com/SPINEProject/SPINE-json-schema/master/schemas/imageFilterAttribute.schema.json",
"$schema":"http://json-schema.org/draft-07/schema#",
"title":"Image filter attribute",
"type":"object",
"definitions": {
"attributeBase": {
"$id": "#attributeBase",
"description": "Attribute base schema",
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"NUMBER",
"STRING"
]
},
"isOrdered": {
"type": "boolean"
},
"attributeKey": {
"type": "string"
},
"attributeLabel": {
"type": "string"
},
"multiplicityMin": {
"type": "number",
"min": 1
},
"multiplicityMax": {
"oneOf": [
{
"type": "number",
"min": 1
},
{
"type": "string",
"enum": [
"N"
]
}
]
},
"options": {
"type": "object",
"properties": {
"areOtherValuesAllowed": {
"type": "boolean"
},
"enum": {
"type": "array"
},
"min": {
"type": "number"
},
"max": {
"type": "number"
}
},
"required": [
"areOtherValuesAllowed"
],
"additionalProperties": false
}
},
"required": [
"type",
"attributeKey",
"attributeLabel",
"multiplicityMin",
"multiplicityMax",
"options"
],
"additionalProperties": false
},
"attributeNumber": {
"$id": "#attributeNumber",
"description": "Attribute schema when atribute type is number",
"type": "object",
"allOf": [{
"properties": {
"type": {
"type": "string",
"enum": [
"NUMBER"
]
},
"options": {
"properties": {
"areOtherValuesAllowed": {},
"enum": {
"items": {
"type": "number"
}
},
"min": {},
"max": {}
},
"additionalProperties": false
}
}},{
"$ref": "#/definitions/attributeBase"
}]
},
"attributeString": {
"$id": "#attributeString",
"description": "Attribute schema when atribute type is string",
"type": "object",
"allOf": [
{
"properties": {
"type": {
"type": "string",
"enum": [
"STRING"
]
},
"options": {
"properties": {
"areOtherValuesAllowed": {},
"enum": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
}
}
},
{
"$ref": "#/definitions/attributeBase"
}
]
},
"attribute": {
"$id": "#attribute",
"description": "Attribute",
"type": "object",
"oneOf": [
{
"$ref": "#/definitions/attributeNumber"
},
{
"$ref": "#/definitions/attributeString"
}
]
}
},
"allOf": [
{
"$ref": "#/definitions/attribute"
}
]
}