clay-schemas
v4.1.1
Published
Schemas for ClayDB
Downloads
96
Readme
clay-schemas
Schemas for ClayDB
Installation
$ npm install clay-schemas --save
Schemas
- entity_schema.json - Schema for entity object
- policy_schema.json - Schema for policy object
- resource_schema.json - Schema for resource object
Examples
Example Entity
{
"id": "9a9cfbd9e15447239c1b5434c7b9ab27",
"$$at": "2017-03-03T02:35:04.349Z"
}
Example Policy
{
"username": {
"type": "STRING",
"minLength": 2,
"required": true,
"unique": true
},
"birthday": {
"type": "DATE"
},
"createdAt": {
"type": "DATE",
"default": "2012/12/12"
},
"orgId": {
"type": "STRING"
},
"memberIndex": {
"type": "NUMBER",
"uniqueFor": [
"orgId"
]
},
"pointer01": {
"type": [
"REF",
"ENTITY"
]
}
}
Example Resource
{
"name": "example-users",
"domain": "example.com",
"description": "Example resource of users"
}
License
This software is released under the Apache-2.0 License.