Simplify schema.json using definitions/refs

Signed-off-by: Kingthorin <kingthorin@users.noreply.github.com>
main
Kingthorin 5 years ago
parent 0e6555836d
commit 987703e68d

@ -1,5 +1,11 @@
{
"title": "Wappalyzer Schema",
"definitions": {
"non-empty-non-blank-sting": {
"type": "string",
"pattern": "^(?!\\s*$).+"
}
},
"type": "object",
"additionalProperties": false,
"required": ["categories","apps"],
@ -39,8 +45,7 @@
"minItems": 1
},
"cpe": {
"type": "string",
"pattern": "^(?!\\s*$).+"
"$ref": "#/definitions/non-empty-non-blank-sting"
},
"cookies": {
"type": "object",
@ -80,13 +85,11 @@
{
"type": "array",
"items": {
"type": "string",
"pattern": "^(?!\\s*$).+"
"$ref": "#/definitions/non-empty-non-blank-sting"
}
},
{
"type": "string",
"pattern": "^(?!\\s*$).+"
"$ref": "#/definitions/non-empty-non-blank-sting"
}
]
},
@ -95,13 +98,11 @@
{
"type": "array",
"items": {
"type": "string",
"pattern": "^(?!\\s*$).+"
"$ref": "#/definitions/non-empty-non-blank-sting"
}
},
{
"type": "string",
"pattern": "^(?!\\s*$).+"
"$ref": "#/definitions/non-empty-non-blank-sting"
}
]
},
@ -110,13 +111,11 @@
{
"type": "array",
"items": {
"type": "string",
"pattern": "^(?!\\s*$).+"
"$ref": "#/definitions/non-empty-non-blank-sting"
}
},
{
"type": "string",
"pattern": "^(?!\\s*$).+"
"$ref": "#/definitions/non-empty-non-blank-sting"
}
]
},
@ -136,27 +135,22 @@
{
"type": "array",
"items": {
"type": "string",
"pattern": "^(?!\\s*$).+"
"$ref": "#/definitions/non-empty-non-blank-sting"
}
},
{
"type": "string",
"pattern": "^(?!\\s*$).+"
"$ref": "#/definitions/non-empty-non-blank-sting"
}
]
},
"url": {
"type": "string",
"pattern": "^(?!\\s*$).+"
"$ref": "#/definitions/non-empty-non-blank-sting"
},
"website": {
"type": "string",
"pattern": "^(?!\\s*$).+"
"$ref": "#/definitions/non-empty-non-blank-sting"
},
"icon": {
"type": "string",
"pattern": "^(?!\\s*$).+"
"$ref": "#/definitions/non-empty-non-blank-sting"
}
}
}