diff --git a/openapi.json b/openapi.json index 1913d4349..2091c43b9 100644 --- a/openapi.json +++ b/openapi.json @@ -134,15 +134,15 @@ }, "numberDefault": { "type": "number", - "format": "double" + "format": "float" }, "numberMin": { "type": "number", - "format": "double" + "format": "float" }, "numberMax": { "type": "number", - "format": "double" + "format": "float" }, "numberDecimals": { "type": "integer", @@ -662,7 +662,7 @@ ] }, "value": { - "anyOf": [ + "oneOf": [ { "type": "string" }, @@ -672,7 +672,7 @@ }, { "type": "number", - "format": "double" + "format": "float" } ] } @@ -728,7 +728,7 @@ "paths": { "/index.php/apps/tables/api/1/tables": { "get": { - "operationId": "api1-index", + "operationId": "api1-list", "summary": "Returns all Tables", "tags": [ "api1" @@ -783,35 +783,35 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "title" - ], - "properties": { - "title": { - "type": "string", - "description": "Title of the table" - }, - "emoji": { - "type": "string", - "nullable": true, - "description": "Emoji for the table" - }, - "template": { - "type": "string", - "default": "custom", - "description": "Template to use if wanted" - } - } - } + "parameters": [ + { + "name": "title", + "in": "query", + "description": "Title of the table", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "emoji", + "in": "query", + "description": "Emoji for the table", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "template", + "in": "query", + "description": "Template to use if wanted", + "schema": { + "type": "string", + "default": "custom" } } - }, + ], "responses": { "200": { "description": "Tables returned", @@ -856,34 +856,38 @@ "basic_auth": [] } ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "title": { - "type": "string", - "nullable": true, - "description": "New table title" - }, - "emoji": { - "type": "string", - "nullable": true, - "description": "New table emoji" - }, - "archived": { - "type": "boolean", - "default": false, - "description": "Whether the table is archived" - } - } - } - } - } - }, "parameters": [ + { + "name": "title", + "in": "query", + "description": "New table title", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "emoji", + "in": "query", + "description": "New table emoji", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "archived", + "in": "query", + "description": "Whether the table is archived", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, { "name": "tableId", "in": "path", @@ -1145,7 +1149,7 @@ }, "/index.php/apps/tables/api/1/tables/{tableId}/views": { "get": { - "operationId": "api1-index-views", + "operationId": "api1-list-views", "summary": "Get all views for a table", "tags": [ "api1" @@ -1248,31 +1252,25 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "title" - ], - "properties": { - "title": { - "type": "string", - "description": "Title for the view" - }, - "emoji": { - "type": "string", - "nullable": true, - "description": "Emoji for the view" - } - } - } - } - } - }, "parameters": [ + { + "name": "title", + "in": "query", + "description": "Title for the view", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "emoji", + "in": "query", + "description": "Emoji for the view", + "schema": { + "type": "string", + "nullable": true + } + }, { "name": "tableId", "in": "path", @@ -1454,162 +1452,152 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "description": "key-value pairs", - "anyOf": [ - { - "type": "object", - "required": [ - "key", - "value" - ], - "properties": { - "key": { - "type": "string", - "enum": [ - "title", - "emoji", - "description" - ] - }, - "value": { - "type": "string" - } + "parameters": [ + { + "name": "data", + "in": "query", + "description": "key-value pairs", + "required": true, + "schema": { + "oneOf": [ + { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "enum": [ + "title", + "emoji", + "description" + ] + }, + "value": { + "type": "string" + } + } + }, + { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "enum": [ + "columns" + ] + }, + "value": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + } + }, + { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "enum": [ + "sort" + ] + }, + "value": { + "type": "object", + "required": [ + "columnId", + "mode" + ], + "properties": { + "columnId": { + "type": "integer", + "format": "int64" + }, + "mode": { + "type": "string", + "enum": [ + "ASC", + "DESC" + ] } - }, - { - "type": "object", - "required": [ - "key", - "value" - ], - "properties": { - "key": { - "type": "string", - "enum": [ - "columns" - ] - }, - "value": { - "type": "array", - "items": { + } + } + } + }, + { + "type": "object", + "required": [ + "key", + "value" + ], + "properties": { + "key": { + "type": "string", + "enum": [ + "filter" + ] + }, + "value": { + "type": "object", + "required": [ + "columnId", + "operator", + "value" + ], + "properties": { + "columnId": { + "type": "integer", + "format": "int64" + }, + "operator": { + "type": "string", + "enum": [ + "begins-with", + "ends-with", + "contains", + "is-equal", + "is-greater-than", + "is-greater-than-or-equal", + "is-lower-than", + "is-lower-than-or-equal", + "is-empty" + ] + }, + "value": { + "oneOf": [ + { + "type": "string" + }, + { "type": "integer", "format": "int64" + }, + { + "type": "number", + "format": "float" } - } - } - }, - { - "type": "object", - "required": [ - "key", - "value" - ], - "properties": { - "key": { - "type": "string", - "enum": [ - "sort" - ] - }, - "value": { - "type": "object", - "required": [ - "columnId", - "mode" - ], - "properties": { - "columnId": { - "type": "integer", - "format": "int64" - }, - "mode": { - "type": "string", - "enum": [ - "ASC", - "DESC" - ] - } - } - } - } - }, - { - "type": "object", - "required": [ - "key", - "value" - ], - "properties": { - "key": { - "type": "string", - "enum": [ - "filter" - ] - }, - "value": { - "type": "object", - "required": [ - "columnId", - "operator", - "value" - ], - "properties": { - "columnId": { - "type": "integer", - "format": "int64" - }, - "operator": { - "type": "string", - "enum": [ - "begins-with", - "ends-with", - "contains", - "is-equal", - "is-greater-than", - "is-greater-than-or-equal", - "is-lower-than", - "is-lower-than-or-equal", - "is-empty" - ] - }, - "value": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer", - "format": "int64" - }, - { - "type": "number", - "format": "double" - } - ] - } - } - } + ] } } - ] + } } } - } + ] } - } - }, - "parameters": [ + }, { "name": "viewId", "in": "path", @@ -1953,31 +1941,29 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "permissionType", - "permissionValue" - ], - "properties": { - "permissionType": { - "type": "string", - "description": "Permission type that should be changed" - }, - "permissionValue": { - "type": "boolean", - "description": "New permission value" - } - } - } - } - } - }, "parameters": [ + { + "name": "permissionType", + "in": "query", + "description": "Permission type that should be changed", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "permissionValue", + "in": "query", + "description": "New permission value", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, { "name": "shareId", "in": "path", @@ -2059,7 +2045,7 @@ }, "/index.php/apps/tables/api/1/views/{viewId}/shares": { "get": { - "operationId": "api1-index-view-shares", + "operationId": "api1-list-view-shares", "summary": "Get all shares for a view Will be empty if view does not exist", "tags": [ "api1" @@ -2118,7 +2104,7 @@ }, "/index.php/apps/tables/api/1/tables/{tableId}/shares": { "get": { - "operationId": "api1-index-table-shares", + "operationId": "api1-list-table-shares", "summary": "Get all shares for a table Will be empty if table does not exist", "tags": [ "api1" @@ -2185,104 +2171,138 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "receiver", - "receiverType", - "permissionRead", - "permissionCreate", - "permissionUpdate", - "permissionDelete", - "permissionManage" - ], - "properties": { - "receiver": { - "type": "string", - "description": "Receiver ID" - }, - "receiverType": { - "type": "string", - "enum": [ - "user", - "group" - ], - "description": "Receiver type" - }, - "permissionRead": { - "type": "boolean", - "description": "Permission if receiver can read data" - }, - "permissionCreate": { - "type": "boolean", - "description": "Permission if receiver can create data" - }, - "permissionUpdate": { - "type": "boolean", - "description": "Permission if receiver can update data" - }, - "permissionDelete": { - "type": "boolean", - "description": "Permission if receiver can delete data" - }, - "permissionManage": { - "type": "boolean", - "description": "Permission if receiver can manage table" - } - } - } - } - } - }, "parameters": [ { - "name": "tableId", - "in": "path", - "description": "Table ID", + "name": "receiver", + "in": "query", + "description": "Receiver ID", "required": true, "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "200": { - "description": "View deleted", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Share" - } - } + "type": "string" } }, - "403": { - "description": "No permissions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } - } - } + { + "name": "receiverType", + "in": "query", + "description": "Receiver type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "user", + "group" + ] } }, - "500": { - "description": "", - "content": { - "application/json": { + { + "name": "permissionRead", + "in": "query", + "description": "Permission if receiver can read data", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "permissionCreate", + "in": "query", + "description": "Permission if receiver can create data", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "permissionUpdate", + "in": "query", + "description": "Permission if receiver can update data", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "permissionDelete", + "in": "query", + "description": "Permission if receiver can delete data", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "permissionManage", + "in": "query", + "description": "Permission if receiver can manage table", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "tableId", + "in": "path", + "description": "Table ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "View deleted", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Share" + } + } + } + }, + "403": { + "description": "No permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { "schema": { "type": "object", "required": [ @@ -2330,81 +2350,129 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "nodeId", - "nodeType", - "receiver", - "receiverType" - ], - "properties": { - "nodeId": { - "type": "integer", - "format": "int64", - "description": "Node ID" - }, - "nodeType": { - "type": "string", - "enum": [ - "table", - "view", - "context" - ], - "description": "Node type" - }, - "receiver": { - "type": "string", - "description": "Receiver ID" - }, - "receiverType": { - "type": "string", - "enum": [ - "user", - "group" - ], - "description": "Receiver type" - }, - "permissionRead": { - "type": "boolean", - "default": false, - "description": "Permission if receiver can read data" - }, - "permissionCreate": { - "type": "boolean", - "default": false, - "description": "Permission if receiver can create data" - }, - "permissionUpdate": { - "type": "boolean", - "default": false, - "description": "Permission if receiver can update data" - }, - "permissionDelete": { - "type": "boolean", - "default": false, - "description": "Permission if receiver can delete data" - }, - "permissionManage": { - "type": "boolean", - "default": false, - "description": "Permission if receiver can manage node" - }, - "displayMode": { - "type": "integer", - "format": "int64", - "default": 0, - "description": "context shares only, whether it should appear in nav bar. 0: no, 1: recipients, 2: all" - } - } - } + "parameters": [ + { + "name": "nodeId", + "in": "query", + "description": "Node ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "nodeType", + "in": "query", + "description": "Node type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "table", + "view", + "context" + ] + } + }, + { + "name": "receiver", + "in": "query", + "description": "Receiver ID", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "receiverType", + "in": "query", + "description": "Receiver type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "user", + "group" + ] + } + }, + { + "name": "permissionRead", + "in": "query", + "description": "Permission if receiver can read data", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "permissionCreate", + "in": "query", + "description": "Permission if receiver can create data", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "permissionUpdate", + "in": "query", + "description": "Permission if receiver can update data", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "permissionDelete", + "in": "query", + "description": "Permission if receiver can delete data", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "permissionManage", + "in": "query", + "description": "Permission if receiver can manage node", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "displayMode", + "in": "query", + "description": "context shares only, whether it should appear in nav bar. 0: no, 1: recipients, 2: all", + "schema": { + "type": "integer", + "format": "int64", + "default": 0 } } - }, + ], "responses": { "200": { "description": "Share returned", @@ -2485,38 +2553,32 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "displayMode" - ], - "properties": { - "displayMode": { - "type": "integer", - "format": "int64", - "description": "The new value for the display mode of the nav bar icon. 0: hidden, 1: visible for recipients, 2: visible for all", - "minimum": 0, - "maximum": 2 - }, - "target": { - "type": "string", - "default": "default", - "enum": [ - "default", - "self" - ], - "description": "\"default\" to set the default, \"self\" to set an override for the authenticated user" - } - } - } - } - } - }, "parameters": [ + { + "name": "displayMode", + "in": "query", + "description": "The new value for the display mode of the nav bar icon. 0: hidden, 1: visible for recipients, 2: visible for all", + "required": true, + "schema": { + "type": "integer", + "format": "int64", + "minimum": 0, + "maximum": 2 + } + }, + { + "name": "target", + "in": "query", + "description": "\"default\" to set the default, \"self\" to set an override for the authenticated user", + "schema": { + "type": "string", + "default": "default", + "enum": [ + "default", + "self" + ] + } + }, { "name": "shareId", "in": "path", @@ -2616,7 +2678,7 @@ }, "/index.php/apps/tables/api/1/tables/{tableId}/columns": { "get": { - "operationId": "api1-index-table-columns", + "operationId": "api1-list-table-columns", "summary": "Get all columns for a table or a underlying view Return an empty array if no columns were found", "tags": [ "api1" @@ -2627,16 +2689,6 @@ } ], "parameters": [ - { - "name": "tableId", - "in": "path", - "description": "Table ID", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, { "name": "viewId", "in": "query", @@ -2646,6 +2698,16 @@ "format": "int64", "nullable": true } + }, + { + "name": "tableId", + "in": "path", + "description": "Table ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -2729,130 +2791,192 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "title", - "type", - "mandatory" - ], - "properties": { - "title": { - "type": "string", - "description": "Title" - }, - "type": { - "type": "string", - "enum": [ - "text", - "number", - "datetime", - "select" - ], - "description": "Column main type" - }, - "subtype": { - "type": "string", - "nullable": true, - "description": "Column sub type" - }, - "mandatory": { - "type": "boolean", - "description": "Is the column mandatory" - }, - "description": { - "type": "string", - "nullable": true, - "description": "Description" - }, - "numberPrefix": { - "type": "string", - "nullable": true, - "description": "Prefix if the column is a number field" - }, - "numberSuffix": { - "type": "string", - "nullable": true, - "description": "Suffix if the column is a number field" - }, - "numberDefault": { - "type": "number", - "format": "double", - "nullable": true, - "description": "Default number, if column is a number" - }, - "numberMin": { - "type": "number", - "format": "double", - "nullable": true, - "description": "Min value, if column is a number" - }, - "numberMax": { - "type": "number", - "format": "double", - "nullable": true, - "description": "Max number, if column is a number" - }, - "numberDecimals": { - "type": "integer", - "format": "int64", - "nullable": true, - "description": "Number of decimals, if column is a number" - }, - "textDefault": { - "type": "string", - "nullable": true, - "description": "Default text, if column is a text" - }, - "textAllowedPattern": { - "type": "string", - "nullable": true, - "description": "Allowed pattern (regex) for text columns (not yet implemented)" - }, - "textMaxLength": { - "type": "integer", - "format": "int64", - "nullable": true, - "description": "Max length, if column is a text" - }, - "selectionOptions": { - "type": "string", - "nullable": true, - "default": "", - "description": "Options for a selection (json array{id: int, label: string})" - }, - "selectionDefault": { - "type": "string", - "nullable": true, - "default": "", - "description": "Default option IDs for a selection (json int[])" - }, - "datetimeDefault": { - "type": "string", - "nullable": true, - "default": "", - "description": "Default value, if column is datetime" - }, - "selectedViewIds": { - "type": "array", - "nullable": true, - "default": [], - "description": "View IDs where this column should be added to be presented", - "items": { - "type": "integer", - "format": "int64" - } - } - } + "parameters": [ + { + "name": "title", + "in": "query", + "description": "Title", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "description": "Column main type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "text", + "number", + "datetime", + "select" + ] + } + }, + { + "name": "subtype", + "in": "query", + "description": "Column sub type", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "mandatory", + "in": "query", + "description": "Is the column mandatory", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "description", + "in": "query", + "description": "Description", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "numberPrefix", + "in": "query", + "description": "Prefix if the column is a number field", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "numberSuffix", + "in": "query", + "description": "Suffix if the column is a number field", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "numberDefault", + "in": "query", + "description": "Default number, if column is a number", + "schema": { + "type": "number", + "format": "float", + "nullable": true + } + }, + { + "name": "numberMin", + "in": "query", + "description": "Min value, if column is a number", + "schema": { + "type": "number", + "format": "float", + "nullable": true + } + }, + { + "name": "numberMax", + "in": "query", + "description": "Max number, if column is a number", + "schema": { + "type": "number", + "format": "float", + "nullable": true + } + }, + { + "name": "numberDecimals", + "in": "query", + "description": "Number of decimals, if column is a number", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "textDefault", + "in": "query", + "description": "Default text, if column is a text", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "textAllowedPattern", + "in": "query", + "description": "Allowed pattern (regex) for text columns (not yet implemented)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "textMaxLength", + "in": "query", + "description": "Max length, if column is a text", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "selectionOptions", + "in": "query", + "description": "Options for a selection (json array{id: int, label: string})", + "schema": { + "type": "string", + "nullable": true, + "default": "" + } + }, + { + "name": "selectionDefault", + "in": "query", + "description": "Default option IDs for a selection (json int[])", + "schema": { + "type": "string", + "nullable": true, + "default": "" + } + }, + { + "name": "datetimeDefault", + "in": "query", + "description": "Default value, if column is datetime", + "schema": { + "type": "string", + "nullable": true, + "default": "" + } + }, + { + "name": "selectedViewIds[]", + "in": "query", + "description": "View IDs where this column should be added to be presented", + "schema": { + "type": "array", + "nullable": true, + "default": [], + "items": { + "type": "integer", + "format": "int64" } } - } - }, - "parameters": [ + }, { "name": "tableId", "in": "path", @@ -2934,7 +3058,7 @@ }, "/index.php/apps/tables/api/1/views/{viewId}/columns": { "get": { - "operationId": "api1-index-view-columns", + "operationId": "api1-list-view-columns", "summary": "Get all columns for a view Return an empty array if no columns were found", "tags": [ "api1" @@ -3039,141 +3163,213 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "title", - "type", - "mandatory" - ], - "properties": { - "tableId": { - "type": "integer", - "format": "int64", - "nullable": true, - "description": "Table ID" - }, - "viewId": { - "type": "integer", - "format": "int64", - "nullable": true, - "description": "View ID" - }, - "title": { - "type": "string", - "description": "Title" - }, - "type": { - "type": "string", - "enum": [ - "text", - "number", - "datetime", - "select" - ], - "description": "Column main type" - }, - "subtype": { - "type": "string", - "nullable": true, - "description": "Column sub type" - }, - "mandatory": { - "type": "boolean", - "description": "Is the column mandatory" - }, - "description": { - "type": "string", - "nullable": true, - "description": "Description" - }, - "numberPrefix": { - "type": "string", - "nullable": true, - "description": "Prefix if the column is a number field" - }, - "numberSuffix": { - "type": "string", - "nullable": true, - "description": "Suffix if the column is a number field" - }, - "numberDefault": { - "type": "number", - "format": "double", - "nullable": true, - "description": "Default number, if column is a number" - }, - "numberMin": { - "type": "number", - "format": "double", - "nullable": true, - "description": "Min value, if column is a number" - }, - "numberMax": { - "type": "number", - "format": "double", - "nullable": true, - "description": "Max number, if column is a number" - }, - "numberDecimals": { - "type": "integer", - "format": "int64", - "nullable": true, - "description": "Number of decimals, if column is a number" - }, - "textDefault": { - "type": "string", - "nullable": true, - "description": "Default text, if column is a text" - }, - "textAllowedPattern": { - "type": "string", - "nullable": true, - "description": "Allowed pattern (regex) for text columns (not yet implemented)" - }, - "textMaxLength": { - "type": "integer", - "format": "int64", - "nullable": true, - "description": "Max length, if column is a text" - }, - "selectionOptions": { - "type": "string", - "nullable": true, - "default": "", - "description": "Options for a selection (json array{id: int, label: string})" - }, - "selectionDefault": { - "type": "string", - "nullable": true, - "default": "", - "description": "Default option IDs for a selection (json int[])" - }, - "datetimeDefault": { - "type": "string", - "nullable": true, - "default": "", - "description": "Default value, if column is datetime" - }, - "selectedViewIds": { - "type": "array", - "nullable": true, - "default": [], - "description": "View IDs where this column should be added to be presented", - "items": { - "type": "integer", - "format": "int64" - } - } - } + "parameters": [ + { + "name": "tableId", + "in": "query", + "description": "Table ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "viewId", + "in": "query", + "description": "View ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "title", + "in": "query", + "description": "Title", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "description": "Column main type", + "required": true, + "schema": { + "type": "string", + "enum": [ + "text", + "number", + "datetime", + "select" + ] + } + }, + { + "name": "subtype", + "in": "query", + "description": "Column sub type", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "mandatory", + "in": "query", + "description": "Is the column mandatory", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "description", + "in": "query", + "description": "Description", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "numberPrefix", + "in": "query", + "description": "Prefix if the column is a number field", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "numberSuffix", + "in": "query", + "description": "Suffix if the column is a number field", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "numberDefault", + "in": "query", + "description": "Default number, if column is a number", + "schema": { + "type": "number", + "format": "float", + "nullable": true + } + }, + { + "name": "numberMin", + "in": "query", + "description": "Min value, if column is a number", + "schema": { + "type": "number", + "format": "float", + "nullable": true + } + }, + { + "name": "numberMax", + "in": "query", + "description": "Max number, if column is a number", + "schema": { + "type": "number", + "format": "float", + "nullable": true + } + }, + { + "name": "numberDecimals", + "in": "query", + "description": "Number of decimals, if column is a number", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "textDefault", + "in": "query", + "description": "Default text, if column is a text", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "textAllowedPattern", + "in": "query", + "description": "Allowed pattern (regex) for text columns (not yet implemented)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "textMaxLength", + "in": "query", + "description": "Max length, if column is a text", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "selectionOptions", + "in": "query", + "description": "Options for a selection (json array{id: int, label: string})", + "schema": { + "type": "string", + "nullable": true, + "default": "" + } + }, + { + "name": "selectionDefault", + "in": "query", + "description": "Default option IDs for a selection (json int[])", + "schema": { + "type": "string", + "nullable": true, + "default": "" + } + }, + { + "name": "datetimeDefault", + "in": "query", + "description": "Default value, if column is datetime", + "schema": { + "type": "string", + "nullable": true, + "default": "" + } + }, + { + "name": "selectedViewIds[]", + "in": "query", + "description": "View IDs where this column should be added to be presented", + "schema": { + "type": "array", + "nullable": true, + "default": [], + "items": { + "type": "integer", + "format": "int64" } } } - }, + ], "responses": { "200": { "description": "Column created", @@ -3185,175 +3381,229 @@ } } }, - "403": { - "description": "No permissions", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } - } - } + "403": { + "description": "No permissions", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "404": { + "description": "Not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/index.php/apps/tables/api/1/columns/{columnId}": { + "put": { + "operationId": "api1-update-column", + "summary": "Update a column", + "tags": [ + "api1" + ], + "security": [ + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "title", + "in": "query", + "description": "Title", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "subtype", + "in": "query", + "description": "Column sub type", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "mandatory", + "in": "query", + "description": "Is the column mandatory", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "description", + "in": "query", + "description": "Description", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "numberPrefix", + "in": "query", + "description": "Prefix if the column is a number field", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "numberSuffix", + "in": "query", + "description": "Suffix if the column is a number field", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "numberDefault", + "in": "query", + "description": "Default number, if column is a number", + "schema": { + "type": "number", + "format": "float", + "nullable": true + } + }, + { + "name": "numberMin", + "in": "query", + "description": "Min value, if column is a number", + "schema": { + "type": "number", + "format": "float", + "nullable": true + } + }, + { + "name": "numberMax", + "in": "query", + "description": "Max number, if column is a number", + "schema": { + "type": "number", + "format": "float", + "nullable": true + } + }, + { + "name": "numberDecimals", + "in": "query", + "description": "Number of decimals, if column is a number", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "textDefault", + "in": "query", + "description": "Default text, if column is a text", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "textAllowedPattern", + "in": "query", + "description": "Allowed pattern (regex) for text columns (not yet implemented)", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "textMaxLength", + "in": "query", + "description": "Max length, if column is a text", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "selectionOptions", + "in": "query", + "description": "Options for a selection (json array{id: int, label: string})", + "schema": { + "type": "string", + "nullable": true } }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } - } - } + { + "name": "selectionDefault", + "in": "query", + "description": "Default option IDs for a selection (json int[])", + "schema": { + "type": "string", + "nullable": true } }, - "404": { - "description": "Not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } - } - } - } - } - } - } - }, - "/index.php/apps/tables/api/1/columns/{columnId}": { - "put": { - "operationId": "api1-update-column", - "summary": "Update a column", - "tags": [ - "api1" - ], - "security": [ { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "mandatory" - ], - "properties": { - "title": { - "type": "string", - "nullable": true, - "description": "Title" - }, - "subtype": { - "type": "string", - "nullable": true, - "description": "Column sub type" - }, - "mandatory": { - "type": "boolean", - "description": "Is the column mandatory" - }, - "description": { - "type": "string", - "nullable": true, - "description": "Description" - }, - "numberPrefix": { - "type": "string", - "nullable": true, - "description": "Prefix if the column is a number field" - }, - "numberSuffix": { - "type": "string", - "nullable": true, - "description": "Suffix if the column is a number field" - }, - "numberDefault": { - "type": "number", - "format": "double", - "nullable": true, - "description": "Default number, if column is a number" - }, - "numberMin": { - "type": "number", - "format": "double", - "nullable": true, - "description": "Min value, if column is a number" - }, - "numberMax": { - "type": "number", - "format": "double", - "nullable": true, - "description": "Max number, if column is a number" - }, - "numberDecimals": { - "type": "integer", - "format": "int64", - "nullable": true, - "description": "Number of decimals, if column is a number" - }, - "textDefault": { - "type": "string", - "nullable": true, - "description": "Default text, if column is a text" - }, - "textAllowedPattern": { - "type": "string", - "nullable": true, - "description": "Allowed pattern (regex) for text columns (not yet implemented)" - }, - "textMaxLength": { - "type": "integer", - "format": "int64", - "nullable": true, - "description": "Max length, if column is a text" - }, - "selectionOptions": { - "type": "string", - "nullable": true, - "description": "Options for a selection (json array{id: int, label: string})" - }, - "selectionDefault": { - "type": "string", - "nullable": true, - "description": "Default option IDs for a selection (json int[])" - }, - "datetimeDefault": { - "type": "string", - "nullable": true, - "description": "Default value, if column is datetime" - } - } - } + "name": "datetimeDefault", + "in": "query", + "description": "Default value, if column is datetime", + "schema": { + "type": "string", + "nullable": true } - } - }, - "parameters": [ + }, { "name": "columnId", "in": "path", @@ -3579,7 +3829,7 @@ }, "/index.php/apps/tables/api/1/tables/{tableId}/rows/simple": { "get": { - "operationId": "api1-index-table-rows-simple", + "operationId": "api1-list-table-rows-simple", "summary": "List all rows values for a table, first row are the column titles", "tags": [ "api1" @@ -3590,16 +3840,6 @@ } ], "parameters": [ - { - "name": "tableId", - "in": "path", - "description": "Table ID", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, { "name": "limit", "in": "query", @@ -3619,6 +3859,16 @@ "format": "int64", "nullable": true } + }, + { + "name": "tableId", + "in": "path", + "description": "Table ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -3694,7 +3944,7 @@ }, "/index.php/apps/tables/api/1/tables/{tableId}/rows": { "get": { - "operationId": "api1-index-table-rows", + "operationId": "api1-list-table-rows", "summary": "List all rows for a table", "tags": [ "api1" @@ -3705,16 +3955,6 @@ } ], "parameters": [ - { - "name": "tableId", - "in": "path", - "description": "Table ID", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, { "name": "limit", "in": "query", @@ -3734,6 +3974,16 @@ "format": "int64", "nullable": true } + }, + { + "name": "tableId", + "in": "path", + "description": "Table ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -3817,36 +4067,26 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "description": "Data as key - value store", - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "type": "object" - } - } - ] + "parameters": [ + { + "name": "data", + "in": "query", + "description": "Data as key - value store", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "type": "object" } } - } + ] } - } - }, - "parameters": [ + }, { "name": "tableId", "in": "path", @@ -3910,7 +4150,7 @@ }, "/index.php/apps/tables/api/1/views/{viewId}/rows": { "get": { - "operationId": "api1-index-view-rows", + "operationId": "api1-list-view-rows", "summary": "List all rows for a view", "tags": [ "api1" @@ -3921,16 +4161,6 @@ } ], "parameters": [ - { - "name": "viewId", - "in": "path", - "description": "View ID", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, { "name": "limit", "in": "query", @@ -3950,6 +4180,16 @@ "format": "int64", "nullable": true } + }, + { + "name": "viewId", + "in": "path", + "description": "View ID", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } } ], "responses": { @@ -4033,36 +4273,26 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "data": { - "description": "Data as key - value store", - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "type": "object" - } - } - ] + "parameters": [ + { + "name": "data", + "in": "query", + "description": "Data as key - value store", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "type": "object" } } - } + ] } - } - }, - "parameters": [ + }, { "name": "viewId", "in": "path", @@ -4226,42 +4456,36 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "data" - ], - "properties": { - "viewId": { - "type": "integer", - "format": "int64", - "nullable": true, - "description": "View ID" - }, - "data": { - "description": "Data as key - value store", - "oneOf": [ - { - "type": "string" - }, - { - "type": "object", - "additionalProperties": { - "type": "object" - } - } - ] + "parameters": [ + { + "name": "viewId", + "in": "query", + "description": "View ID", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "data", + "in": "query", + "description": "Data as key - value store", + "required": true, + "schema": { + "oneOf": [ + { + "type": "string" + }, + { + "type": "object", + "additionalProperties": { + "type": "object" } } - } + ] } - } - }, - "parameters": [ + }, { "name": "rowId", "in": "path", @@ -4545,31 +4769,29 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "path" - ], - "properties": { - "path": { - "type": "string", - "description": "Path to file" - }, - "createMissingColumns": { - "type": "boolean", - "default": true, - "description": "Create missing columns" - } - } - } - } - } - }, "parameters": [ + { + "name": "path", + "in": "query", + "description": "Path to file", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "createMissingColumns", + "in": "query", + "description": "Create missing columns", + "schema": { + "type": "integer", + "default": 1, + "enum": [ + 0, + 1 + ] + } + }, { "name": "tableId", "in": "path", @@ -4661,31 +4883,29 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "path" - ], - "properties": { - "path": { - "type": "string", - "description": "Path to file" - }, - "createMissingColumns": { - "type": "boolean", - "default": true, - "description": "Create missing columns" - } - } - } - } - } - }, "parameters": [ + { + "name": "path", + "in": "query", + "description": "Path to file", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "createMissingColumns", + "in": "query", + "description": "Create missing columns", + "schema": { + "type": "integer", + "default": 1, + "enum": [ + 0, + 1 + ] + } + }, { "name": "viewId", "in": "path", @@ -4767,7 +4987,7 @@ }, "/ocs/v2.php/apps/tables/api/2/init": { "get": { - "operationId": "api_general-index", + "operationId": "api_general-list", "summary": "[api v2] Returns all main resources", "description": "Tables and views incl. shares", "tags": [ @@ -4867,7 +5087,7 @@ }, "/ocs/v2.php/apps/tables/api/2/tables": { "get": { - "operationId": "api_tables-index", + "operationId": "api_tables-list", "summary": "[api v2] Returns all Tables", "tags": [ "api_tables" @@ -4980,41 +5200,43 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "title" - ], - "properties": { - "title": { - "type": "string", - "description": "Title of the table" - }, - "emoji": { - "type": "string", - "nullable": true, - "description": "Emoji for the table" - }, - "description": { - "type": "string", - "nullable": true, - "description": "Description for the table" - }, - "template": { - "type": "string", - "default": "custom", - "description": "Template to use if wanted" - } - } - } - } - } - }, "parameters": [ + { + "name": "title", + "in": "query", + "description": "Title of the table", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "emoji", + "in": "query", + "description": "Emoji for the table", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "description", + "in": "query", + "description": "Description for the table", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "template", + "in": "query", + "description": "Template to use if wanted", + "schema": { + "type": "string", + "default": "custom" + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -5296,37 +5518,46 @@ "basic_auth": [] } ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "title": { - "type": "string", - "nullable": true, - "description": "New table title" - }, - "emoji": { - "type": "string", - "nullable": true, - "description": "New table emoji" - }, - "description": { - "type": "string", - "description": "the tables description" - }, - "archived": { - "type": "boolean", - "description": "whether the table is archived" - } - } - } - } - } - }, "parameters": [ + { + "name": "title", + "in": "query", + "description": "New table title", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "emoji", + "in": "query", + "description": "New table emoji", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "description", + "in": "query", + "description": "the tables description", + "schema": { + "type": "string" + } + }, + { + "name": "archived", + "in": "query", + "description": "whether the table is archived", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, { "name": "id", "in": "path", @@ -5695,26 +5926,16 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "newOwnerUserId" - ], - "properties": { - "newOwnerUserId": { - "type": "string", - "description": "New user ID" - } - } - } - } - } - }, "parameters": [ + { + "name": "newOwnerUserId", + "in": "query", + "description": "New user ID", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "id", "in": "path", @@ -5886,7 +6107,7 @@ }, "/ocs/v2.php/apps/tables/api/2/columns/{nodeType}/{nodeId}": { "get": { - "operationId": "api_columns-index", + "operationId": "api_columns-list", "summary": "[api v2] Get all columns for a table or a view", "description": "Return an empty array if no columns were found", "tags": [ @@ -6267,124 +6488,166 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/tables/api/2/columns/number": { - "post": { - "operationId": "api_columns-create-number-column", - "summary": "[api v2] Create new numbered column", - "description": "Specify a subtype to use any special numbered column", - "tags": [ - "api_columns" - ], - "security": [ + } + } + } + }, + "/ocs/v2.php/apps/tables/api/2/columns/number": { + "post": { + "operationId": "api_columns-create-number-column", + "summary": "[api v2] Create new numbered column", + "description": "Specify a subtype to use any special numbered column", + "tags": [ + "api_columns" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "baseNodeId", + "in": "query", + "description": "Context of the column creation", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "title", + "in": "query", + "description": "Title", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "numberDefault", + "in": "query", + "description": "Default value for new rows", + "schema": { + "type": "number", + "format": "float", + "nullable": true + } + }, + { + "name": "numberDecimals", + "in": "query", + "description": "Decimals", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "numberPrefix", + "in": "query", + "description": "Prefix", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "numberSuffix", + "in": "query", + "description": "Suffix", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "numberMin", + "in": "query", + "description": "Min", + "schema": { + "type": "number", + "format": "float", + "nullable": true + } + }, + { + "name": "numberMax", + "in": "query", + "description": "Max", + "schema": { + "type": "number", + "format": "float", + "nullable": true + } + }, + { + "name": "subtype", + "in": "query", + "description": "Subtype for the new column", + "schema": { + "type": "string", + "nullable": true, + "enum": [ + "progress", + "stars" + ] + } + }, + { + "name": "description", + "in": "query", + "description": "Description", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "selectedViewIds[]", + "in": "query", + "description": "View IDs where this columns should be added", + "schema": { + "type": "array", + "nullable": true, + "default": [], + "items": { + "type": "integer", + "format": "int64" + } + } + }, { - "bearer_auth": [] + "name": "mandatory", + "in": "query", + "description": "Is mandatory", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } }, { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "baseNodeId", - "title" - ], - "properties": { - "baseNodeId": { - "type": "integer", - "format": "int64", - "description": "Context of the column creation" - }, - "title": { - "type": "string", - "description": "Title" - }, - "numberDefault": { - "type": "number", - "format": "double", - "nullable": true, - "description": "Default value for new rows" - }, - "numberDecimals": { - "type": "integer", - "format": "int64", - "nullable": true, - "description": "Decimals" - }, - "numberPrefix": { - "type": "string", - "nullable": true, - "description": "Prefix" - }, - "numberSuffix": { - "type": "string", - "nullable": true, - "description": "Suffix" - }, - "numberMin": { - "type": "number", - "format": "double", - "nullable": true, - "description": "Min" - }, - "numberMax": { - "type": "number", - "format": "double", - "nullable": true, - "description": "Max" - }, - "subtype": { - "type": "string", - "nullable": true, - "enum": [ - "progress", - "stars" - ], - "description": "Subtype for the new column" - }, - "description": { - "type": "string", - "nullable": true, - "description": "Description" - }, - "selectedViewIds": { - "type": "array", - "nullable": true, - "default": [], - "description": "View IDs where this columns should be added", - "items": { - "type": "integer", - "format": "int64" - } - }, - "mandatory": { - "type": "boolean", - "default": false, - "description": "Is mandatory" - }, - "baseNodeType": { - "type": "string", - "default": "table", - "enum": [ - "table", - "view" - ], - "description": "Context type of the column creation" - } - } - } + "name": "baseNodeType", + "in": "query", + "description": "Context type of the column creation", + "schema": { + "type": "string", + "default": "table", + "enum": [ + "table", + "view" + ] } - } - }, - "parameters": [ + }, { "name": "OCS-APIRequest", "in": "header", @@ -6565,86 +6828,116 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "baseNodeId", - "title" - ], - "properties": { - "baseNodeId": { - "type": "integer", - "format": "int64", - "description": "Context of the column creation" - }, - "title": { - "type": "string", - "description": "Title" - }, - "textDefault": { - "type": "string", - "nullable": true, - "description": "Default" - }, - "textAllowedPattern": { - "type": "string", - "nullable": true, - "description": "Allowed regex pattern" - }, - "textMaxLength": { - "type": "integer", - "format": "int64", - "nullable": true, - "description": "Max raw text length" - }, - "subtype": { - "type": "string", - "nullable": true, - "enum": [ - "progress", - "stars" - ], - "description": "Subtype for the new column" - }, - "description": { - "type": "string", - "nullable": true, - "description": "Description" - }, - "selectedViewIds": { - "type": "array", - "nullable": true, - "default": [], - "description": "View IDs where this columns should be added", - "items": { - "type": "integer", - "format": "int64" - } - }, - "mandatory": { - "type": "boolean", - "default": false, - "description": "Is mandatory" - }, - "baseNodeType": { - "type": "string", - "default": "table", - "enum": [ - "table", - "view" - ], - "description": "Context type of the column creation" - } - } + "parameters": [ + { + "name": "baseNodeId", + "in": "query", + "description": "Context of the column creation", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "title", + "in": "query", + "description": "Title", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "textDefault", + "in": "query", + "description": "Default", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "textAllowedPattern", + "in": "query", + "description": "Allowed regex pattern", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "textMaxLength", + "in": "query", + "description": "Max raw text length", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "subtype", + "in": "query", + "description": "Subtype for the new column", + "schema": { + "type": "string", + "nullable": true, + "enum": [ + "progress", + "stars" + ] + } + }, + { + "name": "description", + "in": "query", + "description": "Description", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "selectedViewIds[]", + "in": "query", + "description": "View IDs where this columns should be added", + "schema": { + "type": "array", + "nullable": true, + "default": [], + "items": { + "type": "integer", + "format": "int64" } } - } - }, - "parameters": [ + }, + { + "name": "mandatory", + "in": "query", + "description": "Is mandatory", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "baseNodeType", + "in": "query", + "description": "Context type of the column creation", + "schema": { + "type": "string", + "default": "table", + "enum": [ + "table", + "view" + ] + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -6825,80 +7118,106 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "baseNodeId", - "title", - "selectionOptions" - ], - "properties": { - "baseNodeId": { - "type": "integer", - "format": "int64", - "description": "Context of the column creation" - }, - "title": { - "type": "string", - "description": "Title" - }, - "selectionOptions": { - "type": "string", - "description": "Json array{id: int, label: string} with options that can be selected, eg [{\"id\": 1, \"label\": \"first\"},{\"id\": 2, \"label\": \"second\"}]" - }, - "selectionDefault": { - "type": "string", - "nullable": true, - "description": "Json int|int[] for default selected option(s), eg 5 or [\"1\", \"8\"]" - }, - "subtype": { - "type": "string", - "nullable": true, - "enum": [ - "progress", - "stars" - ], - "description": "Subtype for the new column" - }, - "description": { - "type": "string", - "nullable": true, - "description": "Description" - }, - "selectedViewIds": { - "type": "array", - "nullable": true, - "default": [], - "description": "View IDs where this columns should be added", - "items": { - "type": "integer", - "format": "int64" - } - }, - "mandatory": { - "type": "boolean", - "default": false, - "description": "Is mandatory" - }, - "baseNodeType": { - "type": "string", - "default": "table", - "enum": [ - "table", - "view" - ], - "description": "Context type of the column creation" - } - } + "parameters": [ + { + "name": "baseNodeId", + "in": "query", + "description": "Context of the column creation", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "title", + "in": "query", + "description": "Title", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "selectionOptions", + "in": "query", + "description": "Json array{id: int, label: string} with options that can be selected, eg [{\"id\": 1, \"label\": \"first\"},{\"id\": 2, \"label\": \"second\"}]", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "selectionDefault", + "in": "query", + "description": "Json int|int[] for default selected option(s), eg 5 or [\"1\", \"8\"]", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "subtype", + "in": "query", + "description": "Subtype for the new column", + "schema": { + "type": "string", + "nullable": true, + "enum": [ + "progress", + "stars" + ] + } + }, + { + "name": "description", + "in": "query", + "description": "Description", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "selectedViewIds[]", + "in": "query", + "description": "View IDs where this columns should be added", + "schema": { + "type": "array", + "nullable": true, + "default": [], + "items": { + "type": "integer", + "format": "int64" } } - } - }, - "parameters": [ + }, + { + "name": "mandatory", + "in": "query", + "description": "Is mandatory", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "baseNodeType", + "in": "query", + "description": "Context type of the column creation", + "schema": { + "type": "string", + "default": "table", + "enum": [ + "table", + "view" + ] + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -7079,79 +7398,101 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "baseNodeId", - "title" - ], - "properties": { - "baseNodeId": { - "type": "integer", - "format": "int64", - "description": "Context of the column creation" - }, - "title": { - "type": "string", - "description": "Title" - }, - "datetimeDefault": { - "type": "string", - "nullable": true, - "enum": [ - "today", - "now" - ], - "description": "For a subtype 'date' you can set 'today'. For a main type or subtype 'time' you can set to 'now'." - }, - "subtype": { - "type": "string", - "nullable": true, - "enum": [ - "progress", - "stars" - ], - "description": "Subtype for the new column" - }, - "description": { - "type": "string", - "nullable": true, - "description": "Description" - }, - "selectedViewIds": { - "type": "array", - "nullable": true, - "default": [], - "description": "View IDs where this columns should be added", - "items": { - "type": "integer", - "format": "int64" - } - }, - "mandatory": { - "type": "boolean", - "default": false, - "description": "Is mandatory" - }, - "baseNodeType": { - "type": "string", - "default": "table", - "enum": [ - "table", - "view" - ], - "description": "Context type of the column creation" - } - } + "parameters": [ + { + "name": "baseNodeId", + "in": "query", + "description": "Context of the column creation", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "title", + "in": "query", + "description": "Title", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "datetimeDefault", + "in": "query", + "description": "For a subtype 'date' you can set 'today'. For a main type or subtype 'time' you can set to 'now'.", + "schema": { + "type": "string", + "nullable": true, + "enum": [ + "today", + "now" + ] + } + }, + { + "name": "subtype", + "in": "query", + "description": "Subtype for the new column", + "schema": { + "type": "string", + "nullable": true, + "enum": [ + "progress", + "stars" + ] + } + }, + { + "name": "description", + "in": "query", + "description": "Description", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "selectedViewIds[]", + "in": "query", + "description": "View IDs where this columns should be added", + "schema": { + "type": "array", + "nullable": true, + "default": [], + "items": { + "type": "integer", + "format": "int64" } } - } - }, - "parameters": [ + }, + { + "name": "mandatory", + "in": "query", + "description": "Is mandatory", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "baseNodeType", + "in": "query", + "description": "Context type of the column creation", + "schema": { + "type": "string", + "default": "table", + "enum": [ + "table", + "view" + ] + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -7706,7 +8047,7 @@ }, "/ocs/v2.php/apps/tables/api/2/contexts": { "get": { - "operationId": "context-index", + "operationId": "context-list", "summary": "[api v2] Get all contexts available to the requesting person", "description": "Return an empty array if no contexts were found", "tags": [ @@ -7820,62 +8161,64 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { + "parameters": [ + { + "name": "name", + "in": "query", + "description": "Name of the context", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "iconName", + "in": "query", + "description": "Material design icon name of the context", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "description", + "in": "query", + "description": "Descriptive text of the context", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "nodes[]", + "in": "query", + "description": "optional nodes to be connected to this context", + "schema": { + "type": "array", + "default": [], + "items": { "type": "object", "required": [ - "name", - "iconName" + "id", + "type" ], "properties": { - "name": { - "type": "string", - "description": "Name of the context" - }, - "iconName": { - "type": "string", - "description": "Material design icon name of the context" + "id": { + "type": "integer", + "format": "int64" }, - "description": { - "type": "string", - "default": "", - "description": "Descriptive text of the context" + "type": { + "type": "integer", + "format": "int64" }, - "nodes": { - "type": "array", - "default": [], - "description": "optional nodes to be connected to this context", - "items": { - "type": "object", - "required": [ - "id", - "type" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "type": { - "type": "integer", - "format": "int64" - }, - "permissions": { - "type": "integer", - "format": "int64" - } - } - } + "permissions": { + "type": "integer", + "format": "int64" } } } } - } - }, - "parameters": [ + }, { "name": "OCS-APIRequest", "in": "header", @@ -8195,63 +8538,43 @@ "basic_auth": [] } ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "nullable": true, - "description": "provide this parameter to set a new name" - }, - "iconName": { - "type": "string", - "nullable": true, - "description": "provide this parameter to set a new icon" - }, - "description": { - "type": "string", - "nullable": true, - "description": "provide this parameter to set a new description" - }, - "nodes": { - "type": "object", - "nullable": true, - "description": "provide this parameter to set a new list of nodes.", - "required": [ - "id", - "type", - "permissions", - "order" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "type": { - "type": "integer", - "format": "int64" - }, - "permissions": { - "type": "integer", - "format": "int64" - }, - "order": { - "type": "integer", - "format": "int64" - } - } - } - } - } - } - } - }, "parameters": [ + { + "name": "name", + "in": "query", + "description": "provide this parameter to set a new name", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "iconName", + "in": "query", + "description": "provide this parameter to set a new icon", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "description", + "in": "query", + "description": "provide this parameter to set a new description", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "nodes", + "in": "query", + "description": "provide this parameter to set a new list of nodes.", + "schema": { + "type": "string", + "nullable": true + } + }, { "name": "contextId", "in": "path", @@ -8581,34 +8904,28 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "newOwnerId" - ], - "properties": { - "newOwnerId": { - "type": "string", - "description": "ID of the new owner" - }, - "newOwnerType": { - "type": "integer", - "format": "int64", - "default": 0, - "description": "any Application::OWNER_TYPE_* constant", - "minimum": 0, - "maximum": 0 - } - } - } - } - } - }, "parameters": [ + { + "name": "newOwnerId", + "in": "query", + "description": "ID of the new owner", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "newOwnerType", + "in": "query", + "description": "any Application::OWNER_TYPE_* constant", + "schema": { + "type": "integer", + "format": "int64", + "default": 0, + "minimum": 0, + "maximum": 0 + } + }, { "name": "contextId", "in": "path", @@ -8794,40 +9111,16 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "content" - ], - "properties": { - "content": { - "type": "object", - "description": "content items with it and order values", - "required": [ - "id", - "order" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "order": { - "type": "integer", - "format": "int64" - } - } - } - } - } - } - } - }, "parameters": [ + { + "name": "content", + "in": "query", + "description": "content items with it and order values", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "contextId", "in": "path", @@ -9009,4 +9302,4 @@ } }, "tags": [] -} +} \ No newline at end of file diff --git a/src/modules/modals/CreateContext.vue b/src/modules/modals/CreateContext.vue index e8e90f19b..26970d976 100644 --- a/src/modules/modals/CreateContext.vue +++ b/src/modules/modals/CreateContext.vue @@ -1,5 +1,5 @@