aboutsummaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/AvatarController.php3
-rw-r--r--core/Controller/CSRFTokenController.php2
-rw-r--r--core/Controller/ClientFlowLoginV2Controller.php2
-rw-r--r--core/Controller/GuestAvatarController.php3
-rw-r--r--core/Controller/LoginController.php1
-rw-r--r--core/Controller/OCMController.php2
-rw-r--r--core/Controller/PreviewController.php3
-rw-r--r--core/Controller/ReferenceController.php2
-rw-r--r--core/Controller/WipeController.php2
9 files changed, 20 insertions, 0 deletions
diff --git a/core/Controller/AvatarController.php b/core/Controller/AvatarController.php
index 4d5e810ddb9..f25a2d52752 100644
--- a/core/Controller/AvatarController.php
+++ b/core/Controller/AvatarController.php
@@ -13,6 +13,7 @@ use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
+use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\DataDisplayResponse;
use OCP\AppFramework\Http\FileDisplayResponse;
@@ -66,6 +67,7 @@ class AvatarController extends Controller {
#[NoCSRFRequired]
#[PublicPage]
#[FrontpageRoute(verb: 'GET', url: '/avatar/{userId}/{size}/dark')]
+ #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
public function getAvatarDark(string $userId, int $size, bool $guestFallback = false) {
if ($size <= 64) {
if ($size !== 64) {
@@ -117,6 +119,7 @@ class AvatarController extends Controller {
#[NoCSRFRequired]
#[PublicPage]
#[FrontpageRoute(verb: 'GET', url: '/avatar/{userId}/{size}')]
+ #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
public function getAvatar(string $userId, int $size, bool $guestFallback = false) {
if ($size <= 64) {
if ($size !== 64) {
diff --git a/core/Controller/CSRFTokenController.php b/core/Controller/CSRFTokenController.php
index 8ea475941c8..4fdd669e144 100644
--- a/core/Controller/CSRFTokenController.php
+++ b/core/Controller/CSRFTokenController.php
@@ -13,6 +13,7 @@ use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
+use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\JSONResponse;
use OCP\IRequest;
@@ -37,6 +38,7 @@ class CSRFTokenController extends Controller {
#[PublicPage]
#[NoCSRFRequired]
#[FrontpageRoute(verb: 'GET', url: '/csrftoken')]
+ #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
public function index(): JSONResponse {
if (!$this->request->passesStrictCookieCheck()) {
return new JSONResponse([], Http::STATUS_FORBIDDEN);
diff --git a/core/Controller/ClientFlowLoginV2Controller.php b/core/Controller/ClientFlowLoginV2Controller.php
index b973a57924e..4bd2cddd12b 100644
--- a/core/Controller/ClientFlowLoginV2Controller.php
+++ b/core/Controller/ClientFlowLoginV2Controller.php
@@ -69,6 +69,7 @@ class ClientFlowLoginV2Controller extends Controller {
#[NoCSRFRequired]
#[PublicPage]
#[FrontpageRoute(verb: 'POST', url: '/login/v2/poll')]
+ #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
public function poll(string $token): JSONResponse {
try {
$creds = $this->loginFlowV2Service->poll($token);
@@ -275,6 +276,7 @@ class ClientFlowLoginV2Controller extends Controller {
#[NoCSRFRequired]
#[PublicPage]
#[FrontpageRoute(verb: 'POST', url: '/login/v2')]
+ #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
public function init(): JSONResponse {
// Get client user agent
$userAgent = $this->request->getHeader('USER_AGENT');
diff --git a/core/Controller/GuestAvatarController.php b/core/Controller/GuestAvatarController.php
index e87112726f2..7eef6828fec 100644
--- a/core/Controller/GuestAvatarController.php
+++ b/core/Controller/GuestAvatarController.php
@@ -9,6 +9,7 @@ use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
+use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\FileDisplayResponse;
use OCP\AppFramework\Http\Response;
@@ -46,6 +47,7 @@ class GuestAvatarController extends Controller {
#[PublicPage]
#[NoCSRFRequired]
#[FrontpageRoute(verb: 'GET', url: '/avatar/guest/{guestName}/{size}')]
+ #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
public function getAvatar(string $guestName, int $size, ?bool $darkTheme = false) {
$darkTheme = $darkTheme ?? false;
@@ -97,6 +99,7 @@ class GuestAvatarController extends Controller {
#[PublicPage]
#[NoCSRFRequired]
#[FrontpageRoute(verb: 'GET', url: '/avatar/guest/{guestName}/{size}/dark')]
+ #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
public function getAvatarDark(string $guestName, int $size) {
return $this->getAvatar($guestName, $size, true);
}
diff --git a/core/Controller/LoginController.php b/core/Controller/LoginController.php
index 19d5aae9613..ed884460b43 100644
--- a/core/Controller/LoginController.php
+++ b/core/Controller/LoginController.php
@@ -410,6 +410,7 @@ class LoginController extends Controller {
#[UseSession]
#[NoCSRFRequired]
#[FrontpageRoute(verb: 'POST', url: '/login/confirm')]
+ #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
public function confirmPassword(string $password): DataResponse {
$loginName = $this->userSession->getLoginName();
$loginResult = $this->userManager->checkPassword($loginName, $password);
diff --git a/core/Controller/OCMController.php b/core/Controller/OCMController.php
index f15a4a56779..40d53cf7a97 100644
--- a/core/Controller/OCMController.php
+++ b/core/Controller/OCMController.php
@@ -14,6 +14,7 @@ use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
+use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\DataResponse;
use OCP\Capabilities\ICapability;
@@ -51,6 +52,7 @@ class OCMController extends Controller {
#[PublicPage]
#[NoCSRFRequired]
#[FrontpageRoute(verb: 'GET', url: '/ocm-provider/')]
+ #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
public function discovery(): DataResponse {
try {
$cap = Server::get(
diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php
index 2720da671be..9c9d49082bb 100644
--- a/core/Controller/PreviewController.php
+++ b/core/Controller/PreviewController.php
@@ -13,6 +13,7 @@ use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\Attribute\NoAdminRequired;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
+use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\DataResponse;
use OCP\AppFramework\Http\FileDisplayResponse;
use OCP\AppFramework\Http\RedirectResponse;
@@ -58,6 +59,7 @@ class PreviewController extends Controller {
#[NoAdminRequired]
#[NoCSRFRequired]
#[FrontpageRoute(verb: 'GET', url: '/core/preview.png')]
+ #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
public function getPreview(
string $file = '',
int $x = 32,
@@ -101,6 +103,7 @@ class PreviewController extends Controller {
#[NoAdminRequired]
#[NoCSRFRequired]
#[FrontpageRoute(verb: 'GET', url: '/core/preview')]
+ #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
public function getPreviewByFileId(
int $fileId = -1,
int $x = 32,
diff --git a/core/Controller/ReferenceController.php b/core/Controller/ReferenceController.php
index b4c88562bc9..6ed15e2d2f1 100644
--- a/core/Controller/ReferenceController.php
+++ b/core/Controller/ReferenceController.php
@@ -12,6 +12,7 @@ use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
+use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\DataDownloadResponse;
use OCP\AppFramework\Http\DataResponse;
@@ -43,6 +44,7 @@ class ReferenceController extends Controller {
#[PublicPage]
#[NoCSRFRequired]
#[FrontpageRoute(verb: 'GET', url: '/core/references/preview/{referenceId}')]
+ #[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
public function preview(string $referenceId): DataDownloadResponse|DataResponse {
$reference = $this->referenceManager->getReferenceByCacheKey($referenceId);
diff --git a/core/Controller/WipeController.php b/core/Controller/WipeController.php
index d364e6399d9..1b57be71aa0 100644
--- a/core/Controller/WipeController.php
+++ b/core/Controller/WipeController.php
@@ -14,11 +14,13 @@ use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\AnonRateLimit;
use OCP\AppFramework\Http\Attribute\FrontpageRoute;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
+use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\Attribute\PublicPage;
use OCP\AppFramework\Http\JSONResponse;
use OCP\Authentication\Exceptions\InvalidTokenException;
use OCP\IRequest;
+#[OpenAPI(scope: OpenAPI::SCOPE_DEFAULT)]
class WipeController extends Controller {
public function __construct(
string $appName,