Skip to content

Instantly share code, notes, and snippets.

@bdelacretaz
Last active January 12, 2018 14:31
Show Gist options
  • Save bdelacretaz/5a522d138efabb131f0357594a469558 to your computer and use it in GitHub Desktop.
Save bdelacretaz/5a522d138efabb131f0357594a469558 to your computer and use it in GitHub Desktop.
Example RTD-X resource definition for a blog post
# RTD-X model for our example blog post
name: Blog Post
description: RTD-X sample Blog Post
# which resource types are accepted in a POST
# to this resource to create child resources
post-here:
- rtdx/samples/2018/blog/folder
- rtdx/samples/2018/blog/imagefolder
# properties of the blog post, validated
# by RTD-X before storing
properties:
- title:
- type: rtdx:string
- label: Title
- required: true
- text:
- type: rtdx:richtext
- label: Text
- required: true
# default access control after creation
permissions:
- "deny all for everybody"
- "allow read for everybody"
- "allow all for user ${owner}"
# default aggregation of sub-resources when
# reading this resource.
# stop-at indicates where to stop recursing
aggregation:
- strategy: recursive
- stop-at: rtdx/samples/2018/blog/folder
- stop-at: rtdx/samples/2018/blog/post
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment