aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/openapi.json
diff options
context:
space:
mode:
authorChristoph Wurst <christoph@winzerhof-wurst.at>2023-12-01 10:46:16 +0100
committerChristoph Wurst <christoph@winzerhof-wurst.at>2023-12-05 08:36:50 +0100
commit9a206c6282a55c9fdeb99abe8684199c0f934d7f (patch)
treeafbcabe90d48f80bf26284651bbbfceba806bb4e /apps/dav/openapi.json
parente27e2e43955bc09bbce86b4cfe458a2af2f66724 (diff)
downloadnextcloud-server-9a206c6282a55c9fdeb99abe8684199c0f934d7f.tar.gz
nextcloud-server-9a206c6282a55c9fdeb99abe8684199c0f934d7f.zip
fix(dav): Make current ooo info time-dependent
* If there is an out of office absence info and it happens now -> return data * Else: return no data Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'apps/dav/openapi.json')
-rw-r--r--apps/dav/openapi.json182
1 files changed, 164 insertions, 18 deletions
diff --git a/apps/dav/openapi.json b/apps/dav/openapi.json
index a235e3bff1d..a0df1cedd16 100644
--- a/apps/dav/openapi.json
+++ b/apps/dav/openapi.json
@@ -42,6 +42,38 @@
}
}
},
+ "CurrentOutOfOfficeData": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OutOfOfficeDataCommon"
+ },
+ {
+ "type": "object",
+ "required": [
+ "id",
+ "startDate",
+ "endDate",
+ "shortMessage"
+ ],
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "startDate": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "endDate": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "shortMessage": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ },
"OCSMeta": {
"type": "object",
"required": [
@@ -67,32 +99,46 @@
}
},
"OutOfOfficeData": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/OutOfOfficeDataCommon"
+ },
+ {
+ "type": "object",
+ "required": [
+ "id",
+ "firstDay",
+ "lastDay",
+ "status"
+ ],
+ "properties": {
+ "id": {
+ "type": "integer",
+ "format": "int64"
+ },
+ "firstDay": {
+ "type": "string"
+ },
+ "lastDay": {
+ "type": "string"
+ },
+ "status": {
+ "type": "string"
+ }
+ }
+ }
+ ]
+ },
+ "OutOfOfficeDataCommon": {
"type": "object",
"required": [
- "id",
"userId",
- "firstDay",
- "lastDay",
- "status",
"message"
],
"properties": {
- "id": {
- "type": "integer",
- "format": "int64"
- },
"userId": {
"type": "string"
},
- "firstDay": {
- "type": "string"
- },
- "lastDay": {
- "type": "string"
- },
- "status": {
- "type": "string"
- },
"message": {
"type": "string"
}
@@ -219,7 +265,7 @@
}
}
},
- "/ocs/v2.php/apps/dav/api/v1/outOfOffice/{userId}": {
+ "/ocs/v2.php/apps/dav/api/v1/outOfOffice/{userId}/now": {
"get": {
"operationId": "out_of_office-get-current-out-of-office-data",
"summary": "Get the currently configured out-of-office data of a user.",
@@ -277,6 +323,106 @@
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
+ "$ref": "#/components/schemas/CurrentOutOfOfficeData"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "No out-of-office data was found",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
+ "nullable": true
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/ocs/v2.php/apps/dav/api/v1/outOfOffice/{userId}": {
+ "get": {
+ "operationId": "out_of_office-get-out-of-office",
+ "summary": "Get the configured out-of-office data of a user.",
+ "tags": [
+ "out_of_office"
+ ],
+ "security": [
+ {
+ "bearer_auth": []
+ },
+ {
+ "basic_auth": []
+ }
+ ],
+ "parameters": [
+ {
+ "name": "userId",
+ "in": "path",
+ "description": "The user id to get out-of-office data for.",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "name": "OCS-APIRequest",
+ "in": "header",
+ "description": "Required to be true for the API request to pass",
+ "required": true,
+ "schema": {
+ "type": "boolean",
+ "default": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Out-of-office data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "required": [
+ "ocs"
+ ],
+ "properties": {
+ "ocs": {
+ "type": "object",
+ "required": [
+ "meta",
+ "data"
+ ],
+ "properties": {
+ "meta": {
+ "$ref": "#/components/schemas/OCSMeta"
+ },
+ "data": {
"$ref": "#/components/schemas/OutOfOfficeData"
}
}