Commit 3f6d3755 by Eli Ben Baruch

For the airQuality microservice. currently only one api included

parent 35ea33e6
Showing with 103 additions and 0 deletions
# this is an example of the Uber API
# as a demonstration of an API spec in YAML
swagger: '2.0'
info:
title: AirQuality
description: Move your app forward with the AirQuality API
version: "1.0.0"
# the domain of the service
host: '62.90.235.105:8103'
# array of all schemes that your API supports
schemes:
- https
# will be prefixed to all paths
basePath: /airQuality/api/v1
produces:
- application/json
paths:
/{regionName}/status:
get:
summary: get the status information of each sensor in the region
description: |
get the status information of each sensor in the region
parameters:
- name: regionName
in: path
description: the name of the region. unique string identifier for the requested region.
required: true
type: string
responses:
200:
description: RestResponse
schema:
$ref: '#/definitions/StatusArrayRestResponse'
default:
description: Unexpected error
schema:
$ref: '#/definitions/Error'
definitions:
#######
StatusArrayRestResponse:
type: object
properties:
success:
type: boolean
error:
type: string
objectNode:
$ref: '#/definitions/SensorArray'
SensorArray:
properties:
items:
type: array
items:
$ref: "#/definitions/Sensor"
Sensor:
type: object
properties:
lat:
type: number
description: Latitude position of the sensor in decimal degrees
lon:
type: number
description: Longitude position of the sensor in decimal degrees
aqi:
type: number
description: air quality index
utime:
type: string
description: maybe update time
stamp:
type: number
description: timestamp
city:
type: string
description: name of the city
pol:
type: string
description: polutiion
tz:
type: string
description: time zone
x:
type: string
description: dont know
#######
Error:
type: object
properties:
code:
type: integer
format: int32
message:
type: string
fields:
type: string
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment