aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Scherzinger <info@andy-scherzinger.de>2025-01-26 22:08:35 +0100
committerGitHub <noreply@github.com>2025-01-26 22:08:35 +0100
commit4145dedba00c267f15088be0c93336407d6e8aaf (patch)
tree48e3d0ee0a15100e1a82f6c1603adfc8bd41df17
parent68e7212c5a6c9415a7d6f6a461552519460c67a3 (diff)
parente473a26676769380e170b9cadeedacdc58944b59 (diff)
downloadnextcloud-server-4145dedba00c267f15088be0c93336407d6e8aaf.tar.gz
nextcloud-server-4145dedba00c267f15088be0c93336407d6e8aaf.zip
Merge pull request #50425 from nextcloud/fix/openapi/outdated-specs
Fix outdated OpenAPI specs
-rw-r--r--apps/federation/openapi.json511
-rw-r--r--apps/federation/openapi.json.license2
-rw-r--r--apps/settings/lib/Controller/LogSettingsController.php2
3 files changed, 2 insertions, 513 deletions
diff --git a/apps/federation/openapi.json b/apps/federation/openapi.json
deleted file mode 100644
index 3740b8ad04f..00000000000
--- a/apps/federation/openapi.json
+++ /dev/null
@@ -1,511 +0,0 @@
-{
- "openapi": "3.0.3",
- "info": {
- "title": "federation",
- "version": "0.0.1",
- "description": "Federation allows you to connect with other trusted servers to exchange the account directory.",
- "license": {
- "name": "agpl"
- }
- },
- "components": {
- "securitySchemes": {
- "basic_auth": {
- "type": "http",
- "scheme": "basic"
- },
- "bearer_auth": {
- "type": "http",
- "scheme": "bearer"
- }
- },
- "schemas": {
- "OCSMeta": {
- "type": "object",
- "required": [
- "status",
- "statuscode"
- ],
- "properties": {
- "status": {
- "type": "string"
- },
- "statuscode": {
- "type": "integer"
- },
- "message": {
- "type": "string"
- },
- "totalitems": {
- "type": "string"
- },
- "itemsperpage": {
- "type": "string"
- }
- }
- }
- }
- },
- "paths": {
- "/ocs/v2.php/apps/federation/api/v1/shared-secret": {
- "get": {
- "operationId": "ocs_authapi-get-shared-secret-legacy",
- "summary": "Create shared secret and return it, for legacy end-points",
- "tags": [
- "ocs_authapi"
- ],
- "security": [
- {},
- {
- "bearer_auth": []
- },
- {
- "basic_auth": []
- }
- ],
- "parameters": [
- {
- "name": "url",
- "in": "query",
- "description": "URL of the server",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "token",
- "in": "query",
- "description": "Token of the server",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "OCS-APIRequest",
- "in": "header",
- "description": "Required to be true for the API request to pass",
- "required": true,
- "schema": {
- "type": "boolean",
- "default": true
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Shared secret returned",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "ocs"
- ],
- "properties": {
- "ocs": {
- "type": "object",
- "required": [
- "meta",
- "data"
- ],
- "properties": {
- "meta": {
- "$ref": "#/components/schemas/OCSMeta"
- },
- "data": {
- "type": "object",
- "required": [
- "sharedSecret"
- ],
- "properties": {
- "sharedSecret": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "403": {
- "description": "Getting shared secret is not allowed",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "ocs"
- ],
- "properties": {
- "ocs": {
- "type": "object",
- "required": [
- "meta",
- "data"
- ],
- "properties": {
- "meta": {
- "$ref": "#/components/schemas/OCSMeta"
- },
- "data": {}
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "/ocs/v2.php/apps/federation/api/v1/request-shared-secret": {
- "post": {
- "operationId": "ocs_authapi-request-shared-secret-legacy",
- "summary": "Request received to ask remote server for a shared secret, for legacy end-points",
- "tags": [
- "ocs_authapi"
- ],
- "security": [
- {},
- {
- "bearer_auth": []
- },
- {
- "basic_auth": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "url",
- "token"
- ],
- "properties": {
- "url": {
- "type": "string",
- "description": "URL of the server"
- },
- "token": {
- "type": "string",
- "description": "Token of the server"
- }
- }
- }
- }
- }
- },
- "parameters": [
- {
- "name": "OCS-APIRequest",
- "in": "header",
- "description": "Required to be true for the API request to pass",
- "required": true,
- "schema": {
- "type": "boolean",
- "default": true
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Shared secret requested successfully",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "ocs"
- ],
- "properties": {
- "ocs": {
- "type": "object",
- "required": [
- "meta",
- "data"
- ],
- "properties": {
- "meta": {
- "$ref": "#/components/schemas/OCSMeta"
- },
- "data": {}
- }
- }
- }
- }
- }
- }
- },
- "403": {
- "description": "Requesting shared secret is not allowed",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "ocs"
- ],
- "properties": {
- "ocs": {
- "type": "object",
- "required": [
- "meta",
- "data"
- ],
- "properties": {
- "meta": {
- "$ref": "#/components/schemas/OCSMeta"
- },
- "data": {}
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "/ocs/v2.php/cloud/shared-secret": {
- "get": {
- "operationId": "ocs_authapi-get-shared-secret",
- "summary": "Create shared secret and return it",
- "tags": [
- "ocs_authapi"
- ],
- "security": [
- {},
- {
- "bearer_auth": []
- },
- {
- "basic_auth": []
- }
- ],
- "parameters": [
- {
- "name": "url",
- "in": "query",
- "description": "URL of the server",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "token",
- "in": "query",
- "description": "Token of the server",
- "required": true,
- "schema": {
- "type": "string"
- }
- },
- {
- "name": "OCS-APIRequest",
- "in": "header",
- "description": "Required to be true for the API request to pass",
- "required": true,
- "schema": {
- "type": "boolean",
- "default": true
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Shared secret returned",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "ocs"
- ],
- "properties": {
- "ocs": {
- "type": "object",
- "required": [
- "meta",
- "data"
- ],
- "properties": {
- "meta": {
- "$ref": "#/components/schemas/OCSMeta"
- },
- "data": {
- "type": "object",
- "required": [
- "sharedSecret"
- ],
- "properties": {
- "sharedSecret": {
- "type": "string"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "403": {
- "description": "Getting shared secret is not allowed",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "ocs"
- ],
- "properties": {
- "ocs": {
- "type": "object",
- "required": [
- "meta",
- "data"
- ],
- "properties": {
- "meta": {
- "$ref": "#/components/schemas/OCSMeta"
- },
- "data": {}
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "post": {
- "operationId": "ocs_authapi-request-shared-secret",
- "summary": "Request received to ask remote server for a shared secret",
- "tags": [
- "ocs_authapi"
- ],
- "security": [
- {},
- {
- "bearer_auth": []
- },
- {
- "basic_auth": []
- }
- ],
- "requestBody": {
- "required": true,
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "url",
- "token"
- ],
- "properties": {
- "url": {
- "type": "string",
- "description": "URL of the server"
- },
- "token": {
- "type": "string",
- "description": "Token of the server"
- }
- }
- }
- }
- }
- },
- "parameters": [
- {
- "name": "OCS-APIRequest",
- "in": "header",
- "description": "Required to be true for the API request to pass",
- "required": true,
- "schema": {
- "type": "boolean",
- "default": true
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Shared secret requested successfully",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "ocs"
- ],
- "properties": {
- "ocs": {
- "type": "object",
- "required": [
- "meta",
- "data"
- ],
- "properties": {
- "meta": {
- "$ref": "#/components/schemas/OCSMeta"
- },
- "data": {}
- }
- }
- }
- }
- }
- }
- },
- "403": {
- "description": "Requesting shared secret is not allowed",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "required": [
- "ocs"
- ],
- "properties": {
- "ocs": {
- "type": "object",
- "required": [
- "meta",
- "data"
- ],
- "properties": {
- "meta": {
- "$ref": "#/components/schemas/OCSMeta"
- },
- "data": {}
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "tags": [
- {
- "name": "ocs_authapi",
- "description": "Class OCSAuthAPI\nOCS API end-points to exchange shared secret between two connected Nextclouds"
- }
- ]
-}
diff --git a/apps/federation/openapi.json.license b/apps/federation/openapi.json.license
deleted file mode 100644
index 83559daa9dc..00000000000
--- a/apps/federation/openapi.json.license
+++ /dev/null
@@ -1,2 +0,0 @@
-SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors
-SPDX-License-Identifier: AGPL-3.0-or-later \ No newline at end of file
diff --git a/apps/settings/lib/Controller/LogSettingsController.php b/apps/settings/lib/Controller/LogSettingsController.php
index 7cf8d631c8e..90cf4549d2f 100644
--- a/apps/settings/lib/Controller/LogSettingsController.php
+++ b/apps/settings/lib/Controller/LogSettingsController.php
@@ -11,6 +11,7 @@ use OC\Log;
use OCP\AppFramework\Controller;
use OCP\AppFramework\Http;
use OCP\AppFramework\Http\Attribute\NoCSRFRequired;
+use OCP\AppFramework\Http\Attribute\OpenAPI;
use OCP\AppFramework\Http\StreamResponse;
use OCP\IRequest;
@@ -32,6 +33,7 @@ class LogSettingsController extends Controller {
* 200: Logfile returned
*/
#[NoCSRFRequired]
+ #[OpenAPI(scope: OpenAPI::SCOPE_ADMINISTRATION)]
public function download() {
if (!$this->log instanceof Log) {
throw new \UnexpectedValueException('Log file not available');