Skip to content

Commit b9bb2f9

Browse files
committed
chore: update openAPI specification
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
1 parent be578fc commit b9bb2f9

5 files changed

Lines changed: 1648 additions & 1046 deletions

File tree

apps/appstore/lib/Controller/ApiController.php

Lines changed: 39 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ public function __construct(
6060

6161
/**
6262
* Get all available categories
63+
*
64+
* @return DataResponse<Http::STATUS_OK, list<array{id: string, displayName: string}>, array{}>
65+
*
66+
* 200: The categories were found successfully
6367
*/
6468
#[ApiRoute(verb: 'GET', url: '/api/v1/apps/categories')]
6569
public function listCategories(): DataResponse {
@@ -78,6 +82,9 @@ public function listCategories(): DataResponse {
7882
* Get all available apps
7983
*
8084
* @param bool $details - Whether to include detailed appstore information about the app
85+
* @return DataResponse<Http::STATUS_OK, list<array{id: string, name: string, description: string, ...}>, array{}>
86+
*
87+
* 200: The apps were found successfully
8188
*/
8289
#[ApiRoute(verb: 'GET', url: '/api/v1/apps')]
8390
public function listApps(bool $details = false): DataResponse {
@@ -142,8 +149,12 @@ public function listApps(bool $details = false): DataResponse {
142149
* App will be enabled for specific groups only if $groups is defined
143150
*
144151
* @param string $appId - The app to enable
145-
* @param array $groups - The groups to enable the app for
146-
* @return DataResponse
152+
* @param list<string> $groups - The groups to enable the app for
153+
*
154+
* @return DataResponse<Http::STATUS_OK, array{update_required: bool}, array{}>
155+
* @throws OCSException - if the app could not be enabled
156+
*
157+
* 200: App successfully enabled
147158
*/
148159
#[PasswordConfirmationRequired(strict: true)]
149160
#[ApiRoute(verb: 'POST', url: '/api/v1/apps/enable')]
@@ -173,6 +184,13 @@ public function enableApp(string $appId, array $groups = []): DataResponse {
173184

174185
/**
175186
* Disable an app
187+
*
188+
* @param string $appId - The app to disable
189+
*
190+
* @return DataResponse<Http::STATUS_OK, array{}, array{}>
191+
* @throws OCSException - if the app could not be disabled
192+
*
193+
* 200: App successfully disabled
176194
*/
177195
#[PasswordConfirmationRequired(strict: false)]
178196
#[ApiRoute(verb: 'POST', url: '/api/v1/apps/disable')]
@@ -189,7 +207,14 @@ public function disableApp(string $appId): DataResponse {
189207
}
190208

191209
/**
192-
* Uninstall an app
210+
* Uninstall an app.
211+
* This will disable the app - if needed - and then remove the app from the system
212+
*
213+
* @param string $appId - The app to uninstall
214+
* @return DataResponse<Http::STATUS_OK, array{}, array{}>
215+
* @throws OCSException - if the app could not be uninstalled
216+
*
217+
* 200: App successfully uninstalled
193218
*/
194219
#[PasswordConfirmationRequired(strict: true)]
195220
#[ApiRoute(verb: 'POST', url: '/api/v1/apps/uninstall')]
@@ -211,6 +236,12 @@ public function uninstallApp(string $appId): DataResponse {
211236

212237
/**
213238
* Update an app
239+
*
240+
* @param string $appId - The app to update
241+
* @return DataResponse<Http::STATUS_OK, array{}, array{}>
242+
* @throws OCSException - if the app could not be updated
243+
*
244+
* 200: App successfully updated
214245
*/
215246
#[PasswordConfirmationRequired(strict: true)]
216247
#[ApiRoute(verb: 'POST', url: '/api/v1/apps/update')]
@@ -233,8 +264,12 @@ public function updateApp(string $appId): DataResponse {
233264
}
234265
/**
235266
* Force enable an app.
267+
* This will override the nextcloud version requirement for an app
268+
*
269+
* @param string $appId - The app to force enable
270+
* @return DataResponse<Http::STATUS_OK, array{}, array{}>
236271
*
237-
* @return JSONResponse
272+
* 200: App successfully force enabled
238273
*/
239274
#[PasswordConfirmationRequired(strict: true)]
240275
#[ApiRoute(verb: 'POST', url: '/api/v1/apps/force')]

apps/appstore/openapi-administration.json

Lines changed: 0 additions & 104 deletions
This file was deleted.

0 commit comments

Comments
 (0)