Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 22 additions & 12 deletions json-schema/web_assets.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,49 @@
"type": "object",
"properties": {
"name": {
"description": "The name of the asset item, eg: com_foo.bar",
"type": "string",
"pattern": "[a-zA-Z0-9\\_\\-\\.]"
},
"dependencies": {
"type": "array",
"contains": {
"type": "string"
}
"type": {
"description": "The type of the asset item",
"type": "string",
"enum": ["style", "script", "preset"]
},
"js": {
"dependencies": {
"description": "A list of the item dependencies",
"type": "array",
"contains": {
"type": "string"
}
},
"css": {
"type": "array",
"contains": {
"type": "string"
}
"uri": {
"description": "File uri/path string, full or relative to 'media/' folder, eg: com_foo/bar.js",
"type": "string"
},
"attribute": {
"description": "The item attributes",
"type": "object"
},
"namespace": {
"description": "Namespace of a class that will be loaded with this item",
"type": "string"
},
"class": {
"description": "Class name that will be loaded with this item",
"type": "string",
"pattern": "[a-zA-Z0-9\\_]"
},
"version": {
"description": "Version of the asset item",
"type": "string"
},
"webcomponent": {
"description": "A boolean flag set to 'true' if the asset item is a WebComponent, otherwise can be ignored",
"type": "boolean"
}
},
"required": ["name"]
"required": ["name", "type"]
}
},

Expand Down