Skip to content

Instantly share code, notes, and snippets.

@ridomin
Created May 12, 2022 02:05
Show Gist options
  • Save ridomin/fb632f2c6bf1d38d0dc239645799973d to your computer and use it in GitHub Desktop.
Save ridomin/fb632f2c6bf1d38d0dc239645799973d to your computer and use it in GitHub Desktop.
memmon.swagger
openapi: '3.0.2'
info:
title: MyIoTAPI
version: '1.0'
paths:
/readDeviceInfo:
get:
operationId: "readDeviceInfo"
responses:
"200":
description: "ok"
content:
application/json:
schema:
$ref: "#/components/schemas/DeviceInformation"
/interval:
get:
operationId: readPropertyInterval
responses:
'200':
description: Expected valid response
content:
application/json:
schema:
type: integer
post:
operationId: updatePropertyInterval
requestBody:
description: desiredInterval
required: true
content:
application/json:
schema:
type: integer
responses:
'200':
description: Property Accepted
content:
application/json:
schema:
$ref: "#/components/schemas/ackFormat"
/enabled:
get:
operationId: readPropertyEnabled
responses:
'200':
description: Expected valid response
content:
application/json:
schema:
type: boolean
post:
operationId: updatePropertyEnabled
requestBody:
description: desiredEnabled
required: true
content:
application/json:
schema:
type: boolean
responses:
'200':
description: Property Accepted
content:
application/json:
schema:
$ref: "#/components/schemas/ackFormat"
/getRuntimeStats:
get:
operationId: commandGetRunTimeStats
parameters:
- name: mode
in: query
required: true
schema:
type: integer
format: int32
responses:
'200':
description: command executed
content:
application/json:
schema:
type: object
additionalProperties:
type: string
components:
schemas:
ackFormat:
type: object
properties:
ac:
type: integer
ad:
type: string
av:
type: integer
value:
type: object
DeviceInformation:
type: object
properties:
manufacturer:
type: string
model:
type: string
osName:
type: string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment