Added JSON schema, prettify apps.json in build

main
Elbert Alias 10 years ago
parent b991fb1a6d
commit f1f777dfd5

@ -16,6 +16,10 @@ then
exit 1
fi
echo "Prettifying apps.json..."
jsonlint -ist $'\t' $WAPPALYZER_ROOT/src/apps.json
wappalyzer links
# Mozilla Firefox

@ -31,7 +31,7 @@ echo "Validating apps.json..."
echo -en "${color_err}"
jsonlint --quiet $path/apps.json
jsonlint --quiet -V $WAPPALYZER_ROOT/schema.json $path/apps.json
if [ $? -eq 0 ]
then

@ -0,0 +1,82 @@
{
"title": "Wappalyzer Schema",
"type": "object",
"additionalProperties": false,
"properties": {
"categories": {
"type": "object",
"required": true,
"additionalProperties": false,
"patternProperties": {
"^[0-9]+$": {
"type": "string"
}
}
},
"apps": {
"type": "object",
"required": true,
"additionalProperties": {
"additionalProperties": false,
"properties": {
"cats": {
"type": "array",
"items": {
"type": "number"
},
"required": true
},
"env": {
"type": [ "string", "array" ],
"items": {
"type": "string"
}
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"html": {
"type": [ "string", "array" ],
"items": {
"type": "string"
}
},
"excludes": {
"type": [ "string", "array" ],
"items": {
"type": "string"
}
},
"implies": {
"type": [ "string", "array" ],
"items": {
"type": "string"
}
},
"meta": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"script": {
"type": [ "string", "array" ],
"items": {
"type": "string"
}
},
"url": {
"type": "string"
},
"website": {
"type": "string",
"required": true
}
}
}
}
}
}

File diff suppressed because it is too large Load Diff