diff options
author | provokateurin <kate@provokateurin.de> | 2024-02-27 18:06:42 +0100 |
---|---|---|
committer | provokateurin <kate@provokateurin.de> | 2024-02-27 23:41:33 +0100 |
commit | 0565583c47255dd9f43252e6b6e972a52659f15b (patch) | |
tree | 875192ea67e0b5b4dd43ad00d7335ec22e9c1a90 | |
parent | 455a209b9c4f3b95a016ce1c0bcd1bcfa3fc86bf (diff) | |
download | nextcloud-server-0565583c47255dd9f43252e6b6e972a52659f15b.tar.gz nextcloud-server-0565583c47255dd9f43252e6b6e972a52659f15b.zip |
fix(provisioning_api): Fix AppInfo schema for OpenAPI
Signed-off-by: provokateurin <kate@provokateurin.de>
-rw-r--r-- | apps/provisioning_api/lib/Controller/AppsController.php | 6 | ||||
-rw-r--r-- | apps/provisioning_api/lib/ResponseDefinitions.php | 42 | ||||
-rw-r--r-- | apps/provisioning_api/openapi-administration.json | 204 | ||||
-rw-r--r-- | apps/provisioning_api/openapi-full.json | 204 |
4 files changed, 11 insertions, 445 deletions
diff --git a/apps/provisioning_api/lib/Controller/AppsController.php b/apps/provisioning_api/lib/Controller/AppsController.php index 534b1644262..2a63717324b 100644 --- a/apps/provisioning_api/lib/Controller/AppsController.php +++ b/apps/provisioning_api/lib/Controller/AppsController.php @@ -30,7 +30,6 @@ declare(strict_types=1); namespace OCA\Provisioning_API\Controller; use OC_App; -use OCA\Provisioning_API\ResponseDefinitions; use OCP\App\AppPathNotFoundException; use OCP\App\IAppManager; use OCP\AppFramework\Http; @@ -39,9 +38,6 @@ use OCP\AppFramework\OCS\OCSException; use OCP\AppFramework\OCSController; use OCP\IRequest; -/** - * @psalm-import-type Provisioning_APIAppInfo from ResponseDefinitions - */ class AppsController extends OCSController { /** @var IAppManager */ private $appManager; @@ -94,7 +90,7 @@ class AppsController extends OCSController { * Get the app info for an app * * @param string $app ID of the app - * @return DataResponse<Http::STATUS_OK, Provisioning_APIAppInfo, array{}> + * @return DataResponse<Http::STATUS_OK, array<string, ?mixed>, array{}> * @throws OCSException * * 200: App info returned diff --git a/apps/provisioning_api/lib/ResponseDefinitions.php b/apps/provisioning_api/lib/ResponseDefinitions.php index 0b4a3d1ebbc..07777f1f35f 100644 --- a/apps/provisioning_api/lib/ResponseDefinitions.php +++ b/apps/provisioning_api/lib/ResponseDefinitions.php @@ -82,48 +82,6 @@ namespace OCA\Provisioning_API; * websiteScope?: string, * } * - * @psalm-type Provisioning_APIAppInfo = array{ - * active: bool|null, - * activity: ?mixed, - * author: ?mixed, - * background-jobs: ?mixed, - * bugs: ?mixed, - * category: ?mixed, - * collaboration: ?mixed, - * commands: ?mixed, - * default_enable: ?mixed, - * dependencies: ?mixed, - * description: string, - * discussion: ?mixed, - * documentation: ?mixed, - * groups: ?mixed, - * id: string, - * info: ?mixed, - * internal: bool|null, - * level: int|null, - * licence: ?mixed, - * name: string, - * namespace: ?mixed, - * navigations: ?mixed, - * preview: ?mixed, - * previewAsIcon: bool|null, - * public: ?mixed, - * remote: ?mixed, - * removable: bool|null, - * repair-steps: ?mixed, - * repository: ?mixed, - * sabre: ?mixed, - * screenshot: ?mixed, - * settings: ?mixed, - * summary: string, - * trash: ?mixed, - * two-factor-providers: ?mixed, - * types: ?mixed, - * version: string, - * versions: ?mixed, - * website: ?mixed, - * } - * * @psalm-type Provisioning_APIGroupDetails = array{ * id: string, * displayname: string, diff --git a/apps/provisioning_api/openapi-administration.json b/apps/provisioning_api/openapi-administration.json index 9104c76ab42..46262c1f577 100644 --- a/apps/provisioning_api/openapi-administration.json +++ b/apps/provisioning_api/openapi-administration.json @@ -20,204 +20,6 @@ } }, "schemas": { - "AppInfo": { - "type": "object", - "required": [ - "active", - "activity", - "author", - "background-jobs", - "bugs", - "category", - "collaboration", - "commands", - "default_enable", - "dependencies", - "description", - "discussion", - "documentation", - "groups", - "id", - "info", - "internal", - "level", - "licence", - "name", - "namespace", - "navigations", - "preview", - "previewAsIcon", - "public", - "remote", - "removable", - "repair-steps", - "repository", - "sabre", - "screenshot", - "settings", - "summary", - "trash", - "two-factor-providers", - "types", - "version", - "versions", - "website" - ], - "properties": { - "active": { - "type": "boolean", - "nullable": true - }, - "activity": { - "type": "object", - "nullable": true - }, - "author": { - "type": "object", - "nullable": true - }, - "background-jobs": { - "type": "object", - "nullable": true - }, - "bugs": { - "type": "object", - "nullable": true - }, - "category": { - "type": "object", - "nullable": true - }, - "collaboration": { - "type": "object", - "nullable": true - }, - "commands": { - "type": "object", - "nullable": true - }, - "default_enable": { - "type": "object", - "nullable": true - }, - "dependencies": { - "type": "object", - "nullable": true - }, - "description": { - "type": "string" - }, - "discussion": { - "type": "object", - "nullable": true - }, - "documentation": { - "type": "object", - "nullable": true - }, - "groups": { - "type": "object", - "nullable": true - }, - "id": { - "type": "string" - }, - "info": { - "type": "object", - "nullable": true - }, - "internal": { - "type": "boolean", - "nullable": true - }, - "level": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "licence": { - "type": "object", - "nullable": true - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "object", - "nullable": true - }, - "navigations": { - "type": "object", - "nullable": true - }, - "preview": { - "type": "object", - "nullable": true - }, - "previewAsIcon": { - "type": "boolean", - "nullable": true - }, - "public": { - "type": "object", - "nullable": true - }, - "remote": { - "type": "object", - "nullable": true - }, - "removable": { - "type": "boolean", - "nullable": true - }, - "repair-steps": { - "type": "object", - "nullable": true - }, - "repository": { - "type": "object", - "nullable": true - }, - "sabre": { - "type": "object", - "nullable": true - }, - "screenshot": { - "type": "object", - "nullable": true - }, - "settings": { - "type": "object", - "nullable": true - }, - "summary": { - "type": "string" - }, - "trash": { - "type": "object", - "nullable": true - }, - "two-factor-providers": { - "type": "object", - "nullable": true - }, - "types": { - "type": "object", - "nullable": true - }, - "version": { - "type": "string" - }, - "versions": { - "type": "object", - "nullable": true - }, - "website": { - "type": "object", - "nullable": true - } - } - }, "Capabilities": { "type": "object", "required": [ @@ -418,7 +220,11 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/AppInfo" + "type": "object", + "additionalProperties": { + "type": "object", + "nullable": true + } } } } diff --git a/apps/provisioning_api/openapi-full.json b/apps/provisioning_api/openapi-full.json index 20746bbf769..542df0032dd 100644 --- a/apps/provisioning_api/openapi-full.json +++ b/apps/provisioning_api/openapi-full.json @@ -20,204 +20,6 @@ } }, "schemas": { - "AppInfo": { - "type": "object", - "required": [ - "active", - "activity", - "author", - "background-jobs", - "bugs", - "category", - "collaboration", - "commands", - "default_enable", - "dependencies", - "description", - "discussion", - "documentation", - "groups", - "id", - "info", - "internal", - "level", - "licence", - "name", - "namespace", - "navigations", - "preview", - "previewAsIcon", - "public", - "remote", - "removable", - "repair-steps", - "repository", - "sabre", - "screenshot", - "settings", - "summary", - "trash", - "two-factor-providers", - "types", - "version", - "versions", - "website" - ], - "properties": { - "active": { - "type": "boolean", - "nullable": true - }, - "activity": { - "type": "object", - "nullable": true - }, - "author": { - "type": "object", - "nullable": true - }, - "background-jobs": { - "type": "object", - "nullable": true - }, - "bugs": { - "type": "object", - "nullable": true - }, - "category": { - "type": "object", - "nullable": true - }, - "collaboration": { - "type": "object", - "nullable": true - }, - "commands": { - "type": "object", - "nullable": true - }, - "default_enable": { - "type": "object", - "nullable": true - }, - "dependencies": { - "type": "object", - "nullable": true - }, - "description": { - "type": "string" - }, - "discussion": { - "type": "object", - "nullable": true - }, - "documentation": { - "type": "object", - "nullable": true - }, - "groups": { - "type": "object", - "nullable": true - }, - "id": { - "type": "string" - }, - "info": { - "type": "object", - "nullable": true - }, - "internal": { - "type": "boolean", - "nullable": true - }, - "level": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "licence": { - "type": "object", - "nullable": true - }, - "name": { - "type": "string" - }, - "namespace": { - "type": "object", - "nullable": true - }, - "navigations": { - "type": "object", - "nullable": true - }, - "preview": { - "type": "object", - "nullable": true - }, - "previewAsIcon": { - "type": "boolean", - "nullable": true - }, - "public": { - "type": "object", - "nullable": true - }, - "remote": { - "type": "object", - "nullable": true - }, - "removable": { - "type": "boolean", - "nullable": true - }, - "repair-steps": { - "type": "object", - "nullable": true - }, - "repository": { - "type": "object", - "nullable": true - }, - "sabre": { - "type": "object", - "nullable": true - }, - "screenshot": { - "type": "object", - "nullable": true - }, - "settings": { - "type": "object", - "nullable": true - }, - "summary": { - "type": "string" - }, - "trash": { - "type": "object", - "nullable": true - }, - "two-factor-providers": { - "type": "object", - "nullable": true - }, - "types": { - "type": "object", - "nullable": true - }, - "version": { - "type": "string" - }, - "versions": { - "type": "object", - "nullable": true - }, - "website": { - "type": "object", - "nullable": true - } - } - }, "Capabilities": { "type": "object", "required": [ @@ -715,7 +517,11 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/AppInfo" + "type": "object", + "additionalProperties": { + "type": "object", + "nullable": true + } } } } |