Browse Source

Add single status code descriptions for OpenAPI

Signed-off-by: jld3103 <jld3103yt@gmail.com>
tags/v28.0.0beta1
jld3103 8 months ago
parent
commit
c2d45cb172
No account linked to committer's email address
44 changed files with 228 additions and 130 deletions
  1. 6
    0
      apps/dashboard/lib/Controller/DashboardApiController.php
  2. 3
    3
      apps/dashboard/openapi.json
  3. 6
    0
      apps/federatedfilesharing/lib/Controller/RequestHandlerController.php
  4. 3
    3
      apps/federatedfilesharing/openapi.json
  5. 2
    6
      apps/files/lib/Controller/ApiController.php
  6. 2
    0
      apps/files/lib/Controller/DirectEditingController.php
  7. 2
    0
      apps/files/lib/Controller/TemplateController.php
  8. 2
    40
      apps/files/openapi.json
  9. 2
    0
      apps/files_external/lib/Controller/ApiController.php
  10. 1
    1
      apps/files_external/openapi.json
  11. 2
    0
      apps/files_sharing/lib/Controller/DeletedShareAPIController.php
  12. 4
    0
      apps/files_sharing/lib/Controller/RemoteController.php
  13. 2
    0
      apps/files_sharing/lib/Controller/ShareAPIController.php
  14. 2
    0
      apps/files_sharing/lib/Controller/ShareesAPIController.php
  15. 5
    5
      apps/files_sharing/openapi.json
  16. 2
    0
      apps/provisioning_api/lib/Controller/AppConfigController.php
  17. 8
    0
      apps/provisioning_api/lib/Controller/AppsController.php
  18. 16
    0
      apps/provisioning_api/lib/Controller/GroupsController.php
  19. 38
    0
      apps/provisioning_api/lib/Controller/UsersController.php
  20. 32
    32
      apps/provisioning_api/openapi.json
  21. 2
    0
      apps/settings/lib/Controller/LogSettingsController.php
  22. 1
    1
      apps/settings/openapi.json
  23. 2
    0
      apps/theming/lib/Controller/ThemingController.php
  24. 2
    0
      apps/theming/lib/Controller/UserThemeController.php
  25. 2
    2
      apps/theming/openapi.json
  26. 1
    1
      apps/updatenotification/appinfo/routes.php
  27. 2
    0
      apps/user_ldap/lib/Controller/ConfigAPIController.php
  28. 1
    1
      apps/user_ldap/openapi.json
  29. 2
    0
      apps/user_status/lib/Controller/PredefinedStatusController.php
  30. 3
    1
      apps/user_status/lib/Controller/StatusesController.php
  31. 2
    0
      apps/user_status/lib/Controller/UserStatusController.php
  32. 4
    4
      apps/user_status/openapi.json
  33. 12
    0
      apps/weather_status/lib/Controller/WeatherStatusController.php
  34. 6
    6
      apps/weather_status/openapi.json
  35. 2
    0
      core/Controller/AutoCompleteController.php
  36. 2
    0
      core/Controller/ClientFlowLoginV2Controller.php
  37. 2
    0
      core/Controller/OCSController.php
  38. 10
    0
      core/Controller/ReferenceApiController.php
  39. 2
    0
      core/Controller/TextProcessingApiController.php
  40. 2
    0
      core/Controller/TranslationApiController.php
  41. 2
    0
      core/Controller/UnifiedSearchController.php
  42. 11
    11
      core/openapi.json
  43. 1
    1
      vendor-bin/openapi-extractor/composer.json
  44. 12
    12
      vendor-bin/openapi-extractor/composer.lock

+ 6
- 0
apps/dashboard/lib/Controller/DashboardApiController.php View File

