-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeasure.schema.json
57 lines (57 loc) · 2.49 KB
/
measure.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
{
"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/data/measure",
"$schema": "http://json-schema.org/draft-06/schema#",
"title": "Measure",
"type": "object",
"meta:extensible": false,
"description": "",
"definitions": {
"measure": {
"properties": {
"@type": {
"type": "string",
"format": "uri",
"description":
"Links to the `Metric` that this measure refers to. The `@type` can be omitted in contexts where it is obvious what metric is being referred to, for instance in the `Metrics` object that is keyed with `Metric` URIs."
},
"xdm:id": {
"title": "Unique Identifier",
"type": "string",
"minLength": 20,
"description":
"Unique identifier of the measure. In cases of data collection using lossy communication channels, such as mobile apps or websites with offline functionality, where transmission of measures cannot be ensured, this property contains a client-generated, unique ID of the measure taken. It is best practice to make this sufficiently long to ensure enough entropy. Additionally, if information such as time stamp, device ID, IP or MAC address, or other potentially user-identifying values are incorporated in the generation of the xdm:id, the result should be hashed, so that no PII is encoded in the value, as the goal is not to identify user or device, but the specific measure in time."
},
"xdm:value": {
"type": "number",
"description": "The quantifiable value of this measure."
},
"xdm:unit": {
"anyOf": [
{
"type": "string"
},
{
"const": null
}
],
"description":
"The (optional) unit that this measure's value is measured in. The `unit` in the `Measure` is purely informational, as the `unit` property of the referenced `Metric` determines the interpretation.",
"examples": ["m", "kg", "s", "USD"]
}
}
}
},
"allOf": [
{
"$ref": "#/definitions/measure"
}
],
"required": ["xdm:value"],
"meta:status": "stabilizing"
}