#%RAML 0.8
title: WWST Dust sensor level
version: v1.0.0-20170911
schemas:
- DustLevel: |
    {
      "id": "http://openinterconnect.org/iotdatamodels/schemas/x.com.st.dustlevel.json#",
      "$schema": "http://json-schema.org/draft-04/schema#",
      "description" : "Copyright (c) 2016, 2017 Open Connectivity Foundation, Inc. All rights reserved.",
      "title": "Air Quality Sensor Level",
      "definitions": {
    "x.com.st.dustlevel": {
      "type": "object",
      "properties": {
        "fineDustLevel": {
          "type": "number",
          "description": "A value representation of PM 2.5, micrograms per cubic meter"
        },
        "dustLevel": {
          "type": "number",
          "description": "A value representation of PM 10, micrograms per cubic meter"
        }
      }
    }
      },
      "type": "object",
      "allOf": [
    {"$ref": "oic.baseResource.json#/definitions/oic.r.baseresource"},
    {"$ref": "#/definitions/x.com.st.dustlevel"}
      ],
      "required": ["fineDustLevel", "dustLevel"]
    }

traits:
  - interface:
      queryParameters:
        if:
          enum: ["oic.if.s","oic.if.baseline"]

/WWSTDustsensorlevelesURI:
  description: |
        Dust sensor level
  displayName: WWST Dust sensor level
  is: [ interface ]

  get:
    description: |
      Retrieves the current Dust sensor level
    responses:
      200:
        body:
          application/json:
            schema: DustLevel
            example: |
              {
                "rt":             ["x.com.st.dustlevel"],
                "id":             "unique_example_id",
                "fineDustLevel" : 10,
                "dustLevel" : 10
              }
