aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorjld3103 <jld3103yt@gmail.com>2023-09-14 12:26:14 +0200
committerjld3103 <jld3103yt@gmail.com>2023-09-14 15:49:13 +0200
commit79b8b5c0f20ffee738b57f3b2b5779a8002a9c23 (patch)
treec5eac6222105aadaed1120a2db846b4a74829556 /lib
parent30a7eabad3f00fe10fa2d66725297a559aa82c3c (diff)
downloadnextcloud-server-79b8b5c0f20ffee738b57f3b2b5779a8002a9c23.tar.gz
nextcloud-server-79b8b5c0f20ffee738b57f3b2b5779a8002a9c23.zip
core: Fix OpenAPI for reference API
Signed-off-by: jld3103 <jld3103yt@gmail.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/public/Collaboration/Reference/IReference.php7
-rw-r--r--lib/public/Collaboration/Reference/Reference.php2
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/public/Collaboration/Reference/IReference.php b/lib/public/Collaboration/Reference/IReference.php
index 1b9157fd9b1..c0cfa72c36d 100644
--- a/lib/public/Collaboration/Reference/IReference.php
+++ b/lib/public/Collaboration/Reference/IReference.php
@@ -126,4 +126,11 @@ interface IReference extends JsonSerializable {
* @since 25.0.0
*/
public function getOpenGraphObject(): array;
+
+ /**
+ * @return array{richObjectType: string, richObject: array<string, mixed>, openGraphObject: array{id: string, name: string, description: ?string, thumb: ?string, link: string}, accessible: bool}
+ *
+ * @since 25.0.0
+ */
+ public function jsonSerialize(): array;
}
diff --git a/lib/public/Collaboration/Reference/Reference.php b/lib/public/Collaboration/Reference/Reference.php
index 0dcb665713c..8dc88edbeac 100644
--- a/lib/public/Collaboration/Reference/Reference.php
+++ b/lib/public/Collaboration/Reference/Reference.php
@@ -242,7 +242,7 @@ class Reference implements IReference {
* @since 25.0.0
* @return array{richObjectType: string, richObject: array<string, mixed>, openGraphObject: OpenGraphObject, accessible: bool}
*/
- public function jsonSerialize() {
+ public function jsonSerialize(): array {
return [
'richObjectType' => $this->getRichObjectType(),
'richObject' => $this->getRichObject(),