fix(provisioning_api): Fix AppInfo schema for OpenAPI

Signed-off-by: provokateurin <kate@provokateurin.de>
pull/43877/head
provokateurin 9 months ago
parent 455a209b9c
commit 0565583c47
No known key found for this signature in database
  1. 6
      apps/provisioning_api/lib/Controller/AppsController.php
  2. 42
      apps/provisioning_api/lib/ResponseDefinitions.php
  3. 204
      apps/provisioning_api/openapi-administration.json
  4. 204
      apps/provisioning_api/openapi-full.json

@ -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

@ -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,

@ -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
}
}
}
}

@ -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
}
}
}
}

Loading…
Cancel
Save