Skip to content

Commit

Permalink
Approved: Rename 'units' to avoid conflict in bodymetrics
Browse files Browse the repository at this point in the history
  • Loading branch information
marktrayer authored and oneIoTa Admin committed Jul 8, 2016
1 parent a51c144 commit 6d2b8f5
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 30 deletions.
8 changes: 4 additions & 4 deletions bodyHeight.raml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ traits:
"rt": ["oic.r.body.height"],
"id": "unique_example_id",
"height": 180,
"units": "cm",
"heightunits": "cm",
"observedtime": "2016-02-15T09:19Z"
}
post:
Expand All @@ -52,7 +52,7 @@ traits:
{
"id": "unique_example_id",
"height": 75,
"units": "inch"
"heightunits": "inch"
}
responses:
200:
Expand All @@ -66,7 +66,7 @@ traits:
{
"id": "unique_example_id",
"height": 75,
"units": "inch",
"heightunits": "inch",
"observedtime": "2016-02-15T09:19Z"
}
403:
Expand All @@ -80,6 +80,6 @@ traits:
{
"id": "unique_example_id",
"height": 75,
"units": "inch",
"heightunits": "inch",
"observedtime": "2016-02-15T09:19Z"
}
2 changes: 1 addition & 1 deletion bodyWeight.raml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ traits:
"rt": ["oic.r.body.weight"],
"id": "unique_example_id",
"weight": 80,
"units": "kg",
"weightunits": "kg",
"observedtime": "2016-02-15T09:19Z"
}
25 changes: 14 additions & 11 deletions oic.r.body.height.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,20 @@
"definitions": {
"oic.r.body.height": {
"type": "object",
"properties": {
"$ref": "oic.r.height.json#/definitions/oic.r.height",
"units": {
"enum": ["cm", "inch"],
"description": "Unit of a person's height"
},
"observedtime": {
"type": "string",
"description": "ReadOnly, An ISO8601 format time indicating when the data is observed (ex: 2016-02-15T09:19Z)"
"allOf": [
{"$ref": "oic.r.height.json#/definitions/oic.r.height"},
{"properties": {
"heightunits": {
"enum": ["cm", "inch"],
"description": "Unit of a person's height"
},
"observedtime": {
"type": "string",
"description": "ReadOnly, An ISO8601 format time indicating when the data is observed (ex: 2016-02-15T09:19Z)"
}
}
}
}
]
}
},
"type": "object",
Expand All @@ -25,5 +28,5 @@
{"$ref": "oic.baseResource.json#/definitions/oic.r.baseresource"},
{"$ref": "#/definitions/oic.r.body.height"}
],
"required": ["height", "units"]
"required": ["height", "heightunits"]
}
27 changes: 15 additions & 12 deletions oic.r.body.weight.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,21 @@
"definitions": {
"oic.r.body.weight": {
"type": "object",
"properties": {
"$ref": "oic.r.weight.json#/definitions/oic.r.weight",
"units": {
"type": "string",
"enum": ["kg", "lb"],
"description": "ReadOnly, Unit of a person's weight"
},
"observedtime": {
"type": "string",
"description": "ReadOnly, An ISO8601 format time indicating when the data is observed (ex: 2016-02-15T09:19Z)"
"allOf": [
{"$ref": "oic.r.weight.json#/definitions/oic.r.weight"},
{"properties": {
"weightunits": {
"type": "string",
"enum": ["kg", "lb"],
"description": "ReadOnly, Unit of a person's weight"
},
"observedtime": {
"type": "string",
"description": "ReadOnly, An ISO8601 format time indicating when the data is observed (ex: 2016-02-15T09:19Z)"
}
}
}
}
]
}
},
"type": "object",
Expand All @@ -26,5 +29,5 @@
{"$ref": "oic.baseresource.json#/definitions/oic.r.baseresource"},
{"$ref": "#/definitions/oic.r.body.weight"}
],
"required": ["weight", "units"]
"required": ["weight", "weightunits"]
}
2 changes: 1 addition & 1 deletion oic.r.height.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "http://openinterconnect.org/schemas/oic.r.height#",
"id": "http://openinterconnect.org/schemas/oic.r.height.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.",
"title": "Height",
Expand Down
2 changes: 1 addition & 1 deletion oic.r.weight.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"id": "http://openinterconnect.org/schemas/oic.r.weight#",
"id": "http://openinterconnect.org/schemas/oic.r.weight.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"description": "Copyright (c) 2016 Open Interconnect Consortium, Inc. All rights reserved.",
"title": "Weight",
Expand Down

0 comments on commit 6d2b8f5

Please sign in to comment.