Skip to content

Instantly share code, notes, and snippets.

@grebaldi
Created March 30, 2016 07:18
Show Gist options
  • Save grebaldi/d829be1ebc5ee9d8d3735950f990b1be to your computer and use it in GitHub Desktop.
Save grebaldi/d829be1ebc5ee9d8d3735950f990b1be to your computer and use it in GitHub Desktop.
YAML Schema validation for Flow\Neos
#
# NodeTypes
#
'*':
reference: 'nodeTypeName'
type: shape
options:
shape:
'abstract': { type: bool }
'final': { type: bool }
'superTypes':
type: object
options:
of: { type: bool }
keys:
validate:
validator: 'MatchReference'
options: { reference: 'nodeTypeName', excludeParents: true }
'childNodes':
type: object
options:
of:
type: shape
options:
shape:
'type':
type: string
validate:
validator: 'MatchReference'
options: { reference: 'nodeTypeName', excludeParents: true }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment