diff options
author | jld3103 <jld3103yt@gmail.com> | 2023-03-17 10:53:15 +0100 |
---|---|---|
committer | jld3103 <jld3103yt@gmail.com> | 2023-07-10 17:25:58 +0200 |
commit | b58ef2c0b171b258292a1b63040dee2758abdec4 (patch) | |
tree | 664bc8c2bb34ffe5b2f040c1f0120763ae90e3af /apps/theming/lib/Controller/IconController.php | |
parent | c0f3588098aee1219a95e410457f3e39f3be9610 (diff) | |
download | nextcloud-server-b58ef2c0b171b258292a1b63040dee2758abdec4.tar.gz nextcloud-server-b58ef2c0b171b258292a1b63040dee2758abdec4.zip |
theming: Add OpenAPI spec
Signed-off-by: jld3103 <jld3103yt@gmail.com>
Diffstat (limited to 'apps/theming/lib/Controller/IconController.php')
-rw-r--r-- | apps/theming/lib/Controller/IconController.php | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/apps/theming/lib/Controller/IconController.php b/apps/theming/lib/Controller/IconController.php index 1b16293a7f3..86b45fbbc03 100644 --- a/apps/theming/lib/Controller/IconController.php +++ b/apps/theming/lib/Controller/IconController.php @@ -8,6 +8,7 @@ * @author Julius Härtl <jus@bitgrid.net> * @author Michael Weimann <mail@michael-weimann.eu> * @author Roeland Jago Douma <roeland@famdouma.nl> + * @author Kate Döen <kate.doeen@nextcloud.com> * * @license GNU AGPL version 3 or any later version * @@ -80,10 +81,15 @@ class IconController extends Controller { * @PublicPage * @NoCSRFRequired * - * @param $app string app name - * @param $image string image file name (svg required) - * @return FileDisplayResponse|NotFoundResponse + * Get a themed icon + * + * @param string $app ID of the app + * @param string $image image file name (svg required) + * @return FileDisplayResponse<Http::STATUS_OK, array{Content-Type: 'image/svg+xml'}>|NotFoundResponse<Http::STATUS_NOT_FOUND, array{}> * @throws \Exception + * + * 200: Themed icon returned + * 404: Themed icon not found */ public function getThemedIcon(string $app, string $image): Response { $color = $this->themingDefaults->getColorPrimary(); @@ -107,9 +113,12 @@ class IconController extends Controller { * @PublicPage * @NoCSRFRequired * - * @param $app string app name - * @return FileDisplayResponse|DataDisplayResponse|NotFoundResponse + * @param string $app ID of the app + * @return DataDisplayResponse<Http::STATUS_OK, array{Content-Type: 'image/x-icon'}>|FileDisplayResponse<Http::STATUS_OK, array{Content-Type: 'image/x-icon'}>|NotFoundResponse<Http::STATUS_NOT_FOUND, array{}> * @throws \Exception + * + * 200: Favicon returned + * 404: Favicon not found */ public function getFavicon(string $app = 'core'): Response { $response = null; @@ -146,9 +155,12 @@ class IconController extends Controller { * @PublicPage * @NoCSRFRequired * - * @param $app string app name - * @return DataDisplayResponse|FileDisplayResponse|NotFoundResponse + * @param string $app ID of the app + * @return DataDisplayResponse<Http::STATUS_OK, array{Content-Type: 'image/png'}>|FileDisplayResponse<Http::STATUS_OK, array{Content-Type: 'image/x-icon'|'image/png'}>|NotFoundResponse<Http::STATUS_NOT_FOUND, array{}> * @throws \Exception + * + * 200: Touch icon returned + * 404: Touch icon not found */ public function getTouchIcon(string $app = 'core'): Response { $response = null; |