assets in schema

This commit is contained in:
Sebastian Frank 2022-11-18 16:26:45 +00:00
parent c7a3d26f42
commit dcfde495c7
Signed by: apairon
GPG Key ID: 9A9F8F10A937E426
3 changed files with 43 additions and 1 deletions

View File

@ -7,4 +7,8 @@ meta:
# Liste aller möglichen Kollektionen (Listen, Seiten...) zum Projekt
collections:
- !include collections/mycol.yml
- !include collections/mycol.yml
assets:
- name: _dist_
path: ../frontend/_dist_

View File

@ -0,0 +1,23 @@
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "JSON Schema tibi-server assets configuration",
"description": "tibi-server assets linter",
"type": "object",
"additionalProperties": false,
"patternProperties": {
"^x\\-": {
"description": "template property"
}
},
"properties": {
"name": {
"type": "string",
"description": "name, used in url ../NAMESPACE/_/assets/NAME"
},
"path": {
"type": "string",
"description": "path relative to config.yml"
}
},
"required": ["name", "path"]
}

View File

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