Skip to content

Commit

Permalink
Rewrite example schemas to use the "new" and simplified format
Browse files Browse the repository at this point in the history
  • Loading branch information
jesperweber committed May 8, 2023
1 parent 9f26710 commit da914ce
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 109 deletions.
15 changes: 5 additions & 10 deletions assets/schemas/migrationPageMetaData.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
// Example partial schema used for page meta data
"properties": {
"sourceEntityAlias": "{item.type}",
"sourceEntityName": "{item.type}",
"contentName": {
"type": "string",
"value": {
"$exp": "{item.p.metaData.name}"
}
}
}
"properties": {
"sourceEntityAlias": "{item.type}",
"sourceEntityName": "{item.type}",
"contentName": "{item.p.metaData.name}"
}
}
72 changes: 33 additions & 39 deletions assets/schemas/navigationHandle.json
Original file line number Diff line number Diff line change
@@ -1,45 +1,39 @@
{
// Example handle used for returning all routeable views
// Example handle used for returning all routeable views

"triggers": {
"demoCMS": [
"home"
]
"triggers": {
"demoCMS": [
"home"
]
},
"route": {
"handles": [
"navigation-{properties.metaData.culture}"
]
},
"properties": {
"self": {
"type": "reference",
"originId": "{originId}",
"alias": "navigationLinkItem"
},
"route": {
"handles": [
{
"$exp": "navigation-{properties.metaData.culture}"
}
]
},
"properties": {
"self": {
"type": "reference",
"originId": {
"$exp": "{originId}"
},
"view": "navigationLinkItem"
},
"children": {
"type": "array",
"input": {
"$lookup": {
"operator": "equals",
"sourceEntityType": "*",
"sourceEntityProperty": "originParentId",
"matchValue": {
"$exp": "{originId}"
}
}
},
"items": {
"type": "reference",
"gid": {
"$exp": "{item.id}"
},
"view": "navigationItem"
}
"children": {
"type": "array",
"input": {
"$lookup": {
"operator": "equals",
"sourceEntityType": "*",
"sourceEntityProperty": "originParentId",
"matchValue": {
"$exp": "{originId}"
}
}
},
"items": {
"type": "reference",
"gid": "{item.id}",
"alias": "navigationItem"
}
}
}
}
71 changes: 32 additions & 39 deletions assets/schemas/navigationItem.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,43 +11,36 @@
"person"
]
},
"environments": [],
"actions": [
{
"type": "process",
"originId": {
"$exp": "{originParentId}"
},
"schemaIds": []
}
],
"properties": {
"self": {
"type": "reference",
"originId": {
"$exp": "{originId}"
},
"view": "navigationLinkItem"
},
"children": {
"type": "array",
"input": {
"$lookup": {
"operator": "equals",
"sourceEntityType": "*",
"sourceEntityProperty": "originParentId",
"matchValue": {
"$exp": "{originId}"
}
}
},
"items": {
"type": "reference",
"gid": {
"$exp": "{item.id}"
},
"view": "navigationItem"
}
}
}
"actions": [
{
"type": "process",
"originId": "{originParentId}",
"alias": "navigationItem"
}
],
"properties": {
"self": {
"type": "reference",
"originId": "{originId}",
"alias": "navigationLinkItem"
},
"children": {
"type": "array",
"input": {
"$lookup": {
"operator": "equals",
"sourceEntityType": "*",
"sourceEntityProperty": "originParentId",
"matchValue": {
"$exp": "{originId}"
}
}
},
"items": {
"type": "reference",
"gid": "{item.id}",
"alias": "navigationItem"
}
}
}
}
26 changes: 5 additions & 21 deletions assets/schemas/navigationLinkItem.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,25 +11,9 @@
"person"
]
},
"environments": [],
"properties": {
"name": {
"type": "string",
"value": {
"$exp": "{properties.metaData.name}"
}
},
"url": {
"type": "string",
"value": {
"$exp": "{url}"
}
},
"lastModified": {
"type": "string",
"value": {
"$exp": "{properties.metaData.updateDate}"
}
}
}
"properties": {
"name": "{properties.metaData.name}",
"url": "{url}",
"lastModified": "{properties.metaData.updateDate}"
}
}

0 comments on commit da914ce

Please sign in to comment.