@rline/json
Version:
JSON Schema compiler
103 lines • 3.14 kB
JSON
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "CommonPropertyOptions",
"allOf": [
{
"$ref": "#/definitions/General"
},
{
"$ref": "#/definitions/Transform"
},
{
"$ref": "#/definitions/Validation"
},
{
"$ref": "#/definitions/Encryption"
},
{
"$ref": "#/definitions/Dto"
}
],
"definitions": {
"General": {
"type": "object",
"properties": {
"name": {
"$ref": "../name/property-name.schema.json"
},
"type": {
"$ref": "../enum/property-type.schema.json"
},
"description": {
"type": "string"
},
"required": {
"type": "boolean",
"default": true
},
"unique": {
"type": "boolean",
"default": true
}
}
},
"Transform": {
"type": "object",
"properties": {
"acceptString": {
"type": "boolean",
"description": "transform string values into the actual type before any operations",
"default": true
}
}
},
"Validation": {
"type": "object",
"properties": {
"equalToProperty": {
"$ref": "../name/property-name.schema.json",
"description": "Check the value is equal to the value of the property"
},
"notEqualToProperty": {
"$ref": "../name/property-name.schema.json",
"description": "Check the value is not equal to the value of the property"
}
}
},
"Encryption": {
"type": "object",
"properties": {
"hash": {
"type": "boolean",
"default": true
},
"encrypt": {
"type": "boolean",
"default": true
}
}
},
"Dto": {
"type": "object",
"properties": {
"write": {
"type": "boolean",
"description": "Is the property writable or internal"
},
"read": {
"type": "boolean",
"description": "Is the property visible in the data load?",
"default": true
},
"udpate": {
"type": "boolean",
"description": "Is proprety updatable?",
"default": true
}
}
}
},
"required": [
"type"
]
}