Skip to content

Commit

Permalink
fix package.json schema for pages/main-pages (#5682)
Browse files Browse the repository at this point in the history
Co-authored-by: Gregor Harlan <330436+gharlan@users.noreply.github.com>
  • Loading branch information
staabm and gharlan committed Apr 2, 2023
1 parent 6c17f86 commit b107054
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 25 deletions.
2 changes: 1 addition & 1 deletion redaxo/src/core/boot.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
require_once rex_path::core('functions/function_rex_other.php');

// ----------------- VERSION
rex::setProperty('version', '5.15.1');
rex::setProperty('version', '5.15.2-dev');

$cacheFile = rex_path::coreCache('config.yml.cache');
$configFile = rex_path::coreData('config.yml');
Expand Down
88 changes: 64 additions & 24 deletions redaxo/src/core/schemas/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@
},
"additionalProperties": true,
"definitions": {
"page": {
"page-base": {
"type": "object",
"required": ["title"],
"properties": {
Expand Down Expand Up @@ -240,39 +240,79 @@
},
"additionalProperties": false
}
}
},
"page": {
"allOf": [
{
"$ref": "#/definitions/page-base"
}
],
"properties": {
"title": true,
"hidden": true,
"hasLayout": true,
"hasNavigation": true,
"popup": true,
"pjax": true,
"perm": true,
"icon": true,
"href": true,
"itemAttr": true,
"itemClass": true,
"linkAttr": true,
"linkClass": true,
"path": true,
"subPath": true,
"subpages": true
},
"additionalProperties": false
},
"main-page": {
"allOf": [
{
"$ref": "#/definitions/page"
"$ref": "#/definitions/page-base"
}
],
"properties": {
"title": true,
"hidden": true,
"hasLayout": true,
"hasNavigation": true,
"popup": true,
"pjax": true,
"perm": true,
"icon": true,
"href": true,
"itemAttr": true,
"itemClass": true,
"linkAttr": true,
"linkClass": true,
"path": true,
"subPath": true,
"subpages": true,
"main": {
"description": "Whether it is a main page",
"type": "boolean",
"default": true
},
{
"properties": {
"main": {
"description": "Whether it is a main page",
"type": "boolean",
"default": true
},
"block": {
"description": "Block name",
"anyOf": [
{
"enum": ["system", "addons"]
},
{
"type": "string"
}
]
"block": {
"description": "Block name",
"anyOf": [
{
"enum": ["system", "addons"]
},
"prio": {
"description": "Page prio",
"type": "integer"
{
"type": "string"
}
}
]
},
"prio": {
"description": "Page prio",
"type": "integer"
}
]
},
"additionalProperties": false
}
}
}

0 comments on commit b107054

Please sign in to comment.