#%RAML 0.8
title: STAccelerationSensor
version: v1.1.1-20161123
schemas:
- AccelerationSensor: |
    {
      "id": "http://www.samsung.com/schemas/x.com.st.acceleration.json#",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "description" : "Copyright (c) 2016, SmartThings. All rights reserved.",
      "title": "Acceleration Sensor",
      "definitions": {
        "x.com.st.acceleration": {
          "type": "object",
          "properties": {
            "acceleration": {
              "type": "string",
              "readOnly": true,
              "enum": ["active", "inactive"],
              "description": "Sensed value of acceleration"
            }
          }
        }
      },
      "type": "object",
      "allOf": [
        {"$ref": "oic.core.json#/definitions/oic.core"},
        {"$ref": "oic.baseResource.json#/definitions/oic.r.baseresource"},
        {"$ref": "#/definitions/x.com.st.acceleration"}
      ],
      "required": ["acceleration"]
    }
traits:
 - interface :
     queryParameters:
       if:
         enum: ["oic.if.s", "oic.if.baseline"]

/AccelerationURI:
  description: |
    This resource implements acceleration sensor capability from SmartThings.
  displayName: Acceleration Sensor

  is : ['interface']
  get:
    description: |
      Retrieves the current value of acceleration

    responses :
      200:
        body:
          application/json:
            schema: AccelerationSensor
            example: |
              {
                "rt": ["x.com.st.acceleration"],
                "id": "unique_example_id",
                "acceleration": "active"
              }
