Start working on API documentation and token auth (references #5)

This commit is contained in:
Bernd Bestel
2018-04-20 23:09:18 +02:00
parent 7be35a90c1
commit 9bd6aac09c
9 changed files with 491 additions and 5 deletions

View File

@@ -0,0 +1,47 @@
{
"openapi": "3.0.0",
"info": {
"title": "grocy REST API",
"description": "xxx",
"version": "xxx"
},
"servers": [
{
"url": "xxx"
}
],
"paths": {
"/get-objects/{entity}": {
"get": {
"description": "Returns all objects of the given entity",
"parameters": [
{
"in": "path",
"name": "entity",
"required": true,
"description": "A valid entity name",
"schema": {
"$ref": "#/components/schemas/Entity"
}
}
],
"responses": {
"200": {
"description": "OK"
}
}
}
}
},
"components": {
"schemas": {
"Entity": {
"type": "string",
"enum": [
"product",
"habit"
]
}
}
}
}