Skip to content

Commit

Permalink
Add hash extraction for each architecture to schema
Browse files Browse the repository at this point in the history
  • Loading branch information
r15ch13 committed Apr 15, 2017
1 parent b2b14a4 commit 7fc0aa8
Showing 1 changed file with 53 additions and 36 deletions.
89 changes: 53 additions & 36 deletions schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,52 @@
}
]
},
"hashExtraction": {
"additionalProperties": false,
"properties": {
"find": {
"format": "regex",
"type": "string"
},
"jp": {
"pattern": "^\\$\\..*$",
"type": "string"
},
"mode": {
"enum": [
"download",
"extract",
"json",
"rdf"
]
},
"type": {
"enum": [
"md5",
"sha1",
"sha256",
"sha512"
]
},
"url": {
"anyOf": [
{
"format": "uri",
"type": "string"
},
{
"pattern": "^\\$url.[\\w\\d]+$",
"type": "string"
},
{
"pattern": "^.*\\$url.*$",
"type": "string"
}
]
}
},
"type": "object"
},
"architecture": {
"additionalProperties": false,
"properties": {
Expand Down Expand Up @@ -85,6 +131,9 @@
"url": {
"format": "uri",
"type": "string"
},
"hash": {
"$ref": "#/definitions/hashExtraction"
}
},
"type": "object"
Expand All @@ -98,6 +147,9 @@
"url": {
"format": "uri",
"type": "string"
},
"hash": {
"$ref": "#/definitions/hashExtraction"
}
},
"type": "object"
Expand All @@ -109,42 +161,7 @@
"type": "string"
},
"hash": {
"additionalProperties": false,
"properties": {
"find": {
"format": "regex",
"type": "string"
},
"jp": {
"pattern": "^\\$\\..*$",
"type": "string"
},
"mode": {
"enum": [
"download",
"extract",
"json",
"rdf"
]
},
"url": {
"anyOf": [
{
"format": "uri",
"type": "string"
},
{
"pattern": "^\\$url.[\\w\\d]+$",
"type": "string"
},
{
"pattern": "^.*\\$url.*$",
"type": "string"
}
]
}
},
"type": "object"
"$ref": "#/definitions/hashExtraction"
},
"note": {
"$ref": "#/definitions/stringOrArrayOfStrings"
Expand Down

0 comments on commit 7fc0aa8

Please sign in to comment.