mirror of
https://github.com/alexhopeoconnor/default.git
synced 2026-10-04 02:58:10 +10:00
Add JSON schema validation (#2539)
* Add JSON schema validation * fix version * move
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Schema for critical repositories",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"repository": {
|
||||
"type": "string",
|
||||
"pattern": "^[\\w\\.-]+\/[\\w\\.-]+$"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"link": {
|
||||
"type": "string",
|
||||
"format": "uri"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"repository",
|
||||
"reason",
|
||||
"link"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Schema for removed repositories",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"link": {
|
||||
"type": "string"
|
||||
},
|
||||
"reason": {
|
||||
"type": "string"
|
||||
},
|
||||
"removal_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"repository": {
|
||||
"type": "string",
|
||||
"pattern": "^[\\w\\.-]+\/[\\w\\.-]+$"
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
"removal_type",
|
||||
"repository"
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"$schema": "http://json-schema.org/draft-07/schema#",
|
||||
"title": "Shema for a repository list",
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "string",
|
||||
"pattern": "^[\\w\\.-]+\/[\\w\\.-]+$"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user