From becee17423db7d5d43c65a5b7ea8a6734e633d00 Mon Sep 17 00:00:00 2001 From: Christoph Wurst Date: Fri, 1 Dec 2023 16:50:24 +0100 Subject: [PATCH] fixup! fix(dav): Make current ooo info time-dependent Signed-off-by: Christoph Wurst --- .../lib/Controller/OutOfOfficeController.php | 4 +- apps/dav/lib/ResponseDefinitions.php | 2 +- apps/dav/openapi.json | 66 +++++++++---------- 3 files changed, 36 insertions(+), 36 deletions(-) diff --git a/apps/dav/lib/Controller/OutOfOfficeController.php b/apps/dav/lib/Controller/OutOfOfficeController.php index 51753a37ab618..69603231412a5 100644 --- a/apps/dav/lib/Controller/OutOfOfficeController.php +++ b/apps/dav/lib/Controller/OutOfOfficeController.php @@ -42,7 +42,7 @@ /** * @psalm-import-type DAVOutOfOfficeData from ResponseDefinitions - * @psalm-import-type DAVOutOfOfficeData2 from ResponseDefinitions + * @psalm-import-type DAVCurentOutOfOfficeData from ResponseDefinitions */ class OutOfOfficeController extends OCSController { @@ -61,7 +61,7 @@ public function __construct( * Get the currently configured out-of-office data of a user. * * @param string $userId The user id to get out-of-office data for. - * @return DataResponse|DataResponse + * @return DataResponse|DataResponse * * 200: Out-of-office data * 404: No out-of-office data was found diff --git a/apps/dav/lib/ResponseDefinitions.php b/apps/dav/lib/ResponseDefinitions.php index 3db2c558c3074..a90d31fdc0a62 100644 --- a/apps/dav/lib/ResponseDefinitions.php +++ b/apps/dav/lib/ResponseDefinitions.php @@ -40,7 +40,7 @@ * } * * @todo this is a copy of \OCP\User\IOutOfOfficeData - * @psalm-type DAVOutOfOfficeData2 = DAVOutOfOfficeDataCommon&array{ + * @psalm-type DAVCurentOutOfOfficeData = DAVOutOfOfficeDataCommon&array{ * id: string, * startDate: int, * endDate: int, diff --git a/apps/dav/openapi.json b/apps/dav/openapi.json index 759d3c4041c4a..6cb2f8e3857a8 100644 --- a/apps/dav/openapi.json +++ b/apps/dav/openapi.json @@ -42,6 +42,38 @@ } } }, + "CurentOutOfOfficeData": { + "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": [ @@ -97,38 +129,6 @@ } ] }, - "OutOfOfficeData2": { - "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" - } - } - } - ] - }, "OutOfOfficeDataCommon": { "type": "object", "required": [ @@ -323,7 +323,7 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/OutOfOfficeData2" + "$ref": "#/components/schemas/CurentOutOfOfficeData" } } }