From f92a6c836a8052903687882d63f4d0109f78663e Mon Sep 17 00:00:00 2001 From: provokateurin Date: Thu, 26 Sep 2024 06:38:17 +0200 Subject: [PATCH] fix(dev): Use non-ambigous array syntax in OpenAPI tutorial Signed-off-by: provokateurin --- developer_manual/client_apis/OCS/ocs-openapi.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/developer_manual/client_apis/OCS/ocs-openapi.rst b/developer_manual/client_apis/OCS/ocs-openapi.rst index 66568b720b7..f23e6f030cd 100644 --- a/developer_manual/client_apis/OCS/ocs-openapi.rst +++ b/developer_manual/client_apis/OCS/ocs-openapi.rst @@ -143,7 +143,7 @@ For those endpoints returning ``[]`` in PHP is a problem because the consumer wi If you are not able to use ``null`` for whatever reason, use ``new \stdClass()`` instead. It will get correctly converted into ``{}`` in the JSON response on Nextcloud 28 and later. -If you are working with an existing API where you can not break compatibility, you can also type the result as ``array``. +If you are working with an existing API where you can not break compatibility, you can also type the result as ``list``. .. collapse:: Examples @@ -178,7 +178,7 @@ If you are working with an existing API where you can not break compatibility, y } /** - * @return DataResponse, array{}> + * @return DataResponse, array{}> */ public function someControllerMethod() { ... @@ -719,7 +719,7 @@ Now you have to add the correct return type annotation: class Capabilities implements ICapability { /** - * @return array{todo: array{supported-operations: string[], emojis-supported: bool}} + * @return array{todo: array{supported-operations: list, emojis-supported: bool}} */ public function getCapabilities() { return [