Skip to content

Commit

Permalink
fixup! fix(dav): Make current ooo info time-dependent
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
  • Loading branch information
ChristophWurst committed Dec 1, 2023
1 parent f6a1fbd commit becee17
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 36 deletions.
4 changes: 2 additions & 2 deletions apps/dav/lib/Controller/OutOfOfficeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

Expand All @@ -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<Http::STATUS_OK, DAVOutOfOfficeData2, array{}>|DataResponse<Http::STATUS_NOT_FOUND, null, array{}>
* @return DataResponse<Http::STATUS_OK, DAVCurentOutOfOfficeData, array{}>|DataResponse<Http::STATUS_NOT_FOUND, null, array{}>
*
* 200: Out-of-office data
* 404: No out-of-office data was found
Expand Down
2 changes: 1 addition & 1 deletion apps/dav/lib/ResponseDefinitions.php
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
66 changes: 33 additions & 33 deletions apps/dav/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": [
Expand Down Expand Up @@ -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": [
Expand Down Expand Up @@ -323,7 +323,7 @@
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"$ref": "#/components/schemas/OutOfOfficeData2"
"$ref": "#/components/schemas/CurentOutOfOfficeData"
}
}
}
Expand Down

0 comments on commit becee17

Please sign in to comment.