job type and schema
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-02-21 10:23:11 +01:00
parent c4cd7b35fc
commit de02d51100
3 changed files with 73 additions and 1 deletions

View File

@@ -34,6 +34,21 @@
}
]
}
},
"jobs": {
"type": "array",
"description": "list of jobs in this project",
"items": {
"oneOf": [
{
"$comment": "for include tag",
"type": "string"
},
{
"$ref": "job.json"
}
]
}
}
},
"required": ["namespace"]

View File

@@ -0,0 +1,27 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSON Schema WMBasic cronjob configuration",
"description": "WMBasic cronjob linter",
"type": "object",
"additionalProperties": false,
"properties": {
"meta": {
"type": "object",
"description": "meta object used to pass parameters to identify cronjob",
"additionalProperties": true
},
"cron": {
"type": "string",
"description": "cronjob time/interval specification"
},
"type": {
"const": "javascript",
"description": "type of job"
},
"file": {
"type": "string",
"description": "javascript file relative to config.yml"
}
},
"required": ["type", "file"]
}