Add system/applications

- CRUD support for applications
 - new (application related) permissions
This commit is contained in:
Denis Arh
2019-03-09 18:52:00 +01:00
parent 7dd93af411
commit ebfab252fc
17 changed files with 1178 additions and 1 deletions
+89
View File
@@ -574,6 +574,95 @@
}
]
},
{
"title": "Applications",
"path": "/application",
"entrypoint": "application",
"authentication": [],
"struct": [
{
"imports": [
"sqlxTypes github.com/jmoiron/sqlx/types"
]
}
],
"apis": [
{
"name": "list",
"method": "GET",
"title": "List applications",
"path": "/"
},
{
"name": "create",
"method": "POST",
"title": "Create application",
"path": "/",
"parameters": {
"post": [
{ "name": "name", "type": "string", "required": true, "title": "Email"},
{ "name": "enabled", "type": "bool", "required": false, "title": "Enabled"},
{ "name": "unify", "type": "sqlxTypes.JSONText", "required": false, "title": "Unify properties"},
{ "name": "config", "type": "sqlxTypes.JSONText", "required": false, "title": "Arbitrary JSON holding application configuration"}
]
}
},
{
"name": "update",
"method": "PUT",
"title": "Update user details",
"path": "/{applicationID}",
"parameters": {
"path": [
{
"type": "uint64",
"name": "applicationID",
"required": true,
"title": "Application ID"
}
],
"post": [
{ "name": "name", "type": "string", "required": true, "title": "Email"},
{ "name": "enabled", "type": "bool", "required": false, "title": "Enabled"},
{ "name": "unify", "type": "sqlxTypes.JSONText", "required": false, "title": "Unify properties"},
{ "name": "config", "type": "sqlxTypes.JSONText", "required": false, "title": "Arbitrary JSON holding application configuration"}
]
}
},
{
"name": "read",
"method": "GET",
"title": "Read application details",
"path": "/{applicationID}",
"parameters": {
"path": [
{
"type": "uint64",
"name": "applicationID",
"required": true,
"title": "Application ID"
}
]
}
},
{
"name": "delete",
"method": "DELETE",
"title": "Remove application",
"path": "/{applicationID}",
"parameters": {
"path": [
{
"type": "uint64",
"name": "applicationID",
"required": true,
"title": "Application ID"
}
]
}
}
]
},
{
"title": "Permissions",
"parameters": {},
+132
View File
@@ -0,0 +1,132 @@
{
"Title": "Applications",
"Interface": "Application",
"Struct": [
{
"imports": [
"sqlxTypes github.com/jmoiron/sqlx/types"
]
}
],
"Parameters": null,
"Protocol": "",
"Authentication": [],
"Path": "/application",
"APIs": [
{
"Name": "list",
"Method": "GET",
"Title": "List applications",
"Path": "/",
"Parameters": null
},
{
"Name": "create",
"Method": "POST",
"Title": "Create application",
"Path": "/",
"Parameters": {
"post": [
{
"name": "name",
"required": true,
"title": "Email",
"type": "string"
},
{
"name": "enabled",
"required": false,
"title": "Enabled",
"type": "bool"
},
{
"name": "unify",
"required": false,
"title": "Unify properties",
"type": "sqlxTypes.JSONText"
},
{
"name": "config",
"required": false,
"title": "Arbitrary JSON holding application configuration",
"type": "sqlxTypes.JSONText"
}
]
}
},
{
"Name": "update",
"Method": "PUT",
"Title": "Update user details",
"Path": "/{applicationID}",
"Parameters": {
"path": [
{
"name": "applicationID",
"required": true,
"title": "Application ID",
"type": "uint64"
}
],
"post": [
{
"name": "name",
"required": true,
"title": "Email",
"type": "string"
},
{
"name": "enabled",
"required": false,
"title": "Enabled",
"type": "bool"
},
{
"name": "unify",
"required": false,
"title": "Unify properties",
"type": "sqlxTypes.JSONText"
},
{
"name": "config",
"required": false,
"title": "Arbitrary JSON holding application configuration",
"type": "sqlxTypes.JSONText"
}
]
}
},
{
"Name": "read",
"Method": "GET",
"Title": "Read application details",
"Path": "/{applicationID}",
"Parameters": {
"path": [
{
"name": "applicationID",
"required": true,
"title": "Application ID",
"type": "uint64"
}
]
}
},
{
"Name": "delete",
"Method": "DELETE",
"Title": "Remove application",
"Path": "/{applicationID}",
"Parameters": {
"path": [
{
"name": "applicationID",
"required": true,
"title": "Application ID",
"type": "uint64"
}
]
}
}
]
}