Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Approved: Timestamp Proposal 2017-08-24
- Loading branch information
Showing
2 changed files
with
66 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{ | ||
"id": "http://openinterconnect.org/iotdatamodels/schemas/oic.r.time.stamp.json#", | ||
"$schema": "http://json-schema.org/draft-04/schema#", | ||
"description" : "Copyright (c) 2017, 2018 Open Connectivity Foundation, Inc. All rights reserved.", | ||
"title": "Observed Time", | ||
"definitions": { | ||
"oic.r.time.stamp": { | ||
"type": "object", | ||
"properties": { | ||
"timestamp": { | ||
"type": "string", | ||
"format": "date-time", | ||
"description": "An RFC3339 formated time indicating when the data was observed (e.g.: 2016-02-15T09:19Z, 1996-12-19T16:39:57-08:00)", | ||
"readOnly": true | ||
} | ||
} | ||
} | ||
}, | ||
"type": "object", | ||
"allOf": [ | ||
{"$ref": "oic.baseResource.json#/definitions/oic.r.baseresource"}, | ||
{"$ref": "#/definitions/oic.r.time.stamp"} | ||
], | ||
"required": ["timestamp"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#%RAML 0.8 | ||
title: TimeStamp | ||
version: v1.1.0-20170830 | ||
documentation: | ||
- title: (c) 2017, 2018 Open Connectivity Forum, Inc. All rights reserved. | ||
content: | | ||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: | ||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. | ||
THIS SOFTWARE IS PROVIDED BY THE OPEN INTERCONNECT CONSORTIUM, INC. "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE OR WARRANTIES OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE OPEN INTERCONNECT CONSORTIUM, INC. OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
schemas: | ||
- TimeStamp: !include oic.r.time.stamp.json | ||
|
||
traits: | ||
- interface: | ||
queryParameters: | ||
if: | ||
enum: ["oic.if.s","oic.if.r","oic.if.baseline"] | ||
|
||
/TimeStampResURI: | ||
description: | | ||
This resource describes the properties associated with a timestamp. | ||
TimeStamp is a string that captures the timestamp using the RFC3339 datetime format (e.g: 2007-04-05T14:30Z) (Time+Date+Timezone) | ||
displayName: Time Stamp | ||
is: [ interface ] | ||
get: | ||
description: | | ||
Retrieves the current timestamp data. | ||
responses: | ||
200: | ||
body: | ||
application/json: | ||
schema: TimeStamp | ||
example: | | ||
{ | ||
"rt": ["oic.r.time.stamp"], | ||
"id": "unique_example_id", | ||
"timestamp": "2015-11-05T14:30Z" | ||
} | ||