Fixed API-Stub generation in cli.php

This commit is contained in:
Roman 2024-04-24 16:58:18 +02:00
parent d38ad87220
commit 163ef9fbfe

12
cli.php

@ -900,8 +900,9 @@ function onAPI(array $argv): void {
return \$this->success; return \$this->success;
} }
public static function getDefaultACL(Insert \$insert): void { public static function getDescription(): string {
\$insert->addRow(self::getEndpoint(), [], \"Short description, what users are allowed to do with this permission\", false); // TODO: auto generated endpoint description
return \"Short description, what users are able to do with this endpoint.\";
} }
}"; }";
}, $methodNames)); }, $methodNames));
@ -911,7 +912,6 @@ namespace Site\API {
use Core\API\Request; use Core\API\Request;
use Core\Objects\Context; use Core\Objects\Context;
use Core\Driver\SQL\Query\Insert;
abstract class {$apiName}API extends Request { abstract class {$apiName}API extends Request {
public function __construct(Context \$context, bool \$externalCall = false, array \$params = []) { public function __construct(Context \$context, bool \$externalCall = false, array \$params = []) {
@ -936,7 +936,6 @@ namespace Site\API;
use Core\API\Request; use Core\API\Request;
use Core\Objects\Context; use Core\Objects\Context;
use Core\Driver\SQL\Query\Insert;
class $apiName extends Request { class $apiName extends Request {
@ -950,8 +949,9 @@ class $apiName extends Request {
return \$this->success; return \$this->success;
} }
public static function getDefaultACL(Insert \$insert): void { public static function getDescription(): string {
\$insert->addRow(self::getEndpoint(), [], \"Short description, what users are allowed to do with this permission\", false); // TODO: auto generated endpoint description
return \"Short description, what users are able to do with this endpoint.\";
} }
} }
"; ";