openapi: 3.0.0
info:
  title: home-iot-apiuu
  description: |-
    The API for the EatBacon IOT project
    Das ist ein test
  version: 1.0.0
servers:
- url: https://virtserver.swaggerhub.com/datamatsoftwaredevel/datamat_cloudx/1.0.0
  description: SwaggerHub API Auto Mocking
paths:
  /devices:
    get:
      tags:
      - Device
      description: returns all registered devices
      operationId: getDevices
      parameters:
      - name: skip
        in: query
        description: number of records to skip
        required: false
        schema:
          type: integer
          format: int32
      - name: limit
        in: query
        description: max number of records to return
        required: false
        schema:
          type: integer
          format: int32
      responses:
        "200":
          description: All the devices
          content:
            application/json:
              schema:
                type: array
                items:
                  type: string
                  format: uri
                  example: http://10.0.0.225:8080
    post:
      tags:
      - Device
      operationId: register
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DeviceRegistrationInfo'
      responses:
        "200":
          description: successfully registered device
components:
  schemas:
    DeviceState:
      type: object
      properties:
        id:
          type: string
        name:
          type: string
        lastUpdate:
          type: string
          format: date-time
        level:
          type: integer
          format: int32
    DeviceRegistrationInfo:
      type: object
      properties:
        uri:
          type: string
          format: uri
          example: http://10.0.0.220:8080
        id:
          type: string
          format: uuid
          example: 0729a580-2240-11e6-9eb5-0002a5d5c51b
