forked from hbacila/xdm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
relationshipdescriptor.schema.json
72 lines (72 loc) · 3.01 KB
/
relationshipdescriptor.schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
"meta:license": [
"Copyright 2018 Adobe Systems Incorporated. All rights reserved.",
"This work is licensed under a Creative Commons Attribution 4.0 International (CC BY 4.0) license",
"you may not use this file except in compliance with the License. You may obtain a copy",
"of the License at https://creativecommons.org/licenses/by/4.0/"
],
"$id": "https://ns.adobe.com/xdm/common/descriptors/relationshipdescriptor",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Relationship Descriptor",
"meta:extensible": true,
"meta:extends": [
"https://ns.adobe.com/xdm/common/descriptors/schemadescriptor#/definitions/descriptor"
],
"meta:abstract": false,
"type": "object",
"description": "A descriptor that describes a relationship between two schemas, a 'source' and a 'destination'. This relationship may be directly between the schemas, or between specific properties of the schemas. Relationship descriptors may be used to describe foreign key relationships between schemas, defining a relational model or star schema.",
"definitions": {
"relationshipdescriptor": {
"properties": {
"xdm:destinationSchema": {
"title": "Destination Schema",
"type": "string",
"format": "uri",
"description": "The destination schema this descriptor applies to"
},
"xdm:destinationProperty": {
"title": "Destination Property",
"type": "string",
"description": "When present, the property of the destination schema to which this descriptor applies. This value is a JSON Pointer, applied to an instance of an object described by 'xdm:destSchema'"
},
"xdm:destinationItem": {
"title": "Destination Item",
"description": "When present, the selector used to match a specific item in the array pointed to by destProperty",
"$ref": "https://ns.adobe.com/xdm/common/descriptors/itemselector#/definitions/selector"
},
"xdm:destinationVersion": {
"title": "Destination Version",
"type": "number",
"description": "Major version being referenced."
},
"xdm:sourceValue": {
"title": "Source Value",
"type": "string",
"description": "When present, provides additional information about the values in that field. Descriptor producer and consumer should coordinate on how to use this field, e.g. defining rules on formats, values, and operations."
},
"xdm:label": {
"title": "Label",
"type": "string"
}
},
"oneOf": [
{
"required": ["xdm:label"]
},
{
"required": ["xdm:sourceProperty"]
}
],
"required": ["xdm:destinationSchema", "xdm:destinationVersion"]
}
},
"allOf": [
{
"$ref": "https://ns.adobe.com/xdm/common/descriptors/schemadescriptor#/definitions/descriptor"
},
{
"$ref": "#/definitions/relationshipdescriptor"
}
],
"meta:status": "stabilizing"
}