* @param int $limit Limit number of result items per widget * @param int $limit Limit number of result items per widget
* @param string[] $widgets Limit results to specific widgets * @param string[] $widgets Limit results to specific widgets
* @return DataResponse<Http::STATUS_OK, array<string, DashboardWidgetItem[]>, array{}> * @return DataResponse<Http::STATUS_OK, array<string, DashboardWidgetItem[]>, array{}>
*
* 200: Widget items returned
*/ */
public function getWidgetItems(array $sinceIds = [], int $limit = 7, array $widgets = []): DataResponse { public function getWidgetItems(array $sinceIds = [], int $limit = 7, array $widgets = []): DataResponse {
$items = []; $items = [];
* @param int $limit Limit number of result items per widget * @param int $limit Limit number of result items per widget
* @param string[] $widgets Limit results to specific widgets * @param string[] $widgets Limit results to specific widgets
* @return DataResponse<Http::STATUS_OK, array<string, DashboardWidgetItems>, array{}> * @return DataResponse<Http::STATUS_OK, array<string, DashboardWidgetItems>, array{}>
*
* 200: Widget items returned
*/ */
public function getWidgetItemsV2(array $sinceIds = [], int $limit = 7, array $widgets = []): DataResponse { public function getWidgetItemsV2(array $sinceIds = [], int $limit = 7, array $widgets = []): DataResponse {
$items = []; $items = [];
* @NoCSRFRequired * @NoCSRFRequired
* *
* @return DataResponse<Http::STATUS_OK, array<string, DashboardWidget>, array{}> * @return DataResponse<Http::STATUS_OK, array<string, DashboardWidget>, array{}>
*
* 200: Widgets returned
*/ */
public function getWidgets(): DataResponse { public function getWidgets(): DataResponse {
$widgets = $this->dashboardManager->getWidgets(); $widgets = $this->dashboardManager->getWidgets();

+ 3
- 3
apps/dashboard/openapi.json View File

], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Widgets returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Widget items returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Widget items returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {

+ 6
- 0
apps/federatedfilesharing/lib/Controller/RequestHandlerController.php View File

* @param string|null $ownerFederatedId Federated ID of the receiver * @param string|null $ownerFederatedId Federated ID of the receiver
* @return Http\DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return Http\DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: Share created successfully
*/ */
public function createShare( public function createShare(
?string $remote = null, ?string $remote = null,
* @param string|null $token Shared secret between servers * @param string|null $token Shared secret between servers
* @return Http\DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return Http\DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: Share declined successfully
*/ */
public function declineShare(int $id, ?string $token = null) { public function declineShare(int $id, ?string $token = null) {
$notification = [ $notification = [
* @param string|null $token Shared secret between servers * @param string|null $token Shared secret between servers
* @return Http\DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return Http\DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: Share unshared successfully
*/ */
public function unshare(int $id, ?string $token = null) { public function unshare(int $id, ?string $token = null) {
if (!$this->isS2SEnabled()) { if (!$this->isS2SEnabled()) {

+ 3
- 3
apps/federatedfilesharing/openapi.json View File

], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Share created successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Share declined successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Share unshared successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {

+ 2
- 6
apps/files/lib/Controller/ApiController.php View File

use OCA\Files\Service\ViewConfig; use OCA\Files\Service\ViewConfig;
use OCP\AppFramework\Controller; use OCP\AppFramework\Controller;
use OCP\AppFramework\Http; use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI;
use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\AppFramework\Http\ContentSecurityPolicy;
use OCP\AppFramework\Http\DataResponse; use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\FileDisplayResponse; use OCP\AppFramework\Http\FileDisplayResponse;
* @NoAdminRequired * @NoAdminRequired
* @NoCSRFRequired * @NoCSRFRequired
* @PublicPage * @PublicPage
*
* Get the service-worker Javascript for previews
*
* @psalm-suppress MoreSpecificReturnType The value of Service-Worker-Allowed is not relevant
* @psalm-suppress LessSpecificReturnStatement The value of Service-Worker-Allowed is not relevant
* @return StreamResponse<Http::STATUS_OK, array{Content-Type: 'application/javascript', Service-Worker-Allowed: string}>
*/ */
#[IgnoreOpenAPI]
public function serviceWorker(): StreamResponse { public function serviceWorker(): StreamResponse {
$response = new StreamResponse(__DIR__ . '/../../../../dist/preview-service-worker.js'); $response = new StreamResponse(__DIR__ . '/../../../../dist/preview-service-worker.js');
$response->setHeaders([ $response->setHeaders([

+ 2
- 0
apps/files/lib/Controller/DirectEditingController.php View File

* *
* Get the direct editing capabilities * Get the direct editing capabilities
* @return DataResponse<Http::STATUS_OK, array{editors: array<string, array{id: string, name: string, mimetypes: string[], optionalMimetypes: string[], secure: bool}>, creators: array<string, array{id: string, editor: string, name: string, extension: string, templates: bool, mimetypes: string[]}>}, array{}> * @return DataResponse<Http::STATUS_OK, array{editors: array<string, array{id: string, name: string, mimetypes: string[], optionalMimetypes: string[], secure: bool}>, creators: array<string, array{id: string, editor: string, name: string, extension: string, templates: bool, mimetypes: string[]}>}, array{}>
*
* 200: Direct editing capabilities returned
*/ */
public function info(): DataResponse { public function info(): DataResponse {
$response = new DataResponse($this->directEditingService->getDirectEditingCapabilitites()); $response = new DataResponse($this->directEditingService->getDirectEditingCapabilitites());

+ 2
- 0
apps/files/lib/Controller/TemplateController.php View File

* List the available templates * List the available templates
* *
* @return DataResponse<Http::STATUS_OK, array<FilesTemplateFileCreator>, array{}> * @return DataResponse<Http::STATUS_OK, array<FilesTemplateFileCreator>, array{}>
*
* 200: Available templates returned
*/ */
public function list(): DataResponse { public function list(): DataResponse {
return new DataResponse($this->templateManager->listTemplates()); return new DataResponse($this->templateManager->listTemplates());

+ 2
- 40
apps/files/openapi.json View File

} }
} }
}, },
"/index.php/apps/files/preview-service-worker.js": {
"get": {
"operationId": "api-service-worker",
"summary": "Get the service-worker Javascript for previews",
"tags": [
"api"
],
"security": [
{},
{
"bearer_auth": []
},
{
"basic_auth": []
}
],
"responses": {
"200": {
"description": "",
"headers": {
"Service-Worker-Allowed": {
"schema": {
"type": "string"
}
}
},
"content": {
"application/javascript": {
"schema": {
"type": "string",
"format": "binary"
}
}
}
}
}
}
},
"/ocs/v2.php/apps/files/api/v1/directEditing": { "/ocs/v2.php/apps/files/api/v1/directEditing": {
"get": { "get": {
"operationId": "direct_editing-info", "operationId": "direct_editing-info",
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Direct editing capabilities returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Available templates returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {

+ 2
- 0
apps/files_external/lib/Controller/ApiController.php View File

* Get the mount points visible for this user * Get the mount points visible for this user
* *
* @return DataResponse<Http::STATUS_OK, FilesExternalMount[], array{}> * @return DataResponse<Http::STATUS_OK, FilesExternalMount[], array{}>
*
* 200: User mounts returned
*/ */
public function getUserMounts(): DataResponse { public function getUserMounts(): DataResponse {
$entries = []; $entries = [];

+ 1
- 1
apps/files_external/openapi.json View File

], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "User mounts returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {

+ 2
- 0
apps/files_sharing/lib/Controller/DeletedShareAPIController.php View File

* Get a list of all deleted shares * Get a list of all deleted shares
* *
* @return DataResponse<Http::STATUS_OK, FilesSharingDeletedShare[], array{}> * @return DataResponse<Http::STATUS_OK, FilesSharingDeletedShare[], array{}>
*
* 200: Deleted shares returned
*/ */
public function index(): DataResponse { public function index(): DataResponse {
$groupShares = $this->shareManager->getDeletedSharedWith($this->userId, IShare::TYPE_GROUP, null, -1, 0); $groupShares = $this->shareManager->getDeletedSharedWith($this->userId, IShare::TYPE_GROUP, null, -1, 0);

+ 4
- 0
apps/files_sharing/lib/Controller/RemoteController.php View File

* Get list of pending remote shares * Get list of pending remote shares
* *
* @return DataResponse<Http::STATUS_OK, FilesSharingRemoteShare[], array{}> * @return DataResponse<Http::STATUS_OK, FilesSharingRemoteShare[], array{}>
*
* 200: Pending remote shares returned
*/ */
public function getOpenShares() { public function getOpenShares() {
return new DataResponse($this->externalManager->getOpenShares()); return new DataResponse($this->externalManager->getOpenShares());
* Get a list of accepted remote shares * Get a list of accepted remote shares
* *
* @return DataResponse<Http::STATUS_OK, FilesSharingRemoteShare[], array{}> * @return DataResponse<Http::STATUS_OK, FilesSharingRemoteShare[], array{}>
*
* 200: Accepted remote shares returned
*/ */
public function getShares() { public function getShares() {
$shares = $this->externalManager->getAcceptedShares(); $shares = $this->externalManager->getAcceptedShares();

+ 2
- 0
apps/files_sharing/lib/Controller/ShareAPIController.php View File

* Get all shares that are still pending * Get all shares that are still pending
* *
* @return DataResponse<Http::STATUS_OK, FilesSharingShare[], array{}> * @return DataResponse<Http::STATUS_OK, FilesSharingShare[], array{}>
*
* 200: Pending shares returned
*/ */
public function pendingShares(): DataResponse { public function pendingShares(): DataResponse {
$pendingShares = []; $pendingShares = [];

+ 2
- 0
apps/files_sharing/lib/Controller/ShareesAPIController.php View File

* @param string $itemType Limit to specific item types * @param string $itemType Limit to specific item types
* @param int|int[]|null $shareType Limit to specific share types * @param int|int[]|null $shareType Limit to specific share types
* @return DataResponse<Http::STATUS_OK, FilesSharingShareesRecommendedResult, array{}> * @return DataResponse<Http::STATUS_OK, FilesSharingShareesRecommendedResult, array{}>
*
* 200: Recommended sharees returned
*/ */
public function findRecommended(string $itemType, $shareType = null): DataResponse { public function findRecommended(string $itemType, $shareType = null): DataResponse {
$shareTypes = [ $shareTypes = [

+ 5
- 5
apps/files_sharing/openapi.json View File

], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Pending shares returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Deleted shares returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Recommended sharees returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Accepted remote shares returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Pending remote shares returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {

+ 2
- 0
apps/provisioning_api/lib/Controller/AppConfigController.php View File

* Get a list of apps * Get a list of apps
* *
* @return DataResponse<Http::STATUS_OK, array{data: string[]}, array{}> * @return DataResponse<Http::STATUS_OK, array{data: string[]}, array{}>
*
* 200: Apps returned
*/ */
public function getApps(): DataResponse { public function getApps(): DataResponse {
return new DataResponse([ return new DataResponse([

+ 8
- 0
apps/provisioning_api/lib/Controller/AppsController.php View File

* @param ?string $filter Filter for enabled or disabled apps * @param ?string $filter Filter for enabled or disabled apps
* @return DataResponse<Http::STATUS_OK, array{apps: string[]}, array{}> * @return DataResponse<Http::STATUS_OK, array{apps: string[]}, array{}>
* @throws OCSException * @throws OCSException
*
* 200: Installed apps returned
*/ */
public function getApps(?string $filter = null): DataResponse { public function getApps(?string $filter = null): DataResponse {
$apps = (new OC_App())->listAllApps(); $apps = (new OC_App())->listAllApps();
* @param string $app ID of the app * @param string $app ID of the app
* @return DataResponse<Http::STATUS_OK, ProvisioningApiAppInfo, array{}> * @return DataResponse<Http::STATUS_OK, ProvisioningApiAppInfo, array{}>
* @throws OCSException * @throws OCSException
*
* 200: App info returned
*/ */
public function getAppInfo(string $app): DataResponse { public function getAppInfo(string $app): DataResponse {
$info = $this->appManager->getAppInfo($app); $info = $this->appManager->getAppInfo($app);
* @param string $app ID of the app * @param string $app ID of the app
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: App enabled successfully
*/ */
public function enable(string $app): DataResponse { public function enable(string $app): DataResponse {
try { try {
* *
* @param string $app ID of the app * @param string $app ID of the app
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
*
* 200: App disabled successfully
*/ */
public function disable(string $app): DataResponse { public function disable(string $app): DataResponse {
$this->appManager->disableApp($app); $this->appManager->disableApp($app);

+ 16
- 0
apps/provisioning_api/lib/Controller/GroupsController.php View File

* @param ?int $limit Limit the amount of groups returned * @param ?int $limit Limit the amount of groups returned
* @param int $offset Offset for searching for groups * @param int $offset Offset for searching for groups
* @return DataResponse<Http::STATUS_OK, array{groups: string[]}, array{}> * @return DataResponse<Http::STATUS_OK, array{groups: string[]}, array{}>
*
* 200: Groups returned
*/ */
public function getGroups(string $search = '', ?int $limit = null, int $offset = 0): DataResponse { public function getGroups(string $search = '', ?int $limit = null, int $offset = 0): DataResponse {
$groups = $this->groupManager->search($search, $limit, $offset); $groups = $this->groupManager->search($search, $limit, $offset);
* @param ?int $limit Limit the amount of groups returned * @param ?int $limit Limit the amount of groups returned
* @param int $offset Offset for searching for groups * @param int $offset Offset for searching for groups
* @return DataResponse<Http::STATUS_OK, array{groups: ProvisioningApiGroupDetails[]}, array{}> * @return DataResponse<Http::STATUS_OK, array{groups: ProvisioningApiGroupDetails[]}, array{}>
*
* 200: Groups details returned
*/ */
public function getGroupsDetails(string $search = '', int $limit = null, int $offset = 0): DataResponse { public function getGroupsDetails(string $search = '', int $limit = null, int $offset = 0): DataResponse {
$groups = $this->groupManager->search($search, $limit, $offset); $groups = $this->groupManager->search($search, $limit, $offset);
* @throws OCSException * @throws OCSException
* *
* @deprecated 14 Use getGroupUsers * @deprecated 14 Use getGroupUsers
*
* 200: Group users returned
*/ */
public function getGroup(string $groupId): DataResponse { public function getGroup(string $groupId): DataResponse {
return $this->getGroupUsers($groupId); return $this->getGroupUsers($groupId);
* *
* @return DataResponse<Http::STATUS_OK, array{users: array<string, ProvisioningApiUserDetails|array{id: string}>}, array{}> * @return DataResponse<Http::STATUS_OK, array{users: array<string, ProvisioningApiUserDetails|array{id: string}>}, array{}>
* @throws OCSException * @throws OCSException
*
* 200: Group users details returned
*/ */
public function getGroupUsersDetails(string $groupId, string $search = '', int $limit = null, int $offset = 0): DataResponse { public function getGroupUsersDetails(string $groupId, string $search = '', int $limit = null, int $offset = 0): DataResponse {
$groupId = urldecode($groupId); $groupId = urldecode($groupId);
* @param string $displayname Display name of the group * @param string $displayname Display name of the group
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: Group created successfully
*/ */
public function addGroup(string $groupid, string $displayname = ''): DataResponse { public function addGroup(string $groupid, string $displayname = ''): DataResponse {
// Validate name // Validate name
* @param string $value New value for the key * @param string $value New value for the key
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: Group updated successfully
*/ */
public function updateGroup(string $groupId, string $key, string $value): DataResponse { public function updateGroup(string $groupId, string $key, string $value): DataResponse {
$groupId = urldecode($groupId); $groupId = urldecode($groupId);
* @param string $groupId ID of the group * @param string $groupId ID of the group
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: Group deleted successfully
*/ */
public function deleteGroup(string $groupId): DataResponse { public function deleteGroup(string $groupId): DataResponse {
$groupId = urldecode($groupId); $groupId = urldecode($groupId);
* @param string $groupId ID of the group * @param string $groupId ID of the group
* @return DataResponse<Http::STATUS_OK, string[], array{}> * @return DataResponse<Http::STATUS_OK, string[], array{}>
* @throws OCSException * @throws OCSException
*
* 200: Sub admins returned
*/ */
public function getSubAdminsOfGroup(string $groupId): DataResponse { public function getSubAdminsOfGroup(string $groupId): DataResponse {
// Check group exists // Check group exists

+ 38
- 0
apps/provisioning_api/lib/Controller/UsersController.php View File

* @param int|null $limit Limit the amount of groups returned * @param int|null $limit Limit the amount of groups returned
* @param int $offset Offset for searching for groups * @param int $offset Offset for searching for groups
* @return DataResponse<Http::STATUS_OK, array{users: string[]}, array{}> * @return DataResponse<Http::STATUS_OK, array{users: string[]}, array{}>
*
* 200: Users returned
*/ */
public function getUsers(string $search = '', int $limit = null, int $offset = 0): DataResponse { public function getUsers(string $search = '', int $limit = null, int $offset = 0): DataResponse {
$user = $this->userSession->getUser(); $user = $this->userSession->getUser();
* @param int|null $limit Limit the amount of groups returned * @param int|null $limit Limit the amount of groups returned
* @param int $offset Offset for searching for groups * @param int $offset Offset for searching for groups
* @return DataResponse<Http::STATUS_OK, array{users: array<string, ProvisioningApiUserDetails|array{id: string}>}, array{}> * @return DataResponse<Http::STATUS_OK, array{users: array<string, ProvisioningApiUserDetails|array{id: string}>}, array{}>
*
* 200: Users details returned
*/ */
public function getUsersDetails(string $search = '', int $limit = null, int $offset = 0): DataResponse { public function getUsersDetails(string $search = '', int $limit = null, int $offset = 0): DataResponse {
$currentUser = $this->userSession->getUser(); $currentUser = $this->userSession->getUser();
* @param string $userId ID of the user * @param string $userId ID of the user
* @return DataResponse<Http::STATUS_OK, ProvisioningApiUserDetails, array{}> * @return DataResponse<Http::STATUS_OK, ProvisioningApiUserDetails, array{}>
* @throws OCSException * @throws OCSException
*
* 200: User returned
*/ */
public function getUser(string $userId): DataResponse { public function getUser(string $userId): DataResponse {
$includeScopes = false; $includeScopes = false;
* *
* @return DataResponse<Http::STATUS_OK, ProvisioningApiUserDetails, array{}> * @return DataResponse<Http::STATUS_OK, ProvisioningApiUserDetails, array{}>
* @throws OCSException * @throws OCSException
*
* 200: Current user returned
*/ */
public function getCurrentUser(): DataResponse { public function getCurrentUser(): DataResponse {
$user = $this->userSession->getUser(); $user = $this->userSession->getUser();
* *
* @return DataResponse<Http::STATUS_OK, string[], array{}> * @return DataResponse<Http::STATUS_OK, string[], array{}>
* @throws OCSException * @throws OCSException
*
* 200: Editable fields returned
*/ */
public function getEditableFields(): DataResponse { public function getEditableFields(): DataResponse {
$currentLoggedInUser = $this->userSession->getUser(); $currentLoggedInUser = $this->userSession->getUser();
* @param string $userId ID of the user * @param string $userId ID of the user
* @return DataResponse<Http::STATUS_OK, string[], array{}> * @return DataResponse<Http::STATUS_OK, string[], array{}>
* @throws OCSException * @throws OCSException
*
* 200: Editable fields for user returned
*/ */
public function getEditableFieldsForUser(string $userId): DataResponse { public function getEditableFieldsForUser(string $userId): DataResponse {
$currentLoggedInUser = $this->userSession->getUser(); $currentLoggedInUser = $this->userSession->getUser();
* @param string $value New value for the key * @param string $value New value for the key
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: User values edited successfully
*/ */
public function editUserMultiValue( public function editUserMultiValue(
string $userId, string $userId,
* @param string $value New value for the key * @param string $value New value for the key
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: User value edited successfully
*/ */
public function editUser(string $userId, string $key, string $value): DataResponse { public function editUser(string $userId, string $key, string $value): DataResponse {
$currentLoggedInUser = $this->userSession->getUser(); $currentLoggedInUser = $this->userSession->getUser();
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* *
* @throws OCSException * @throws OCSException
*
* 200: Wiped all user devices successfully
*/ */
public function wipeUserDevices(string $userId): DataResponse { public function wipeUserDevices(string $userId): DataResponse {
/** @var IUser $currentLoggedInUser */ /** @var IUser $currentLoggedInUser */
* @param string $userId ID of the user * @param string $userId ID of the user
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: User deleted successfully
*/ */
public function deleteUser(string $userId): DataResponse { public function deleteUser(string $userId): DataResponse {
$currentLoggedInUser = $this->userSession->getUser(); $currentLoggedInUser = $this->userSession->getUser();
* @param string $userId ID of the user * @param string $userId ID of the user
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: User disabled successfully
*/ */
public function disableUser(string $userId): DataResponse { public function disableUser(string $userId): DataResponse {
return $this->setEnabled($userId, false); return $this->setEnabled($userId, false);
* @param string $userId ID of the user * @param string $userId ID of the user
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: User enabled successfully
*/ */
public function enableUser(string $userId): DataResponse { public function enableUser(string $userId): DataResponse {
return $this->setEnabled($userId, true); return $this->setEnabled($userId, true);
* @param string $userId ID of the user * @param string $userId ID of the user
* @return DataResponse<Http::STATUS_OK, array{groups: string[]}, array{}> * @return DataResponse<Http::STATUS_OK, array{groups: string[]}, array{}>
* @throws OCSException * @throws OCSException
*
* 200: Users groups returned
*/ */
public function getUsersGroups(string $userId): DataResponse { public function getUsersGroups(string $userId): DataResponse {
$loggedInUser = $this->userSession->getUser(); $loggedInUser = $this->userSession->getUser();
* @param string $groupid ID of the group * @param string $groupid ID of the group
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: User added to group successfully
*/ */
public function addToGroup(string $userId, string $groupid = ''): DataResponse { public function addToGroup(string $userId, string $groupid = ''): DataResponse {
if ($groupid === '') { if ($groupid === '') {
* @param string $groupid ID of the group * @param string $groupid ID of the group
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: User removed from group successfully
*/ */
public function removeFromGroup(string $userId, string $groupid): DataResponse { public function removeFromGroup(string $userId, string $groupid): DataResponse {
$loggedInUser = $this->userSession->getUser(); $loggedInUser = $this->userSession->getUser();
* @param string $groupid ID of the group * @param string $groupid ID of the group
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: User added as group subadmin successfully
*/ */
public function addSubAdmin(string $userId, string $groupid): DataResponse { public function addSubAdmin(string $userId, string $groupid): DataResponse {
$group = $this->groupManager->get($groupid); $group = $this->groupManager->get($groupid);
* @param string $groupid ID of the group * @param string $groupid ID of the group
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: User removed as group subadmin successfully
*/ */
public function removeSubAdmin(string $userId, string $groupid): DataResponse { public function removeSubAdmin(string $userId, string $groupid): DataResponse {
$group = $this->groupManager->get($groupid); $group = $this->groupManager->get($groupid);
* @param string $userId ID if the user * @param string $userId ID if the user
* @return DataResponse<Http::STATUS_OK, string[], array{}> * @return DataResponse<Http::STATUS_OK, string[], array{}>
* @throws OCSException * @throws OCSException
*
* 200: User subadmin groups returned
*/ */
public function getUserSubAdminGroups(string $userId): DataResponse { public function getUserSubAdminGroups(string $userId): DataResponse {
$groups = $this->getUserSubAdminGroupsData($userId); $groups = $this->getUserSubAdminGroupsData($userId);
* @param string $userId ID if the user * @param string $userId ID if the user
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
* @throws OCSException * @throws OCSException
*
* 200: Resent welcome message successfully
*/ */
public function resendWelcomeMessage(string $userId): DataResponse { public function resendWelcomeMessage(string $userId): DataResponse {
$currentLoggedInUser = $this->userSession->getUser(); $currentLoggedInUser = $this->userSession->getUser();

+ 32
- 32
apps/provisioning_api/openapi.json View File

], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Installed apps returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "App info returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "App enabled successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "App disabled successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Groups returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Group created successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Groups details returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Group users details returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Sub admins returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Group users returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Group updated successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Group deleted successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Users returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Users details returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "User returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "User value edited successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "User deleted successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Current user returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Editable fields returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Editable fields for user returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "User values edited successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Wiped all user devices successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "User enabled successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "User disabled successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Users groups returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "User added to group successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "User removed from group successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "User subadmin groups returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "User added as group subadmin successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "User removed as group subadmin successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Resent welcome message successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Apps returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {

+ 2
- 0
apps/settings/lib/Controller/LogSettingsController.php View File

* @psalm-suppress MoreSpecificReturnType The value of Content-Disposition is not relevant * @psalm-suppress MoreSpecificReturnType The value of Content-Disposition is not relevant
* @psalm-suppress LessSpecificReturnStatement The value of Content-Disposition is not relevant * @psalm-suppress LessSpecificReturnStatement The value of Content-Disposition is not relevant
* @return StreamResponse<Http::STATUS_OK, array{Content-Type: 'application/octet-stream', 'Content-Disposition': string}> * @return StreamResponse<Http::STATUS_OK, array{Content-Type: 'application/octet-stream', 'Content-Disposition': string}>
*
* 200: Logfile returned
*/ */
public function download() { public function download() {
if (!$this->log instanceof Log) { if (!$this->log instanceof Log) {

+ 1
- 1
apps/settings/openapi.json View File

], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Logfile returned",
"headers": { "headers": {
"Content-Disposition": { "Content-Disposition": {
"schema": { "schema": {

+ 2
- 0
apps/theming/lib/Controller/ThemingController.php View File

* @param string $app ID of the app * @param string $app ID of the app
* @psalm-suppress LessSpecificReturnStatement The content of the Manifest doesn't need to be described in the return type * @psalm-suppress LessSpecificReturnStatement The content of the Manifest doesn't need to be described in the return type
* @return JSONResponse<Http::STATUS_OK, array{name: string, short_name: string, start_url: string, theme_color: string, background_color: string, description: string, icons: array{src: non-empty-string, type: string, sizes: string}[], display: string}, array{}> * @return JSONResponse<Http::STATUS_OK, array{name: string, short_name: string, start_url: string, theme_color: string, background_color: string, description: string, icons: array{src: non-empty-string, type: string, sizes: string}[], display: string}, array{}>
*
* 200: Manifest returned
*/ */
public function getManifest(string $app) { public function getManifest(string $app) {
$cacheBusterValue = $this->config->getAppValue('theming', 'cachebuster', '0'); $cacheBusterValue = $this->config->getAppValue('theming', 'cachebuster', '0');

+ 2
- 0
apps/theming/lib/Controller/UserThemeController.php View File

* Delete the background * Delete the background
* *
* @return JSONResponse<Http::STATUS_OK, ThemingBackground, array{}> * @return JSONResponse<Http::STATUS_OK, ThemingBackground, array{}>
*
* 200: Background deleted successfully
*/ */
public function deleteBackground(): JSONResponse { public function deleteBackground(): JSONResponse {
$currentVersion = (int)$this->config->getUserValue($this->userId, Application::APP_ID, 'userCacheBuster', '0'); $currentVersion = (int)$this->config->getUserValue($this->userId, Application::APP_ID, 'userCacheBuster', '0');

+ 2
- 2
apps/theming/openapi.json View File

], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Manifest returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Background deleted successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {

+ 1
- 1
apps/updatenotification/appinfo/routes.php View File

['name' => 'Admin#setChannel', 'url' => '/channel', 'verb' => 'POST'], ['name' => 'Admin#setChannel', 'url' => '/channel', 'verb' => 'POST'],
], ],
'ocs' => [ 'ocs' => [
['name' => 'API#getAppList', 'url' => '/api/{apiVersion}/applist/{newVersion}', 'verb' => 'GET', 'requirements' => ['apiVersion' => 'v1']],
['name' => 'API#getAppList', 'url' => '/api/{apiVersion}/applist/{newVersion}', 'verb' => 'GET', 'requirements' => ['apiVersion' => '(v1)']],
], ],
]; ];

+ 2
- 0
apps/user_ldap/lib/Controller/ConfigAPIController.php View File

* @AuthorizedAdminSetting(settings=OCA\User_LDAP\Settings\Admin) * @AuthorizedAdminSetting(settings=OCA\User_LDAP\Settings\Admin)
* @return DataResponse<Http::STATUS_OK, array{configID: string}, array{}> * @return DataResponse<Http::STATUS_OK, array{configID: string}, array{}>
* @throws OCSException * @throws OCSException
*
* 200: Config created successfully
*/ */
public function create() { public function create() {
try { try {

+ 1
- 1
apps/user_ldap/openapi.json View File

], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Config created successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {

+ 2
- 0
apps/user_status/lib/Controller/PredefinedStatusController.php View File

* @NoAdminRequired * @NoAdminRequired
* *
* @return DataResponse<Http::STATUS_OK, UserStatusPredefined[], array{}> * @return DataResponse<Http::STATUS_OK, UserStatusPredefined[], array{}>
*
* 200: Predefined statuses returned
*/ */
public function findAll():DataResponse { public function findAll():DataResponse {
// Filtering out the invisible one, that should only be set by API // Filtering out the invisible one, that should only be set by API

+ 3
- 1
apps/user_status/lib/Controller/StatusesController.php View File

* @param int|null $limit Maximum number of statuses to find * @param int|null $limit Maximum number of statuses to find
* @param int|null $offset Offset for finding statuses * @param int|null $offset Offset for finding statuses
* @return DataResponse<Http::STATUS_OK, UserStatusPublic[], array{}> * @return DataResponse<Http::STATUS_OK, UserStatusPublic[], array{}>
*
* 200: Statuses returned
*/ */
public function findAll(?int $limit = null, ?int $offset = null): DataResponse { public function findAll(?int $limit = null, ?int $offset = null): DataResponse {
$allStatuses = $this->service->findAll($limit, $offset); $allStatuses = $this->service->findAll($limit, $offset);
* @return DataResponse<Http::STATUS_OK, UserStatusPublic, array{}> * @return DataResponse<Http::STATUS_OK, UserStatusPublic, array{}>
* @throws OCSNotFoundException The user was not found * @throws OCSNotFoundException The user was not found
* *
* 200: The status was found successfully
* 200: Status returned
*/ */
public function find(string $userId): DataResponse { public function find(string $userId): DataResponse {
try { try {

+ 2
- 0
apps/user_status/lib/Controller/UserStatusController.php View File

* @NoAdminRequired * @NoAdminRequired
* *
* @return DataResponse<Http::STATUS_OK, array<empty>, array{}> * @return DataResponse<Http::STATUS_OK, array<empty>, array{}>
*
* 200: Message cleared successfully
*/ */
public function clearMessage(): DataResponse { public function clearMessage(): DataResponse {
$this->service->clearMessage($this->userId); $this->service->clearMessage($this->userId);

+ 4
- 4
apps/user_status/openapi.json View File

], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Statuses returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "The status was found successfully",
"description": "Status returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Message cleared successfully",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Predefined statuses returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {

+ 12
- 0
apps/weather_status/lib/Controller/WeatherStatusController.php View File

* Try to use the address set in user personal settings as weather location * Try to use the address set in user personal settings as weather location
* *
* @return DataResponse<Http::STATUS_OK, array{success: bool, lat: ?float, lon: ?float, address: ?string}, array{}> * @return DataResponse<Http::STATUS_OK, array{success: bool, lat: ?float, lon: ?float, address: ?string}, array{}>
*
* 200: Address updated
*/ */
public function usePersonalAddress(): DataResponse { public function usePersonalAddress(): DataResponse {
return new DataResponse($this->service->usePersonalAddress()); return new DataResponse($this->service->usePersonalAddress());
* *
* @param int $mode New mode * @param int $mode New mode
* @return DataResponse<Http::STATUS_OK, array{success: bool}, array{}> * @return DataResponse<Http::STATUS_OK, array{success: bool}, array{}>
*
* 200: Weather status mode updated
*/ */
public function setMode(int $mode): DataResponse { public function setMode(int $mode): DataResponse {
return new DataResponse($this->service->setMode($mode)); return new DataResponse($this->service->setMode($mode));
* @param float|null $lat Latitude in decimal degree format * @param float|null $lat Latitude in decimal degree format
* @param float|null $lon Longitude in decimal degree format * @param float|null $lon Longitude in decimal degree format
* @return DataResponse<Http::STATUS_OK, array{success: bool, lat: ?float, lon: ?float, address: ?string}, array{}> * @return DataResponse<Http::STATUS_OK, array{success: bool, lat: ?float, lon: ?float, address: ?string}, array{}>
*
* 200: Location updated
*/ */
public function setLocation(?string $address, ?float $lat, ?float $lon): DataResponse { public function setLocation(?string $address, ?float $lat, ?float $lon): DataResponse {
$currentWeather = $this->service->setLocation($address, $lat, $lon); $currentWeather = $this->service->setLocation($address, $lat, $lon);
* Get stored user location * Get stored user location
* *
* @return DataResponse<Http::STATUS_OK, array{lat: float, lon: float, address: string, mode: int}, array{}> * @return DataResponse<Http::STATUS_OK, array{lat: float, lon: float, address: string, mode: int}, array{}>
*
* 200: Location returned
*/ */
public function getLocation(): DataResponse { public function getLocation(): DataResponse {
$location = $this->service->getLocation(); $location = $this->service->getLocation();
* Get favorites list * Get favorites list
* *
* @return DataResponse<Http::STATUS_OK, string[], array{}> * @return DataResponse<Http::STATUS_OK, string[], array{}>
*
* 200: Favorites returned
*/ */
public function getFavorites(): DataResponse { public function getFavorites(): DataResponse {
return new DataResponse($this->service->getFavorites()); return new DataResponse($this->service->getFavorites());
* *
* @param string[] $favorites Favorite addresses * @param string[] $favorites Favorite addresses
* @return DataResponse<Http::STATUS_OK, array{success: bool}, array{}> * @return DataResponse<Http::STATUS_OK, array{success: bool}, array{}>
*
* 200: Favorites updated
*/ */
public function setFavorites(array $favorites): DataResponse { public function setFavorites(array $favorites): DataResponse {
return new DataResponse($this->service->setFavorites($favorites)); return new DataResponse($this->service->setFavorites($favorites));

+ 6
- 6
apps/weather_status/openapi.json View File

], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Weather status mode updated",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Address updated",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Location returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Location updated",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Favorites returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Favorites updated",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {

+ 2
- 0
core/Controller/AutoCompleteController.php View File

* @param int $limit Maximum number of results to return * @param int $limit Maximum number of results to return
* *
* @return DataResponse<Http::STATUS_OK, CoreAutocompleteResult[], array{}> * @return DataResponse<Http::STATUS_OK, CoreAutocompleteResult[], array{}>
*
* 200: Autocomplete results returned
*/ */
public function get(string $search, ?string $itemType, ?string $itemId, ?string $sorter = null, array $shareTypes = [IShare::TYPE_USER], int $limit = 10): DataResponse { public function get(string $search, ?string $itemType, ?string $itemId, ?string $sorter = null, array $shareTypes = [IShare::TYPE_USER], int $limit = 10): DataResponse {
// if enumeration/user listings are disabled, we'll receive an empty // if enumeration/user listings are disabled, we'll receive an empty

+ 2
- 0
core/Controller/ClientFlowLoginV2Controller.php View File

* Init a login flow * Init a login flow
* *
* @return JSONResponse<Http::STATUS_OK, CoreLoginFlowV2, array{}> * @return JSONResponse<Http::STATUS_OK, CoreLoginFlowV2, array{}>
*
* 200: Login flow init returned
*/ */
public function init(): JSONResponse { public function init(): JSONResponse {
// Get client user agent // Get client user agent

+ 2
- 0
core/Controller/OCSController.php View File

* Get the capabilities * Get the capabilities
* *
* @return DataResponse<Http::STATUS_OK, array{version: array{major: int, minor: int, micro: int, string: string, edition: '', extendedSupport: bool}, capabilities: array<string, mixed>}, array{}> * @return DataResponse<Http::STATUS_OK, array{version: array{major: int, minor: int, micro: int, string: string, edition: '', extendedSupport: bool}, capabilities: array<string, mixed>}, array{}>
*
* 200: Capabilities returned
*/ */
public function getCapabilities(): DataResponse { public function getCapabilities(): DataResponse {
$result = []; $result = [];

+ 10
- 0
core/Controller/ReferenceApiController.php View File

* @param bool $resolve Resolve the references * @param bool $resolve Resolve the references
* @param int $limit Maximum amount of references to extract * @param int $limit Maximum amount of references to extract
* @return DataResponse<Http::STATUS_OK, array{references: array<string, CoreReference|null>}, array{}> * @return DataResponse<Http::STATUS_OK, array{references: array<string, CoreReference|null>}, array{}>
*
* 200: References returned
*/ */
public function extract(string $text, bool $resolve = false, int $limit = 1): DataResponse { public function extract(string $text, bool $resolve = false, int $limit = 1): DataResponse {
$references = $this->referenceManager->extractReferences($text); $references = $this->referenceManager->extractReferences($text);
* *
* @param string $reference Reference to resolve * @param string $reference Reference to resolve
* @return DataResponse<Http::STATUS_OK, array{references: array<string, ?CoreReference>}, array{}> * @return DataResponse<Http::STATUS_OK, array{references: array<string, ?CoreReference>}, array{}>
*
* 200: Reference returned
*/ */
public function resolveOne(string $reference): DataResponse { public function resolveOne(string $reference): DataResponse {
/** @var ?CoreReference $resolvedReference */ /** @var ?CoreReference $resolvedReference */
* @param string[] $references References to resolve * @param string[] $references References to resolve
* @param int $limit Maximum amount of references to resolve * @param int $limit Maximum amount of references to resolve
* @return DataResponse<Http::STATUS_OK, array{references: array<string, CoreReference|null>}, array{}> * @return DataResponse<Http::STATUS_OK, array{references: array<string, CoreReference|null>}, array{}>
*
* 200: References returned
*/ */
public function resolve(array $references, int $limit = 1): DataResponse { public function resolve(array $references, int $limit = 1): DataResponse {
$result = []; $result = [];
* Get the providers * Get the providers
* *
* @return DataResponse<Http::STATUS_OK, CoreReferenceProvider[], array{}> * @return DataResponse<Http::STATUS_OK, CoreReferenceProvider[], array{}>
*
* 200: Providers returned
*/ */
public function getProvidersInfo(): DataResponse { public function getProvidersInfo(): DataResponse {
$providers = $this->referenceManager->getDiscoverableProviders(); $providers = $this->referenceManager->getDiscoverableProviders();
* @param string $providerId ID of the provider * @param string $providerId ID of the provider
* @param int|null $timestamp Timestamp of the last usage * @param int|null $timestamp Timestamp of the last usage
* @return DataResponse<Http::STATUS_OK, array{success: bool}, array{}> * @return DataResponse<Http::STATUS_OK, array{success: bool}, array{}>
*
* 200: Provider touched
*/ */
public function touchProvider(string $providerId, ?int $timestamp = null): DataResponse { public function touchProvider(string $providerId, ?int $timestamp = null): DataResponse {
if ($this->userId !== null) { if ($this->userId !== null) {

+ 2
- 0
core/Controller/TextProcessingApiController.php View File

* This endpoint returns all available LanguageModel task types * This endpoint returns all available LanguageModel task types
* *
* @return DataResponse<Http::STATUS_OK, array{types: array{id: string, name: string, description: string}[]}, array{}> * @return DataResponse<Http::STATUS_OK, array{types: array{id: string, name: string, description: string}[]}, array{}>
*
* 200: Task types returned
*/ */
#[PublicPage] #[PublicPage]
public function taskTypes(): DataResponse { public function taskTypes(): DataResponse {

+ 2
- 0
core/Controller/TranslationApiController.php View File

* Get the list of supported languages * Get the list of supported languages
* *
* @return DataResponse<Http::STATUS_OK, array{languages: array{from: string, fromLabel: string, to: string, toLabel: string}[], languageDetection: bool}, array{}> * @return DataResponse<Http::STATUS_OK, array{languages: array{from: string, fromLabel: string, to: string, toLabel: string}[], languageDetection: bool}, array{}>
*
* 200: Supported languages returned
*/ */
public function languages(): DataResponse { public function languages(): DataResponse {
return new DataResponse([ return new DataResponse([

+ 2
- 0
core/Controller/UnifiedSearchController.php View File

* *
* @param string $from the url the user is currently at * @param string $from the url the user is currently at
* @return DataResponse<Http::STATUS_OK, CoreUnifiedSearchProvider[], array{}> * @return DataResponse<Http::STATUS_OK, CoreUnifiedSearchProvider[], array{}>
*
* 200: Providers returned
*/ */
public function getProviders(string $from = ''): DataResponse { public function getProviders(string $from = ''): DataResponse {
[$route, $parameters] = $this->getRouteInformation($from); [$route, $parameters] = $this->getRouteInformation($from);

+ 11
- 11
core/openapi.json View File

], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Login flow init returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Capabilities returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Autocomplete results returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Reference returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "References returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "References returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Providers returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Provider touched",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Providers returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Supported languages returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {
], ],
"responses": { "responses": {
"200": { "200": {
"description": "",
"description": "Task types returned",
"content": { "content": {
"application/json": { "application/json": {
"schema": { "schema": {

+ 1
- 1
vendor-bin/openapi-extractor/composer.json View File

} }
}, },
"require": { "require": {
"nextcloud/openapi-extractor": "dev-main#85b552a0c82ac71e1f5660109113b6235156e92e"
"nextcloud/openapi-extractor": "dev-main#8ba3b777239436ea71aa92fcef279db71e1f2ac9"
} }
} }

+ 12
- 12
vendor-bin/openapi-extractor/composer.lock View File

"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically" "This file is @generated automatically"
], ],
"content-hash": "2658d66eab85e31914ebf538c8705ae0",
"content-hash": "e61826fae9fde663e18702f8f0b8db35",
"packages": [ "packages": [
{ {
"name": "adhocore/cli", "name": "adhocore/cli",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/nextcloud/openapi-extractor.git", "url": "https://github.com/nextcloud/openapi-extractor.git",
"reference": "85b552a0c82ac71e1f5660109113b6235156e92e"
"reference": "8ba3b777239436ea71aa92fcef279db71e1f2ac9"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/nextcloud/openapi-extractor/zipball/85b552a0c82ac71e1f5660109113b6235156e92e",
"reference": "85b552a0c82ac71e1f5660109113b6235156e92e",
"url": "https://api.github.com/repos/nextcloud/openapi-extractor/zipball/8ba3b777239436ea71aa92fcef279db71e1f2ac9",
"reference": "8ba3b777239436ea71aa92fcef279db71e1f2ac9",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"source": "https://github.com/nextcloud/openapi-extractor/tree/main", "source": "https://github.com/nextcloud/openapi-extractor/tree/main",
"issues": "https://github.com/nextcloud/openapi-extractor/issues" "issues": "https://github.com/nextcloud/openapi-extractor/issues"
}, },
"time": "2023-08-22T17:56:05+00:00"
"time": "2023-09-19T10:05:15+00:00"
}, },
{ {
"name": "nikic/php-parser", "name": "nikic/php-parser",
}, },
{ {
"name": "phpstan/phpdoc-parser", "name": "phpstan/phpdoc-parser",
"version": "1.23.1",
"version": "1.24.1",
"source": { "source": {
"type": "git", "type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git", "url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "846ae76eef31c6d7790fac9bc399ecee45160b26"
"reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01"
}, },
"dist": { "dist": {
"type": "zip", "type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/846ae76eef31c6d7790fac9bc399ecee45160b26",
"reference": "846ae76eef31c6d7790fac9bc399ecee45160b26",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01",
"reference": "9f854d275c2dbf84915a5c0ec9a2d17d2cd86b01",
"shasum": "" "shasum": ""
}, },
"require": { "require": {
"description": "PHPDoc parser with support for nullable, intersection and generic types", "description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": { "support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues", "issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.23.1"
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.24.1"
}, },
"time": "2023-08-03T16:32:59+00:00"
"time": "2023-09-18T12:18:02+00:00"
} }
], ],
"packages-dev": [], "packages-dev": [],
"platform-overrides": { "platform-overrides": {
"php": "8.1" "php": "8.1"
}, },
"plugin-api-version": "2.3.0"
"plugin-api-version": "2.6.0"
} }

Loading…
Cancel
Save