Skip to content

Commit

Permalink
Revert "Issue 555 refactor measures to use descriptors"
Browse files Browse the repository at this point in the history
  • Loading branch information
kstreeter authored Jan 8, 2019
1 parent 476b02a commit b75c91a
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion schemas/data/measure.description.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
A measure is a concrete quantifiable data point of a particular metric.

It has a value, and a unique identifier.
It has a value, and optionally a unit, although the unit can be inferred from the measure's metric.
2 changes: 2 additions & 0 deletions schemas/data/measure.example.1.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{
"@type": "https://ns.adobe.com/xdm/data/example-metric",
"xdm:unit": null,
"xdm:value": 175
}
19 changes: 19 additions & 0 deletions schemas/data/measure.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@
"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",
Expand All @@ -23,6 +29,19 @@
"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"]
}
}
}
Expand Down

0 comments on commit b75c91a

Please sign in to comment.