-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlink.schema.json
115 lines (115 loc) · 5.72 KB
/
link.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
{
"meta:license": [
"Copyright 2017 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/"
],
"$schema": "http://json-schema.org/draft-06/schema#",
"$id": "https://ns.adobe.com/xdm/external/activity-streams-2/link",
"title": "Link",
"definitions": {
"single-value": {
"anyOf": [
{
"type": "string",
"format": "uri"
},
{
"$ref": "https://ns.adobe.com/xdm/external/activity-streams-2/object"
},
{
"$ref": "https://ns.adobe.com/xdm/external/activity-streams-2/link"
}
]
},
"multiple-values": {
"items": {
"$ref": "#/definitions/single-value"
},
"type": "array"
},
"object-or-link-or-array-of-object-or-link": {
"oneOf": [
{
"$ref": "#/definitions/single-value"
},
{
"$ref": "#/definitions/multiple-values"
}
]
}
},
"type": "object",
"description":
"A Link is an indirect, qualified reference to a resource identified by a URL. The fundamental model for links is established by [RFC5988](https://tools.ietf.org/html/rfc5988). Many of the properties defined by the Activity Vocabulary allow values that are either instances of `[Object](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-object)` or `[Link](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-link)`. When a `[Link](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-link)` is used, it establishes a [qualified relation](http://patterns.dataincubator.org/book/qualified-relation.html) connecting the subject (the containing object) to the resource identified by the `[href](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-href)`. Properties of the `[Link](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-link)` are properties of the reference as opposed to properties of the resource.",
"properties": {
"activitystreams:href": {
"description":
"The target resource pointed to by a Link. Refer to the [Activity Streams 2.0 Core](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-href) document for a complete description.",
"type": "string",
"format": "uri"
},
"activitystreams:rel": {
"title": "Link Relation",
"description":
"A link relation associated with a `[Link](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-link)`. The value _MUST_ conform to both the [HTML5](https://www.w3.org/TR/html5/) and [RFC5988](https://tools.ietf.org/html/rfc5988) 'link relation' definitions. In the [HTML5](https://www.w3.org/TR/html5/), any string not containing the 'space' U+0020, 'tab' (U+0009), 'LF' (U+000A), 'FF' (U+000C), 'CR' (U+000D) or ',' (U+002C) characters can be used as a valid link relation.",
"oneOf": [
{
"type": "string",
"pattern": "^[a-z]([a-z]|[0-9]|\\.|-)*$"
},
{
"type": "array",
"items": {
"type": "string",
"pattern": "^[a-z]([a-z]|[0-9]|\\.|-)*$"
}
}
]
},
"activitystreams:mediaType": {
"description":
"When used on a Link, identifies the MIME media type of the referenced resource. When used on an Object, identifies the MIME media type of the value of the content property. If not specified, the content property is assumed to contain text/html content. Refer to the [Activity Streams 2.0 Core](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-mediatype) document for a complete description.",
"$ref":
"https://ns.adobe.com/xdm/external/activity-streams-2/object#/definitions/mime-media-type"
},
"activitystreams:name": {
"description":
"Refer to the [Activity Streams 2.0 Core](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-name) document for a complete description.",
"oneOf": [
{
"type": "string"
},
{
"$ref":
"https://ns.adobe.com/xdm/external/activity-streams-2/rdf-langstring"
}
]
},
"activitystreams:hreflang": {
"description":
"Hints as to the language used by the target resource. Value must be a [BCP47] Language-Tag. Refer to the [Activity Streams 2.0 Core](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-hreflang) document for a complete description.",
"$ref":
"https://ns.adobe.com/xdm/external/activity-streams-2/rdf-langstring#/definitions/tag"
},
"activitystreams:height": {
"description":
"On a Link, specifies a hint as to the rendering height in device-independent pixels of the linked resource. Refer to the [Activity Streams 2.0 Core](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-height) document for a complete description.",
"type": "integer",
"minimum": 0
},
"activitystreams:width": {
"description":
"On a Link, specifies a hint as to the rendering width in device-independent pixels of the linked resource. Refer to the [Activity Streams 2.0 Core](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-width) document for a complete description.",
"type": "integer",
"minimum": 0
},
"activitystreams:preview": {
"description":
"Identifies an entity that provides a preview of this object. Refer to the [Activity Streams 2.0 Core](https://www.w3.org/TR/activitystreams-vocabulary/#dfn-preview) document for a complete description.",
"$ref": "#/definitions/object-or-link-or-array-of-object-or-link"
}
},
"meta:status": "experimental"
}