Removed unnecessary extra layer in resource folder structure.
This commit is contained in:
parent
94485b5633
commit
d8a1b66738
190 changed files with 11 additions and 11 deletions
249
hal-core/resources/web/api/openapi.json
Normal file
249
hal-core/resources/web/api/openapi.json
Normal file
|
|
@ -0,0 +1,249 @@
|
|||
{
|
||||
"components": {
|
||||
"schemas": {
|
||||
"eventClass": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "object",
|
||||
"$ref": "#/components/schemas/dataClass"
|
||||
},
|
||||
"name": {"type": "string"},
|
||||
"id": {"type": "integer"},
|
||||
"map": {
|
||||
"type": "object",
|
||||
"$ref": "#/components/schemas/mapClass"
|
||||
},
|
||||
"user": {"type": "string"},
|
||||
"config": {
|
||||
"type": "object",
|
||||
"$ref": "#/components/schemas/configClass"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"roomClass": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"id": {"type": "integer"},
|
||||
"name": {"type": "string"},
|
||||
"map": {
|
||||
"type": "object",
|
||||
"$ref": "#/components/schemas/mapClass"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"sensorClass": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "object",
|
||||
"$ref": "#/components/schemas/dataClass"
|
||||
},
|
||||
"name": {"type": "string"},
|
||||
"id": {"type": "integer"},
|
||||
"map": {
|
||||
"type": "object",
|
||||
"$ref": "#/components/schemas/mapClass"
|
||||
},
|
||||
"user": {"type": "string"},
|
||||
"config": {
|
||||
"type": "object",
|
||||
"$ref": "#/components/schemas/configClass"
|
||||
},
|
||||
"aggregate": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"data": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"timestamps": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"type": "integer"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
"configClass": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"typeConfig": {"type": "string"},
|
||||
"typeData": {"type": "string"}
|
||||
}
|
||||
},
|
||||
|
||||
"dataClass": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"valueStr": {"type": "string"},
|
||||
"value": {"type": "number"},
|
||||
"timestamp": {"type": "integer"}
|
||||
}
|
||||
},
|
||||
|
||||
"mapClass": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"x": {"type": "number"},
|
||||
"y": {"type": "number"},
|
||||
"width": {"type": "number"},
|
||||
"height": {"type": "number"}
|
||||
}
|
||||
},
|
||||
}
|
||||
},
|
||||
|
||||
"servers": [
|
||||
{
|
||||
"description": "Hal Server",
|
||||
"url": "/api"
|
||||
}
|
||||
],
|
||||
|
||||
"openapi": "3.0.1",
|
||||
|
||||
"paths": {
|
||||
"/event": {
|
||||
"get": {
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/components/schemas/eventClass"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "id",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "typeConfig",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "typeData",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"/room": {
|
||||
"get": {
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/components/schemas/roomClass"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "id",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
|
||||
"/sensor": {
|
||||
"get": {
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"$ref": "#/components/schemas/sensorClass"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"schema": {
|
||||
"type": "integer"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "id",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "typeConfig",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"schema": {
|
||||
"type": "string"
|
||||
},
|
||||
"in": "query",
|
||||
"name": "typeData",
|
||||
"required": false
|
||||
},
|
||||
{
|
||||
"schema": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"min",
|
||||
"hour",
|
||||
"day",
|
||||
"week"
|
||||
]
|
||||
},
|
||||
"in": "query",
|
||||
"name": "aggregation",
|
||||
"required": false
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
"description": "This API allows developers and external tools to interface to Hal data and trigger different actions.",
|
||||
"title": "Hal REST API",
|
||||
"version": ""
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue