diff --git a/generate-spec.php b/generate-spec.php index ecf900a..5b3515a 100755 --- a/generate-spec.php +++ b/generate-spec.php @@ -269,6 +269,7 @@ } } +/** @var array> $routes */ $routes = []; foreach ($controllers as $controllerName => $stmts) { $controllerClass = null; @@ -465,7 +466,6 @@ $isIgnored = Helpers::classMethodHasAnnotationOrAttribute($methodFunction, 'IgnoreOpenAPI'); $isPasswordConfirmation = Helpers::classMethodHasAnnotationOrAttribute($methodFunction, 'PasswordConfirmationRequired'); $isExApp = Helpers::classMethodHasAnnotationOrAttribute($methodFunction, 'ExAppRequired'); - $isCORS = Helpers::classMethodHasAnnotationOrAttribute($methodFunction, 'CORS'); $scopes = Helpers::getOpenAPIAttributeScopes($classMethod, $routeName); if ($isIgnored) { @@ -519,7 +519,7 @@ ]; } - $classMethodInfo = ControllerMethod::parse($routeName, $definitions, $methodFunction, $isAdmin, $isDeprecated, $isPasswordConfirmation, $isCORS); + $classMethodInfo = ControllerMethod::parse($routeName, $definitions, $methodFunction, $isPublic, $isAdmin, $isDeprecated, $isPasswordConfirmation, $isCORS, $isOCS); if (count($classMethodInfo->responses) == 0) { Logger::error($routeName, 'Returns no responses'); continue; @@ -724,10 +724,11 @@ } else { $mergedContentTypeResponses[$contentType] = [ 'schema' => [ - [$hasEmpty ? 'anyOf' : 'oneOf' => array_map(function (ControllerMethodResponse $response) use ($route): \stdClass|array { + // At least one should match, but it's possible that multiple match, so oneOf can't be used. + 'anyOf' => array_map(function (ControllerMethodResponse $response) use ($route): stdClass|array { $schema = Helpers::cleanEmptyResponseArray($response->type->toArray()); return Helpers::wrapOCSResponse($route, $response, $schema); - }, $uniqueResponses)], + }, $uniqueResponses), ], ]; } diff --git a/src/ControllerMethod.php b/src/ControllerMethod.php index db898f8..81d7a67 100644 --- a/src/ControllerMethod.php +++ b/src/ControllerMethod.php @@ -304,10 +304,12 @@ public function __construct( public static function parse(string $context, array $definitions, ClassMethod $method, + bool $isPublic, bool $isAdmin, bool $isDeprecated, bool $isPasswordConfirmation, bool $isCORS, + bool $isOCS, ): ControllerMethod { global $phpDocParser, $lexer, $nodeFinder, $allowMissingDocs; @@ -409,6 +411,46 @@ public static function parse(string $context, Logger::error($context, 'Missing @return annotation'); } + if (!$isPublic || $isAdmin) { + $statusCodes = []; + if (!$isPublic) { + $responseDescriptions[401] ??= 'Current user is not logged in'; + $statusCodes[] = 401; + } + if ($isAdmin) { + $responseDescriptions[403] ??= 'Logged in account must be an admin'; + $statusCodes[] = 403; + } + + foreach ($statusCodes as $statusCode) { + if ($isOCS) { + $responses[] = new ControllerMethodResponse( + 'DataResponse', + $statusCode, + 'application/json', + new OpenApiType($context), + ); + } else { + $responses[] = new ControllerMethodResponse( + 'JsonResponse', + $statusCode, + 'application/json', + new OpenApiType( + $context, + type: 'object', + properties: [ + 'message' => new OpenApiType( + $context, + type: 'string', + ), + ], + required: ['message'], + ), + ); + } + } + } + $responseStatusCodes = array_unique(array_map(static fn (ControllerMethodResponse $response): int => $response->statusCode, $responses)); $unusedResponseDescriptions = array_diff(array_keys($responseDescriptions), $responseStatusCodes); if ($unusedResponseDescriptions !== []) { diff --git a/src/Helpers.php b/src/Helpers.php index a1c6681..741a5e2 100644 --- a/src/Helpers.php +++ b/src/Helpers.php @@ -140,8 +140,8 @@ public static function wrapOCSResponse(Route $route, ControllerMethodResponse $r return $schema; } - public static function cleanEmptyResponseArray(array $schema): array|stdClass { - if (array_key_exists('type', $schema) && $schema['type'] === 'array' && array_key_exists('maxItems', $schema) && $schema['maxItems'] === 0) { + public static function cleanEmptyResponseArray(array|stdClass $schema): array|stdClass { + if (is_array($schema) && array_key_exists('type', $schema) && $schema['type'] === 'array' && array_key_exists('maxItems', $schema) && $schema['maxItems'] === 0) { return new stdClass(); } diff --git a/tests/appinfo/routes.php b/tests/appinfo/routes.php index f1b1217..ae06106 100644 --- a/tests/appinfo/routes.php +++ b/tests/appinfo/routes.php @@ -88,6 +88,11 @@ ['name' => 'Settings#samePathPost', 'url' => '/api/{apiVersion}/same-path', 'verb' => 'POST', 'requirements' => ['apiVersion' => '(v2)']], ['name' => 'Settings#requestHeader', 'url' => '/api/{apiVersion}/request-header', 'verb' => 'POST', 'requirements' => ['apiVersion' => '(v2)']], ['name' => 'Settings#requestParams', 'url' => '/api/{apiVersion}/request-params', 'verb' => 'POST', 'requirements' => ['apiVersion' => '(v2)']], + ['name' => 'Settings#publicPageAnnotation', 'url' => '/api/{apiVersion}/public-page/annotation', 'verb' => 'POST', 'requirements' => ['apiVersion' => '(v2)']], + ['name' => 'Settings#publicPageAttribute', 'url' => '/api/{apiVersion}/public-page/attribute', 'verb' => 'POST', 'requirements' => ['apiVersion' => '(v2)']], + ['name' => 'Settings#mergedResponses', 'url' => '/api/{apiVersion}/merged-responses', 'verb' => 'POST', 'requirements' => ['apiVersion' => '(v2)']], + ['name' => 'Settings#custom401', 'url' => '/api/{apiVersion}/custom/401', 'verb' => 'POST', 'requirements' => ['apiVersion' => '(v2)']], + ['name' => 'Settings#custom403', 'url' => '/api/{apiVersion}/custom/403', 'verb' => 'POST', 'requirements' => ['apiVersion' => '(v2)']], ['name' => 'V1\SubDir#subDirRoute', 'url' => '/sub-dir', 'verb' => 'GET'], ], ]; diff --git a/tests/lib/Controller/SettingsController.php b/tests/lib/Controller/SettingsController.php index 6d58241..ac6ccf7 100644 --- a/tests/lib/Controller/SettingsController.php +++ b/tests/lib/Controller/SettingsController.php @@ -13,10 +13,13 @@ use OCP\AppFramework\Http; use OCP\AppFramework\Http\Attribute\CORS; use OCP\AppFramework\Http\Attribute\IgnoreOpenAPI; +use OCP\AppFramework\Http\Attribute\NoAdminRequired; use OCP\AppFramework\Http\Attribute\OpenAPI; use OCP\AppFramework\Http\Attribute\PasswordConfirmationRequired; +use OCP\AppFramework\Http\Attribute\PublicPage; use OCP\AppFramework\Http\Attribute\RequestHeader; use OCP\AppFramework\Http\DataResponse; +use OCP\AppFramework\Http\JSONResponse; use OCP\AppFramework\OCS\OCSNotFoundException; use OCP\AppFramework\OCSController; @@ -790,4 +793,62 @@ public function requestParams(): DataResponse { return new DataResponse(); } + + /** + * A public page with annotation. + * + * @PublicPage + * @return DataResponse, array{}> + * + * 200: Admin settings updated + */ + public function publicPageAnnotation(): DataResponse { + return new DataResponse(); + } + + /** + * A public page with attribute. + * + * @return DataResponse, array{}> + * + * 200: Admin settings updated + */ + #[PublicPage] + public function publicPageAttribute(): DataResponse { + return new DataResponse(); + } + + /** + * A with merged responses. + * + * @return DataResponse|JSONResponse + * + * 200: Admin settings updated + */ + public function mergedResponses(): DataResponse|JSONResponse { + return new DataResponse(); + } + + /** + * A page with a custom 401. + * + * @return DataResponse + * + * 401: Admin settings updated + */ + #[NoAdminRequired] + public function custom401(): DataResponse { + return new DataResponse(); + } + + /** + * A page with a custom 403. + * + * @return DataResponse + * + * 403: Admin settings updated + */ + public function custom403(): DataResponse { + return new DataResponse(); + } } diff --git a/tests/openapi-administration.json b/tests/openapi-administration.json index 46ba78b..98e48c6 100644 --- a/tests/openapi-administration.json +++ b/tests/openapi-administration.json @@ -187,6 +187,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -260,6 +316,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -333,6 +445,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -410,53 +578,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/return-arrays/non-empty-string": { - "get": { - "operationId": "return_arrays-non-empty-string-array", - "summary": "Route with array using non-empty-string keys", - "description": "This endpoint requires admin access", - "tags": [ - "return_arrays" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } }, - { - "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": "OK", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -475,12 +627,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } + "data": {} } } } @@ -491,10 +638,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/return-arrays/lowercase-string": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/return-arrays/non-empty-string": { "get": { - "operationId": "return_arrays-lowercase-string-array", - "summary": "Route with array using lowercase-string keys", + "operationId": "return_arrays-non-empty-string-array", + "summary": "Route with array using non-empty-string keys", "description": "This endpoint requires admin access", "tags": [ "return_arrays" @@ -564,53 +711,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/return-arrays/non-empty-lowercase-string": { - "get": { - "operationId": "return_arrays-non-empty-lowercase-string-array", - "summary": "Route with array using non-empty-lowercase-string keys", - "description": "This endpoint requires admin access", - "tags": [ - "return_arrays" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } }, - { - "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": "OK", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -629,12 +760,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } + "data": {} } } } @@ -645,12 +771,13 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/admin-scope": { - "post": { - "operationId": "settings-moved-to-admin-scope", - "summary": "Route is only in the admin scope due to defined scope", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/return-arrays/lowercase-string": { + "get": { + "operationId": "return_arrays-lowercase-string-array", + "summary": "Route with array using lowercase-string keys", + "description": "This endpoint requires admin access", "tags": [ - "settings" + "return_arrays" ], "security": [ { @@ -686,7 +813,7 @@ ], "responses": { "200": { - "description": "Admin settings updated", + "description": "OK", "content": { "application/json": { "schema": { @@ -706,7 +833,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/PushDevice" + "type": "object", + "additionalProperties": { + "type": "object" + } } } } @@ -714,16 +844,73 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/default-and-admin-scope": { - "post": { - "operationId": "settings-default-and-admin-scope", - "summary": "Route is in admin and default scope", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/return-arrays/non-empty-lowercase-string": { + "get": { + "operationId": "return_arrays-non-empty-lowercase-string-array", + "summary": "Route with array using non-empty-lowercase-string keys", + "description": "This endpoint requires admin access", "tags": [ - "settings" + "return_arrays" ], "security": [ { @@ -759,7 +946,68 @@ ], "responses": { "200": { - "description": "Admin settings updated", + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -789,11 +1037,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/list-of-int": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/admin-scope": { "post": { - "operationId": "settings-list-of-int-parameters", - "summary": "A route with a limited set of possible integers", - "description": "This endpoint requires admin access", + "operationId": "settings-moved-to-admin-scope", + "summary": "Route is only in the admin scope due to defined scope", "tags": [ "settings" ], @@ -805,38 +1052,6 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "limit" - ], - "properties": { - "limit": { - "type": "integer", - "format": "int64", - "enum": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10 - ], - "description": "Maximum number of objects" - } - } - } - } - } - }, "parameters": [ { "name": "apiVersion", @@ -882,82 +1097,18 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "$ref": "#/components/schemas/PushDevice" + } } } } } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/min-max": { - "post": { - "operationId": "settings-int-parameter-with-min-and-max", - "summary": "A route with a min and max integers", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "limit" - ], - "properties": { - "limit": { - "type": "integer", - "format": "int64", - "description": "Between 5 and 10", - "minimum": 5, - "maximum": 10 - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } - }, - { - "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": "Admin settings updated", + "401": { + "description": "Current user is not logged in", "content": { "application/json": { "schema": { @@ -987,11 +1138,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/min": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/default-and-admin-scope": { "post": { - "operationId": "settings-int-parameter-with-min", - "summary": "A route with a min integers", - "description": "This endpoint requires admin access", + "operationId": "settings-default-and-admin-scope", + "summary": "Route is in admin and default scope", "tags": [ "settings" ], @@ -1003,27 +1153,6 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "limit" - ], - "properties": { - "limit": { - "type": "integer", - "format": "int64", - "description": "At least 5", - "minimum": 5 - } - } - } - } - } - }, "parameters": [ { "name": "apiVersion", @@ -1076,14 +1205,42 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "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/notifications/api/{apiVersion}/max": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/list-of-int": { "post": { - "operationId": "settings-int-parameter-with-max", - "summary": "A route with a max integers", + "operationId": "settings-list-of-int-parameters", + "summary": "A route with a limited set of possible integers", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1109,8 +1266,19 @@ "limit": { "type": "integer", "format": "int64", - "description": "At most 10", - "maximum": 10 + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10 + ], + "description": "Maximum number of objects" } } } @@ -1169,14 +1337,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/non-negative": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/min-max": { "post": { - "operationId": "settings-int-parameter-non-negative", - "summary": "A route with a non negative integer", + "operationId": "settings-int-parameter-with-min-and-max", + "summary": "A route with a min and max integers", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1202,8 +1426,9 @@ "limit": { "type": "integer", "format": "int64", - "description": "not negative", - "minimum": 0 + "description": "Between 5 and 10", + "minimum": 5, + "maximum": 10 } } } @@ -1262,14 +1487,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/positive": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/min": { "post": { - "operationId": "settings-int-parameter-positive", - "summary": "A route with a positive integer", + "operationId": "settings-int-parameter-with-min", + "summary": "A route with a min integers", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1295,8 +1576,8 @@ "limit": { "type": "integer", "format": "int64", - "description": "positive", - "minimum": 1 + "description": "At least 5", + "minimum": 5 } } } @@ -1355,14 +1636,70 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/negative": { + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/max": { "post": { - "operationId": "settings-int-parameter-negative", - "summary": "A route with a negative integer", + "operationId": "settings-int-parameter-with-max", + "summary": "A route with a max integers", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1388,8 +1725,8 @@ "limit": { "type": "integer", "format": "int64", - "description": "negative", - "maximum": -1 + "description": "At most 10", + "maximum": 10 } } } @@ -1448,14 +1785,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/non-positive": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/non-negative": { "post": { - "operationId": "settings-int-parameter-non-positive", - "summary": "A route with a non positive integer", + "operationId": "settings-int-parameter-non-negative", + "summary": "A route with a non negative integer", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1481,8 +1874,8 @@ "limit": { "type": "integer", "format": "int64", - "description": "non positive", - "maximum": 0 + "description": "not negative", + "minimum": 0 } } } @@ -1541,14 +1934,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/mixed-list-one": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/positive": { "post": { - "operationId": "settings-list-of-int-string-and-one-bool", - "summary": "A route with a list of 2 integers, 2 strings and 1 boolean", + "operationId": "settings-int-parameter-positive", + "summary": "A route with a positive integer", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1568,33 +2017,14 @@ "schema": { "type": "object", "required": [ - "weird" + "limit" ], "properties": { - "weird": { - "description": "Weird list", - "oneOf": [ - { - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - { - "type": "string", - "enum": [ - "yes", - "no" - ] - }, - { - "type": "boolean", - "enum": [ - true - ] - } - ] + "limit": { + "type": "integer", + "format": "int64", + "description": "positive", + "minimum": 1 } } } @@ -1653,94 +2083,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/mixed-list-all": { - "post": { - "operationId": "settings-list-of-int-string-and-all-bools", - "summary": "A route with a list of 2 integers, 2 strings and 1 boolean", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "weird" - ], - "properties": { - "weird": { - "description": "Weird list", - "oneOf": [ - { - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - { - "type": "string", - "enum": [ - "yes", - "no" - ] - }, - { - "type": "boolean", - "enum": [ - true, - false - ] + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} } - ] + } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -1770,10 +2143,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/negative": { "post": { - "operationId": "settings-boolean-parameter-required", - "summary": "A route with required boolean", + "operationId": "settings-int-parameter-negative", + "summary": "A route with a negative integer", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1793,12 +2166,14 @@ "schema": { "type": "object", "required": [ - "yesOrNo" + "limit" ], "properties": { - "yesOrNo": { - "type": "boolean", - "description": "Boolean required" + "limit": { + "type": "integer", + "format": "int64", + "description": "negative", + "maximum": -1 } } } @@ -1857,14 +2232,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/boolean-default-false": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/non-positive": { "post": { - "operationId": "settings-boolean-parameter-default-false", - "summary": "A route with boolean defaulting to false", + "operationId": "settings-int-parameter-non-positive", + "summary": "A route with a non positive integer", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1878,16 +2309,20 @@ } ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { "type": "object", + "required": [ + "limit" + ], "properties": { - "yesOrNo": { - "type": "boolean", - "default": false, - "description": "Boolean defaulting to false" + "limit": { + "type": "integer", + "format": "int64", + "description": "non positive", + "maximum": 0 } } } @@ -1946,14 +2381,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/boolean-default-true": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/mixed-list-one": { "post": { - "operationId": "settings-boolean-parameter-default-true", - "summary": "A route with boolean defaulting to true", + "operationId": "settings-list-of-int-string-and-one-bool", + "summary": "A route with a list of 2 integers, 2 strings and 1 boolean", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1967,16 +2458,39 @@ } ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { "type": "object", + "required": [ + "weird" + ], "properties": { - "yesOrNo": { - "type": "boolean", - "default": true, - "description": "Boolean defaulting to true" + "weird": { + "description": "Weird list", + "oneOf": [ + { + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + { + "type": "string", + "enum": [ + "yes", + "no" + ] + }, + { + "type": "boolean", + "enum": [ + true + ] + } + ] } } } @@ -2035,72 +2549,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean-true": { - "post": { - "operationId": "settings-boolean-true-parameter", - "summary": "A route with boolean or true", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "yesOrNo" - ], - "properties": { - "yesOrNo": { - "type": "boolean", - "description": "boolean or true" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -2130,10 +2609,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean-false": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/mixed-list-all": { "post": { - "operationId": "settings-boolean-false-parameter", - "summary": "A route with boolean or false", + "operationId": "settings-list-of-int-string-and-all-bools", + "summary": "A route with a list of 2 integers, 2 strings and 1 boolean", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2153,12 +2632,34 @@ "schema": { "type": "object", "required": [ - "yesOrNo" + "weird" ], "properties": { - "yesOrNo": { - "type": "boolean", - "description": "boolean or false" + "weird": { + "description": "Weird list", + "oneOf": [ + { + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + { + "type": "string", + "enum": [ + "yes", + "no" + ] + }, + { + "type": "boolean", + "enum": [ + true, + false + ] + } + ] } } } @@ -2217,14 +2718,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/boolean-true-false": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean": { "post": { - "operationId": "settings-boolean-true-false-parameter", - "summary": "A route with boolean or true or false", + "operationId": "settings-boolean-parameter-required", + "summary": "A route with required boolean", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2249,7 +2806,7 @@ "properties": { "yesOrNo": { "type": "boolean", - "description": "boolean or true or false" + "description": "Boolean required" } } } @@ -2308,14 +2865,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/true-false": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean-default-false": { "post": { - "operationId": "settings-true-false-parameter", - "summary": "A route with true or false", + "operationId": "settings-boolean-parameter-default-false", + "summary": "A route with boolean defaulting to false", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2329,22 +2942,16 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { "type": "object", - "required": [ - "yesOrNo" - ], "properties": { "yesOrNo": { "type": "boolean", - "enum": [ - true, - false - ], - "description": "true or false" + "default": false, + "description": "Boolean defaulting to false" } } } @@ -2403,72 +3010,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/string-value": { - "post": { - "operationId": "settings-string-value-parameter", - "summary": "A route with string or 'test'", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "string", - "description": "string or 'test'" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -2498,10 +3070,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/string-default-null": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean-default-true": { "post": { - "operationId": "settings-string-default-null-parameter", - "summary": "A route with string or null", + "operationId": "settings-boolean-parameter-default-true", + "summary": "A route with boolean defaulting to true", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2521,11 +3093,10 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "string", - "nullable": true, - "default": null, - "description": "string or null" + "yesOrNo": { + "type": "boolean", + "default": true, + "description": "Boolean defaulting to true" } } } @@ -2584,73 +3155,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/int-value": { - "post": { - "operationId": "settings-int-value-parameter", - "summary": "A route with int or 0", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "integer", - "format": "int64", - "description": "int or 0" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -2680,10 +3215,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/numeric": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean-true": { "post": { - "operationId": "settings-numeric-parameter", - "summary": "A route with numeric", + "operationId": "settings-boolean-true-parameter", + "summary": "A route with boolean or true", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2703,12 +3238,12 @@ "schema": { "type": "object", "required": [ - "value" + "yesOrNo" ], "properties": { - "value": { - "type": "number", - "description": "Some numeric value" + "yesOrNo": { + "type": "boolean", + "description": "boolean or true" } } } @@ -2767,14 +3302,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/array-list": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean-false": { "post": { - "operationId": "settings-array-list-parameter", - "summary": "A route with list", + "operationId": "settings-boolean-false-parameter", + "summary": "A route with boolean or false", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2788,21 +3379,18 @@ } ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { "type": "object", + "required": [ + "yesOrNo" + ], "properties": { - "value": { - "type": "array", - "default": [ - "test" - ], - "description": "Some array value", - "items": { - "type": "string" - } + "yesOrNo": { + "type": "boolean", + "description": "boolean or false" } } } @@ -2861,20 +3449,76 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/array-keyed": { - "post": { - "operationId": "settings-array-keyed-parameter", - "summary": "A route with keyed array", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/boolean-true-false": { + "post": { + "operationId": "settings-boolean-true-false-parameter", + "summary": "A route with boolean or true or false", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { "bearer_auth": [] }, { @@ -2882,21 +3526,18 @@ } ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { "type": "object", + "required": [ + "yesOrNo" + ], "properties": { - "value": { - "type": "object", - "default": { - "test": "abc" - }, - "description": "Some array value", - "additionalProperties": { - "type": "string" - } + "yesOrNo": { + "type": "boolean", + "description": "boolean or true or false" } } } @@ -2955,14 +3596,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/204": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/true-false": { "post": { - "operationId": "settings-empty204", - "summary": "A route 204 response", + "operationId": "settings-true-false-parameter", + "summary": "A route with true or false", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2975,6 +3672,29 @@ "basic_auth": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "yesOrNo" + ], + "properties": { + "yesOrNo": { + "type": "boolean", + "enum": [ + true, + false + ], + "description": "true or false" + } + } + } + } + } + }, "parameters": [ { "name": "apiVersion", @@ -3000,12 +3720,86 @@ } ], "responses": { - "204": { - "description": "No settings", - "headers": { - "X-Custom": { + "200": { + "description": "Admin settings updated", + "content": { + "application/json": { "schema": { - "type": "string" + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } } } } @@ -3013,10 +3807,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/304": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/string-value": { "post": { - "operationId": "settings-empty304", - "summary": "A route 304 response", + "operationId": "settings-string-value-parameter", + "summary": "A route with string or 'test'", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -3029,12 +3823,3129 @@ "basic_auth": [] } ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string", + "description": "string or 'test'" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/string-default-null": { + "post": { + "operationId": "settings-string-default-null-parameter", + "summary": "A route with string or null", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string", + "nullable": true, + "default": null, + "description": "string or null" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/int-value": { + "post": { + "operationId": "settings-int-value-parameter", + "summary": "A route with int or 0", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "integer", + "format": "int64", + "description": "int or 0" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/numeric": { + "post": { + "operationId": "settings-numeric-parameter", + "summary": "A route with numeric", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "number", + "description": "Some numeric value" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/array-list": { + "post": { + "operationId": "settings-array-list-parameter", + "summary": "A route with list", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "default": [ + "test" + ], + "description": "Some array value", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/array-keyed": { + "post": { + "operationId": "settings-array-keyed-parameter", + "summary": "A route with keyed array", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "object", + "default": { + "test": "abc" + }, + "description": "Some array value", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/204": { + "post": { + "operationId": "settings-empty204", + "summary": "A route 204 response", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "204": { + "description": "No settings", + "headers": { + "X-Custom": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/304": { + "post": { + "operationId": "settings-empty304", + "summary": "A route 304 response", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "304": { + "description": "No settings" + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/passwordConfirmationAnnotation": { + "post": { + "operationId": "settings-password-confirmation-annotation", + "summary": "Route with password confirmation annotation", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/passwordConfirmationAttribute": { + "post": { + "operationId": "settings-password-confirmation-attribute", + "summary": "Route with password confirmation attribute", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/oneOf": { + "post": { + "operationId": "settings-one-of", + "summary": "Route with oneOf", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "double" + }, + { + "type": "boolean" + } + ] + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/anyOf": { + "post": { + "operationId": "settings-any-of", + "summary": "Route with anyOf", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "anyOf": [ + { + "type": "object", + "required": [ + "test" + ], + "properties": { + "test": { + "type": "string" + } + } + }, + { + "type": "object", + "required": [ + "test", + "abc" + ], + "properties": { + "test": { + "type": "string" + }, + "abc": { + "type": "integer", + "format": "int64" + } + } + } + ] + } + } + } + } + } + } + } + }, + "201": { + "description": "CREATED", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "anyOf": [ + { + "type": "object", + "required": [ + "foobar" + ], + "properties": { + "foobar": { + "type": "string" + } + } + }, + { + "type": "object", + "required": [ + "disco", + "abc" + ], + "properties": { + "disco": { + "type": "string" + }, + "abc": { + "type": "integer", + "format": "int64" + } + } + }, + { + "type": "object", + "required": [ + "test", + "abc" + ], + "properties": { + "test": { + "type": "string" + }, + "abc": { + "type": "integer", + "format": "int64" + } + } + } + ] + } + } + } + } + } + } + } + }, + "202": { + "description": "ACCEPTED", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "anyOf": [ + { + "type": "number", + "format": "double" + }, + { + "type": "number" + } + ] + } + } + } + } + } + } + } + }, + "205": { + "description": "RESET CONTENT", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "anyOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "double" + } + ] + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/floatDouble": { + "post": { + "operationId": "settings-float-double", + "summary": "Route with float and double", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "number", + "format": "double" + } + } + } + } + } + } + } + }, + "201": { + "description": "CREATED", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "number", + "format": "double" + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/emptyArray": { + "post": { + "operationId": "settings-empty-array", + "summary": "Route with empty array", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/parameterGET": { + "get": { + "operationId": "settings-parameter-request-body-get", + "summary": "Route with parameter", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "simple", + "in": "query", + "description": "Value", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "complex", + "in": "query", + "description": "Values", + "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": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/parameterHEAD": { + "head": { + "operationId": "settings-parameter-request-body-head", + "summary": "Route with parameter", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "simple", + "in": "query", + "description": "Value", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "complex", + "in": "query", + "description": "Values", + "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": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/parameterPOST": { + "post": { + "operationId": "settings-parameter-request-body-post", + "summary": "Route with parameter", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "simple", + "complex" + ], + "properties": { + "simple": { + "type": "integer", + "format": "int64", + "description": "Value" + }, + "complex": { + "type": "object", + "description": "Values", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/parameterPUT": { + "put": { + "operationId": "settings-parameter-request-body-put", + "summary": "Route with parameter", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "simple", + "complex" + ], + "properties": { + "simple": { + "type": "integer", + "format": "int64", + "description": "Value" + }, + "complex": { + "type": "object", + "description": "Values", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/parameterDELETE": { + "delete": { + "operationId": "settings-parameter-request-body-delete", + "summary": "Route with parameter", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "simple", + "in": "query", + "description": "Value", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "complex", + "in": "query", + "description": "Values", + "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": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/parameterPATCH": { + "patch": { + "operationId": "settings-parameter-request-body-patch", + "summary": "Route with parameter", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "simple", + "complex" + ], + "properties": { + "simple": { + "type": "integer", + "format": "int64", + "description": "Value" + }, + "complex": { + "type": "object", + "description": "Values", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/objectDefaults": { + "post": { + "operationId": "settings-object-defaults", + "summary": "Route with object defaults", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "empty": { + "type": "object", + "default": {}, + "description": "Empty", + "additionalProperties": { + "type": "string" + } + }, + "values": { + "type": "object", + "default": { + "key": "value" + }, + "description": "Values", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { "type": "string", "enum": [ "v2" @@ -3054,17 +6965,109 @@ } ], "responses": { - "304": { - "description": "No settings" + "200": { + "description": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/passwordConfirmationAnnotation": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/whitespace": { "post": { - "operationId": "settings-password-confirmation-annotation", - "summary": "Route with password confirmation annotation", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "operationId": "settings-whitespace", + "summary": "some whitespace", + "description": "even more whitespace\nThis endpoint requires admin access\nThis endpoint requires password confirmation", "tags": [ "settings" ], @@ -3076,6 +7079,26 @@ "basic_auth": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "integer", + "format": "int64", + "description": "and this one has even more whitespace" + } + } + } + } + } + }, "parameters": [ { "name": "apiVersion", @@ -3089,20 +7112,87 @@ "default": "v2" } }, - { - "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": "OK", + { + "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": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -3132,18 +7222,15 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/passwordConfirmationAttribute": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/cors/annotation": { "post": { - "operationId": "settings-password-confirmation-attribute", - "summary": "Route with password confirmation attribute", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "operationId": "settings-with-cors-annotation", + "summary": "Route with CORS annotation", + "description": "This endpoint requires admin access\nThis endpoint allows CORS requests", "tags": [ "settings" ], "security": [ - { - "bearer_auth": [] - }, { "basic_auth": [] } @@ -3200,53 +7287,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/oneOf": { - "post": { - "operationId": "settings-one-of", - "summary": "Route with oneOf", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } }, - { - "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": "OK", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -3265,24 +7336,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer", - "format": "int64" - }, - { - "type": "number", - "format": "double" - }, - { - "type": "boolean" - } - ] - } + "data": {} } } } @@ -3293,18 +7347,15 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/anyOf": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/cors/attribute": { "post": { - "operationId": "settings-any-of", - "summary": "Route with anyOf", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "operationId": "settings-with-cors-attribute", + "summary": "Route with CORS attribute", + "description": "This endpoint requires admin access\nThis endpoint allows CORS requests", "tags": [ "settings" ], "security": [ - { - "bearer_auth": [] - }, { "basic_auth": [] } @@ -3354,111 +7405,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "anyOf": [ - { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "test", - "abc" - ], - "properties": { - "test": { - "type": "string" - }, - "abc": { - "type": "integer", - "format": "int64" - } - } - } - ] - } - } - } - } - } - } - } - }, - "201": { - "description": "CREATED", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "anyOf": [ - { - "type": "object", - "required": [ - "foobar" - ], - "properties": { - "foobar": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "disco", - "abc" - ], - "properties": { - "disco": { - "type": "string" - }, - "abc": { - "type": "integer", - "format": "int64" - } - } - }, - { - "type": "object", - "required": [ - "test", - "abc" - ], - "properties": { - "test": { - "type": "string" - }, - "abc": { - "type": "integer", - "format": "int64" - } - } - } - ] - } + "data": {} } } } @@ -3466,8 +7413,8 @@ } } }, - "202": { - "description": "ACCEPTED", + "401": { + "description": "Current user is not logged in", "content": { "application/json": { "schema": { @@ -3485,18 +7432,8 @@ "properties": { "meta": { "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "anyOf": [ - { - "type": "number", - "format": "double" - }, - { - "type": "number" - } - ] - } + }, + "data": {} } } } @@ -3504,8 +7441,8 @@ } } }, - "205": { - "description": "RESET CONTENT", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -3524,18 +7461,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "anyOf": [ - { - "type": "integer", - "format": "int64" - }, - { - "type": "number", - "format": "double" - } - ] - } + "data": {} } } } @@ -3546,11 +7472,12 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/floatDouble": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated": { "post": { - "operationId": "settings-float-double", - "summary": "Route with float and double", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "operationId": "settings-deprecated-route", + "summary": "A deprecated POST route", + "description": "This endpoint requires admin access", + "deprecated": true, "tags": [ "settings" ], @@ -3562,6 +7489,25 @@ "basic_auth": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "active" + ], + "properties": { + "active": { + "type": "boolean", + "description": "Not deprecated" + } + } + } + } + } + }, "parameters": [ { "name": "apiVersion", @@ -3588,7 +7534,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "Admin settings updated", "content": { "application/json": { "schema": { @@ -3607,10 +7553,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "number", - "format": "double" - } + "data": {} } } } @@ -3618,8 +7561,8 @@ } } }, - "201": { - "description": "CREATED", + "401": { + "description": "Current user is not logged in", "content": { "application/json": { "schema": { @@ -3638,63 +7581,16 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "number", - "format": "double" - } + "data": {} } } } } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/emptyArray": { - "post": { - "operationId": "settings-empty-array", - "summary": "Route with empty array", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "OK", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -3713,18 +7609,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} } } } @@ -3735,11 +7620,12 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/parameterGET": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-get": { "get": { - "operationId": "settings-parameter-request-body-get", - "summary": "Route with parameter", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "operationId": "settings-deprecated-route-get", + "summary": "A deprecated GET route", + "description": "This endpoint requires admin access", + "deprecated": true, "tags": [ "settings" ], @@ -3765,22 +7651,16 @@ } }, { - "name": "simple", + "name": "active", "in": "query", - "description": "Value", + "description": "Not deprecated", "required": true, "schema": { "type": "integer", - "format": "int64" - } - }, - { - "name": "complex", - "in": "query", - "description": "Values", - "required": true, - "schema": { - "type": "string" + "enum": [ + 0, + 1 + ] } }, { @@ -3796,7 +7676,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "Admin settings updated", "content": { "application/json": { "schema": { @@ -3815,90 +7695,16 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} } } } } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/parameterHEAD": { - "head": { - "operationId": "settings-parameter-request-body-head", - "summary": "Route with parameter", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "name": "simple", - "in": "query", - "description": "Value", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "complex", - "in": "query", - "description": "Values", - "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": "OK", + "401": { + "description": "Current user is not logged in", "content": { "application/json": { "schema": { @@ -3917,18 +7723,35 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} } } } @@ -3939,11 +7762,11 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/parameterPOST": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-parameter": { "post": { - "operationId": "settings-parameter-request-body-post", - "summary": "Route with parameter", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "operationId": "settings-deprecated-parameter", + "summary": "A deprecated parameter does not deprecate the POST method", + "description": "This endpoint requires admin access", "tags": [ "settings" ], @@ -3962,21 +7785,18 @@ "schema": { "type": "object", "required": [ - "simple", - "complex" + "active", + "deprecated" ], "properties": { - "simple": { - "type": "integer", - "format": "int64", - "description": "Value" + "active": { + "type": "boolean", + "description": "Not deprecated" }, - "complex": { - "type": "object", - "description": "Values", - "additionalProperties": { - "type": "string" - } + "deprecated": { + "type": "boolean", + "deprecated": true, + "description": "boolean Deprecated: This parameter will be removed in a future version" } } } @@ -4009,7 +7829,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "Admin settings updated", "content": { "application/json": { "schema": { @@ -4028,99 +7848,44 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} } } } } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/parameterPUT": { - "put": { - "operationId": "settings-parameter-request-body-put", - "summary": "Route with parameter", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "simple", - "complex" - ], - "properties": { - "simple": { - "type": "integer", - "format": "int64", - "description": "Value" - }, - "complex": { - "type": "object", - "description": "Values", - "additionalProperties": { - "type": "string" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "OK", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -4139,18 +7904,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} } } } @@ -4161,11 +7915,11 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/parameterDELETE": { - "delete": { - "operationId": "settings-parameter-request-body-delete", - "summary": "Route with parameter", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-parameter-get": { + "get": { + "operationId": "settings-deprecated-parameter-get", + "summary": "A deprecated parameter does not deprecate the GET method", + "description": "This endpoint requires admin access", "tags": [ "settings" ], @@ -4191,22 +7945,30 @@ } }, { - "name": "simple", + "name": "active", "in": "query", - "description": "Value", + "description": "Not deprecated", "required": true, "schema": { "type": "integer", - "format": "int64" + "enum": [ + 0, + 1 + ] } }, { - "name": "complex", + "name": "deprecated", "in": "query", - "description": "Values", + "description": "boolean Deprecated: This parameter will be removed in a future version", "required": true, + "deprecated": true, "schema": { - "type": "string" + "type": "integer", + "enum": [ + 0, + 1 + ] } }, { @@ -4222,7 +7984,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "Admin settings updated", "content": { "application/json": { "schema": { @@ -4241,99 +8003,44 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} } } } } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/parameterPATCH": { - "patch": { - "operationId": "settings-parameter-request-body-patch", - "summary": "Route with parameter", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "simple", - "complex" - ], - "properties": { - "simple": { - "type": "integer", - "format": "int64", - "description": "Value" - }, - "complex": { - "type": "object", - "description": "Values", - "additionalProperties": { - "type": "string" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "OK", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -4352,18 +8059,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} } } } @@ -4374,11 +8070,12 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/objectDefaults": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-route-parameter": { "post": { - "operationId": "settings-object-defaults", - "summary": "Route with object defaults", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "operationId": "settings-deprecated-route-and-parameter", + "summary": "A deprecated parameter on a deprecated POST method", + "description": "This endpoint requires admin access", + "deprecated": true, "tags": [ "settings" ], @@ -4391,29 +8088,24 @@ } ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { "type": "object", + "required": [ + "active", + "deprecated" + ], "properties": { - "empty": { - "type": "object", - "default": {}, - "description": "Empty", - "additionalProperties": { - "type": "string" - } + "active": { + "type": "boolean", + "description": "Not deprecated" }, - "values": { - "type": "object", - "default": { - "key": "value" - }, - "description": "Values", - "additionalProperties": { - "type": "string" - } + "deprecated": { + "type": "boolean", + "deprecated": true, + "description": "boolean Deprecated: This parameter will be removed in a future version" } } } @@ -4446,7 +8138,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "Admin settings updated", "content": { "application/json": { "schema": { @@ -4465,18 +8157,63 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} } } } @@ -4487,11 +8224,12 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/whitespace": { - "post": { - "operationId": "settings-whitespace", - "summary": "some whitespace", - "description": "even more whitespace\nThis endpoint requires admin access\nThis endpoint requires password confirmation", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-route-parameter-get": { + "get": { + "operationId": "settings-deprecated-route-and-parameter-get", + "summary": "A deprecated parameter on a deprecated GET method", + "description": "This endpoint requires admin access", + "deprecated": true, "tags": [ "settings" ], @@ -4503,26 +8241,6 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "integer", - "format": "int64", - "description": "and this one has even more whitespace" - } - } - } - } - } - }, "parameters": [ { "name": "apiVersion", @@ -4536,6 +8254,33 @@ "default": "v2" } }, + { + "name": "active", + "in": "query", + "description": "Not deprecated", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "deprecated", + "in": "query", + "description": "boolean Deprecated: This parameter will be removed in a future version", + "required": true, + "deprecated": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -4549,7 +8294,63 @@ ], "responses": { "200": { - "description": "OK", + "description": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -4568,18 +8369,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} } } } @@ -4590,15 +8380,18 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/cors/annotation": { - "post": { - "operationId": "settings-with-cors-annotation", - "summary": "Route with CORS annotation", - "description": "This endpoint requires admin access\nThis endpoint allows CORS requests", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/same-path": { + "get": { + "operationId": "settings-same-path-get", + "summary": "A GET method with the same path as the POST method", + "description": "This endpoint requires admin access", "tags": [ "settings" ], "security": [ + { + "bearer_auth": [] + }, { "basic_auth": [] } @@ -4629,7 +8422,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "Admin settings updated", "content": { "application/json": { "schema": { @@ -4655,50 +8448,9 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/cors/attribute": { - "post": { - "operationId": "settings-with-cors-attribute", - "summary": "Route with CORS attribute", - "description": "This endpoint requires admin access\nThis endpoint allows CORS requests", - "tags": [ - "settings" - ], - "security": [ - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "OK", + "401": { + "description": "Current user is not logged in", "content": { "application/json": { "schema": { @@ -4724,73 +8476,9 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated": { - "post": { - "operationId": "settings-deprecated-route", - "summary": "A deprecated POST route", - "description": "This endpoint requires admin access", - "deprecated": true, - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "active" - ], - "properties": { - "active": { - "type": "boolean", - "description": "Not deprecated" - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -4818,14 +8506,11 @@ } } } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-get": { - "get": { - "operationId": "settings-deprecated-route-get", - "summary": "A deprecated GET route", + }, + "post": { + "operationId": "settings-same-path-post", + "summary": "A POST method with the same path as the GET method", "description": "This endpoint requires admin access", - "deprecated": true, "tags": [ "settings" ], @@ -4850,19 +8535,6 @@ "default": "v2" } }, - { - "name": "active", - "in": "query", - "description": "Not deprecated", - "required": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -4902,78 +8574,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-parameter": { - "post": { - "operationId": "settings-deprecated-parameter", - "summary": "A deprecated parameter does not deprecate the POST method", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "active", - "deprecated" - ], - "properties": { - "active": { - "type": "boolean", - "description": "Not deprecated" - }, - "deprecated": { - "type": "boolean", - "deprecated": true, - "description": "boolean Deprecated: This parameter will be removed in a future version" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } - }, - { - "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": "Admin settings updated", + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -5003,10 +8634,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-parameter-get": { - "get": { - "operationId": "settings-deprecated-parameter-get", - "summary": "A deprecated parameter does not deprecate the GET method", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/request-header": { + "post": { + "operationId": "settings-request-header", + "summary": "A method with a request header.", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -5033,30 +8664,64 @@ } }, { - "name": "active", - "in": "query", - "description": "Not deprecated", - "required": true, + "name": "x-custom-header-1", + "in": "header", + "description": "A custom header 1", "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] + "type": "string" } }, { - "name": "deprecated", - "in": "query", - "description": "boolean Deprecated: This parameter will be removed in a future version", - "required": true, - "deprecated": true, + "name": "x-custom-header-2", + "in": "header", + "description": "A custom header 2", "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] + "type": "string" + } + }, + { + "name": "x-custom-header-3", + "in": "header", + "description": "A custom header 3", + "schema": { + "type": "string" + } + }, + { + "name": "x-custom-header-4", + "in": "header", + "description": "A custom header 4", + "schema": { + "type": "string" + } + }, + { + "name": "x-custom-header-7", + "in": "header", + "description": "A custom header 7", + "schema": { + "type": "string" + } + }, + { + "name": "x-custom-header-5", + "in": "header", + "schema": { + "type": "string" + } + }, + { + "name": "custom-header-6", + "in": "header", + "schema": { + "type": "string" + } + }, + { + "name": "user-agent", + "in": "header", + "schema": { + "type": "string" } }, { @@ -5098,16 +8763,71 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/deprecated-route-parameter": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/request-params": { "post": { - "operationId": "settings-deprecated-route-and-parameter", - "summary": "A deprecated parameter on a deprecated POST method", + "operationId": "settings-request-params", + "summary": "A method with a request params.", "description": "This endpoint requires admin access", - "deprecated": true, "tags": [ "settings" ], @@ -5120,24 +8840,21 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { "type": "object", - "required": [ - "active", - "deprecated" - ], "properties": { - "active": { - "type": "boolean", - "description": "Not deprecated" + "some-param": { + "type": "object", + "nullable": true, + "default": null }, - "deprecated": { - "type": "boolean", - "deprecated": true, - "description": "boolean Deprecated: This parameter will be removed in a future version" + "some-param-with-explicit-default-value": { + "type": "object", + "nullable": true, + "default": "abc" } } } @@ -5196,81 +8913,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-route-parameter-get": { - "get": { - "operationId": "settings-deprecated-route-and-parameter-get", - "summary": "A deprecated parameter on a deprecated GET method", - "description": "This endpoint requires admin access", - "deprecated": true, - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } - }, - { - "name": "active", - "in": "query", - "description": "Not deprecated", - "required": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "deprecated", - "in": "query", - "description": "boolean Deprecated: This parameter will be removed in a future version", - "required": true, - "deprecated": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } - } - ], - "responses": { - "200": { - "description": "Admin settings updated", + }, + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -5300,10 +8973,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/same-path": { - "get": { - "operationId": "settings-same-path-get", - "summary": "A GET method with the same path as the POST method", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/merged-responses": { + "post": { + "operationId": "settings-merged-responses", + "summary": "A with merged responses.", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -5343,6 +9016,88 @@ "responses": { "200": { "description": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "a" + ], + "properties": { + "a": { + "type": "string" + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "b" + ], + "properties": { + "b": { + "type": "integer", + "format": "int64" + } + } + } + ] + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -5370,10 +9125,12 @@ } } } - }, + } + }, + "/ocs/v2.php/apps/notifications/api/{apiVersion}/custom/403": { "post": { - "operationId": "settings-same-path-post", - "summary": "A POST method with the same path as the GET method", + "operationId": "settings-custom403", + "summary": "A page with a custom 403.", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -5411,8 +9168,71 @@ } ], "responses": { - "200": { + "403": { "description": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "a" + ], + "properties": { + "a": { + "type": "string" + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + ] + } + } + } + }, + "401": { + "description": "Current user is not logged in", "content": { "application/json": { "schema": { @@ -5442,13 +9262,13 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/request-header": { - "post": { - "operationId": "settings-request-header", - "summary": "A method with a request header.", + "/ocs/v2.php/tests/attribute-ocs/{param}": { + "get": { + "operationId": "routing-attributeocs-route", + "summary": "OCS Route with attribute", "description": "This endpoint requires admin access", "tags": [ - "settings" + "routing" ], "security": [ { @@ -5460,76 +9280,13 @@ ], "parameters": [ { - "name": "apiVersion", + "name": "param", "in": "path", "required": true, "schema": { "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } - }, - { - "name": "x-custom-header-1", - "in": "header", - "description": "A custom header 1", - "schema": { - "type": "string" - } - }, - { - "name": "x-custom-header-2", - "in": "header", - "description": "A custom header 2", - "schema": { - "type": "string" - } - }, - { - "name": "x-custom-header-3", - "in": "header", - "description": "A custom header 3", - "schema": { - "type": "string" - } - }, - { - "name": "x-custom-header-4", - "in": "header", - "description": "A custom header 4", - "schema": { - "type": "string" - } - }, - { - "name": "x-custom-header-7", - "in": "header", - "description": "A custom header 7", - "schema": { - "type": "string" - } - }, - { - "name": "x-custom-header-5", - "in": "header", - "schema": { - "type": "string" - } - }, - { - "name": "custom-header-6", - "in": "header", - "schema": { - "type": "string" - } - }, - { - "name": "user-agent", - "in": "header", - "schema": { - "type": "string" + "pattern": "^[a-z]+$", + "default": "abc" } }, { @@ -5545,7 +9302,7 @@ ], "responses": { "200": { - "description": "Admin settings updated", + "description": "Success", "content": { "application/json": { "schema": { @@ -5571,75 +9328,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/request-params": { - "post": { - "operationId": "settings-request-params", - "summary": "A method with a request params.", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "some-param": { - "type": "object", - "nullable": true, - "default": null - }, - "some-param-with-explicit-default-value": { - "type": "object", - "nullable": true, - "default": "abc" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -5667,11 +9386,9 @@ } } } - } - }, - "/ocs/v2.php/tests/attribute-ocs/{param}": { - "get": { - "operationId": "routing-attributeocs-route", + }, + "post": { + "operationId": "routing-attributeocs-apiroute", "summary": "OCS Route with attribute", "description": "This endpoint requires admin access", "tags": [ @@ -5735,49 +9452,37 @@ } } } - } - } - }, - "post": { - "operationId": "routing-attributeocs-apiroute", - "summary": "OCS Route with attribute", - "description": "This endpoint requires admin access", - "tags": [ - "routing" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "param", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z]+$", - "default": "abc" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } }, - { - "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": "Success", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -5873,6 +9578,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } }, @@ -5941,6 +9702,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } }, @@ -6009,6 +9826,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } diff --git a/tests/openapi-ex_app.json b/tests/openapi-ex_app.json index 6cd1a49..8bd2e74 100644 --- a/tests/openapi-ex_app.json +++ b/tests/openapi-ex_app.json @@ -154,6 +154,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -225,6 +281,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } diff --git a/tests/openapi-federation.json b/tests/openapi-federation.json index f084fbd..fc73217 100644 --- a/tests/openapi-federation.json +++ b/tests/openapi-federation.json @@ -153,6 +153,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -225,6 +253,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } diff --git a/tests/openapi-full.json b/tests/openapi-full.json index 1e97e33..e138a8a 100644 --- a/tests/openapi-full.json +++ b/tests/openapi-full.json @@ -374,6 +374,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -447,6 +503,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -520,6 +632,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -597,53 +765,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/return-arrays/non-empty-string": { - "get": { - "operationId": "return_arrays-non-empty-string-array", - "summary": "Route with array using non-empty-string keys", - "description": "This endpoint requires admin access", - "tags": [ - "return_arrays" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } }, - { - "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": "OK", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -662,12 +814,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } + "data": {} } } } @@ -678,10 +825,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/return-arrays/lowercase-string": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/return-arrays/non-empty-string": { "get": { - "operationId": "return_arrays-lowercase-string-array", - "summary": "Route with array using lowercase-string keys", + "operationId": "return_arrays-non-empty-string-array", + "summary": "Route with array using non-empty-string keys", "description": "This endpoint requires admin access", "tags": [ "return_arrays" @@ -751,53 +898,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/return-arrays/non-empty-lowercase-string": { - "get": { - "operationId": "return_arrays-non-empty-lowercase-string-array", - "summary": "Route with array using non-empty-lowercase-string keys", - "description": "This endpoint requires admin access", - "tags": [ - "return_arrays" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } }, - { - "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": "OK", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -816,12 +947,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "additionalProperties": { - "type": "object" - } - } + "data": {} } } } @@ -832,12 +958,13 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/admin-scope": { - "post": { - "operationId": "settings-moved-to-admin-scope", - "summary": "Route is only in the admin scope due to defined scope", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/return-arrays/lowercase-string": { + "get": { + "operationId": "return_arrays-lowercase-string-array", + "summary": "Route with array using lowercase-string keys", + "description": "This endpoint requires admin access", "tags": [ - "settings" + "return_arrays" ], "security": [ { @@ -873,7 +1000,7 @@ ], "responses": { "200": { - "description": "Admin settings updated", + "description": "OK", "content": { "application/json": { "schema": { @@ -893,7 +1020,10 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/PushDevice" + "type": "object", + "additionalProperties": { + "type": "object" + } } } } @@ -901,16 +1031,73 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/default-and-admin-scope": { - "post": { - "operationId": "settings-default-and-admin-scope", - "summary": "Route is in admin and default scope", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/return-arrays/non-empty-lowercase-string": { + "get": { + "operationId": "return_arrays-non-empty-lowercase-string-array", + "summary": "Route with array using non-empty-lowercase-string keys", + "description": "This endpoint requires admin access", "tags": [ - "settings" + "return_arrays" ], "security": [ { @@ -946,7 +1133,68 @@ ], "responses": { "200": { - "description": "Admin settings updated", + "description": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "additionalProperties": { + "type": "object" + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -976,11 +1224,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/list-of-int": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/admin-scope": { "post": { - "operationId": "settings-list-of-int-parameters", - "summary": "A route with a limited set of possible integers", - "description": "This endpoint requires admin access", + "operationId": "settings-moved-to-admin-scope", + "summary": "Route is only in the admin scope due to defined scope", "tags": [ "settings" ], @@ -992,38 +1239,6 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "limit" - ], - "properties": { - "limit": { - "type": "integer", - "format": "int64", - "enum": [ - 1, - 2, - 3, - 4, - 5, - 6, - 7, - 8, - 9, - 10 - ], - "description": "Maximum number of objects" - } - } - } - } - } - }, "parameters": [ { "name": "apiVersion", @@ -1069,82 +1284,18 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": {} + "data": { + "$ref": "#/components/schemas/PushDevice" + } } } } } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/min-max": { - "post": { - "operationId": "settings-int-parameter-with-min-and-max", - "summary": "A route with a min and max integers", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "limit" - ], - "properties": { - "limit": { - "type": "integer", - "format": "int64", - "description": "Between 5 and 10", - "minimum": 5, - "maximum": 10 - } - } - } - } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } - }, - { - "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": "Admin settings updated", + "401": { + "description": "Current user is not logged in", "content": { "application/json": { "schema": { @@ -1174,11 +1325,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/min": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/default-and-admin-scope": { "post": { - "operationId": "settings-int-parameter-with-min", - "summary": "A route with a min integers", - "description": "This endpoint requires admin access", + "operationId": "settings-default-and-admin-scope", + "summary": "Route is in admin and default scope", "tags": [ "settings" ], @@ -1190,27 +1340,6 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "limit" - ], - "properties": { - "limit": { - "type": "integer", - "format": "int64", - "description": "At least 5", - "minimum": 5 - } - } - } - } - } - }, "parameters": [ { "name": "apiVersion", @@ -1263,14 +1392,42 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "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/notifications/api/{apiVersion}/max": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/list-of-int": { "post": { - "operationId": "settings-int-parameter-with-max", - "summary": "A route with a max integers", + "operationId": "settings-list-of-int-parameters", + "summary": "A route with a limited set of possible integers", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1296,8 +1453,19 @@ "limit": { "type": "integer", "format": "int64", - "description": "At most 10", - "maximum": 10 + "enum": [ + 1, + 2, + 3, + 4, + 5, + 6, + 7, + 8, + 9, + 10 + ], + "description": "Maximum number of objects" } } } @@ -1356,14 +1524,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/non-negative": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/min-max": { "post": { - "operationId": "settings-int-parameter-non-negative", - "summary": "A route with a non negative integer", + "operationId": "settings-int-parameter-with-min-and-max", + "summary": "A route with a min and max integers", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1389,8 +1613,9 @@ "limit": { "type": "integer", "format": "int64", - "description": "not negative", - "minimum": 0 + "description": "Between 5 and 10", + "minimum": 5, + "maximum": 10 } } } @@ -1449,14 +1674,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/positive": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/min": { "post": { - "operationId": "settings-int-parameter-positive", - "summary": "A route with a positive integer", + "operationId": "settings-int-parameter-with-min", + "summary": "A route with a min integers", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1482,8 +1763,8 @@ "limit": { "type": "integer", "format": "int64", - "description": "positive", - "minimum": 1 + "description": "At least 5", + "minimum": 5 } } } @@ -1542,14 +1823,70 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/negative": { + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/max": { "post": { - "operationId": "settings-int-parameter-negative", - "summary": "A route with a negative integer", + "operationId": "settings-int-parameter-with-max", + "summary": "A route with a max integers", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1575,8 +1912,8 @@ "limit": { "type": "integer", "format": "int64", - "description": "negative", - "maximum": -1 + "description": "At most 10", + "maximum": 10 } } } @@ -1635,14 +1972,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/non-positive": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/non-negative": { "post": { - "operationId": "settings-int-parameter-non-positive", - "summary": "A route with a non positive integer", + "operationId": "settings-int-parameter-non-negative", + "summary": "A route with a non negative integer", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1668,8 +2061,8 @@ "limit": { "type": "integer", "format": "int64", - "description": "non positive", - "maximum": 0 + "description": "not negative", + "minimum": 0 } } } @@ -1728,14 +2121,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/mixed-list-one": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/positive": { "post": { - "operationId": "settings-list-of-int-string-and-one-bool", - "summary": "A route with a list of 2 integers, 2 strings and 1 boolean", + "operationId": "settings-int-parameter-positive", + "summary": "A route with a positive integer", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1755,33 +2204,14 @@ "schema": { "type": "object", "required": [ - "weird" + "limit" ], "properties": { - "weird": { - "description": "Weird list", - "oneOf": [ - { - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - { - "type": "string", - "enum": [ - "yes", - "no" - ] - }, - { - "type": "boolean", - "enum": [ - true - ] - } - ] + "limit": { + "type": "integer", + "format": "int64", + "description": "positive", + "minimum": 1 } } } @@ -1840,94 +2270,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/mixed-list-all": { - "post": { - "operationId": "settings-list-of-int-string-and-all-bools", - "summary": "A route with a list of 2 integers, 2 strings and 1 boolean", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "weird" - ], - "properties": { - "weird": { - "description": "Weird list", - "oneOf": [ - { - "type": "integer", - "enum": [ - 0, - 1 - ] - }, - { - "type": "string", - "enum": [ - "yes", - "no" - ] - }, - { - "type": "boolean", - "enum": [ - true, - false - ] + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} } - ] + } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -1957,10 +2330,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/negative": { "post": { - "operationId": "settings-boolean-parameter-required", - "summary": "A route with required boolean", + "operationId": "settings-int-parameter-negative", + "summary": "A route with a negative integer", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -1980,12 +2353,14 @@ "schema": { "type": "object", "required": [ - "yesOrNo" + "limit" ], "properties": { - "yesOrNo": { - "type": "boolean", - "description": "Boolean required" + "limit": { + "type": "integer", + "format": "int64", + "description": "negative", + "maximum": -1 } } } @@ -2044,14 +2419,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/boolean-default-false": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/non-positive": { "post": { - "operationId": "settings-boolean-parameter-default-false", - "summary": "A route with boolean defaulting to false", + "operationId": "settings-int-parameter-non-positive", + "summary": "A route with a non positive integer", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2065,16 +2496,20 @@ } ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { "type": "object", + "required": [ + "limit" + ], "properties": { - "yesOrNo": { - "type": "boolean", - "default": false, - "description": "Boolean defaulting to false" + "limit": { + "type": "integer", + "format": "int64", + "description": "non positive", + "maximum": 0 } } } @@ -2133,14 +2568,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/boolean-default-true": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/mixed-list-one": { "post": { - "operationId": "settings-boolean-parameter-default-true", - "summary": "A route with boolean defaulting to true", + "operationId": "settings-list-of-int-string-and-one-bool", + "summary": "A route with a list of 2 integers, 2 strings and 1 boolean", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2154,16 +2645,39 @@ } ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { "type": "object", + "required": [ + "weird" + ], "properties": { - "yesOrNo": { - "type": "boolean", - "default": true, - "description": "Boolean defaulting to true" + "weird": { + "description": "Weird list", + "oneOf": [ + { + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + { + "type": "string", + "enum": [ + "yes", + "no" + ] + }, + { + "type": "boolean", + "enum": [ + true + ] + } + ] } } } @@ -2222,72 +2736,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean-true": { - "post": { - "operationId": "settings-boolean-true-parameter", - "summary": "A route with boolean or true", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "yesOrNo" - ], - "properties": { - "yesOrNo": { - "type": "boolean", - "description": "boolean or true" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -2317,10 +2796,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean-false": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/mixed-list-all": { "post": { - "operationId": "settings-boolean-false-parameter", - "summary": "A route with boolean or false", + "operationId": "settings-list-of-int-string-and-all-bools", + "summary": "A route with a list of 2 integers, 2 strings and 1 boolean", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2340,12 +2819,34 @@ "schema": { "type": "object", "required": [ - "yesOrNo" + "weird" ], "properties": { - "yesOrNo": { - "type": "boolean", - "description": "boolean or false" + "weird": { + "description": "Weird list", + "oneOf": [ + { + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + { + "type": "string", + "enum": [ + "yes", + "no" + ] + }, + { + "type": "boolean", + "enum": [ + true, + false + ] + } + ] } } } @@ -2404,14 +2905,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/boolean-true-false": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean": { "post": { - "operationId": "settings-boolean-true-false-parameter", - "summary": "A route with boolean or true or false", + "operationId": "settings-boolean-parameter-required", + "summary": "A route with required boolean", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2436,7 +2993,7 @@ "properties": { "yesOrNo": { "type": "boolean", - "description": "boolean or true or false" + "description": "Boolean required" } } } @@ -2495,14 +3052,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/true-false": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean-default-false": { "post": { - "operationId": "settings-true-false-parameter", - "summary": "A route with true or false", + "operationId": "settings-boolean-parameter-default-false", + "summary": "A route with boolean defaulting to false", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2516,22 +3129,16 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { "type": "object", - "required": [ - "yesOrNo" - ], "properties": { "yesOrNo": { "type": "boolean", - "enum": [ - true, - false - ], - "description": "true or false" + "default": false, + "description": "Boolean defaulting to false" } } } @@ -2590,72 +3197,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/string-value": { - "post": { - "operationId": "settings-string-value-parameter", - "summary": "A route with string or 'test'", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "string", - "description": "string or 'test'" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -2685,10 +3257,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/string-default-null": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean-default-true": { "post": { - "operationId": "settings-string-default-null-parameter", - "summary": "A route with string or null", + "operationId": "settings-boolean-parameter-default-true", + "summary": "A route with boolean defaulting to true", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2708,11 +3280,10 @@ "schema": { "type": "object", "properties": { - "value": { - "type": "string", - "nullable": true, - "default": null, - "description": "string or null" + "yesOrNo": { + "type": "boolean", + "default": true, + "description": "Boolean defaulting to true" } } } @@ -2771,73 +3342,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/int-value": { - "post": { - "operationId": "settings-int-value-parameter", - "summary": "A route with int or 0", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "integer", - "format": "int64", - "description": "int or 0" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -2867,10 +3402,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/numeric": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean-true": { "post": { - "operationId": "settings-numeric-parameter", - "summary": "A route with numeric", + "operationId": "settings-boolean-true-parameter", + "summary": "A route with boolean or true", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2890,12 +3425,12 @@ "schema": { "type": "object", "required": [ - "value" + "yesOrNo" ], "properties": { - "value": { - "type": "number", - "description": "Some numeric value" + "yesOrNo": { + "type": "boolean", + "description": "boolean or true" } } } @@ -2954,14 +3489,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/array-list": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean-false": { "post": { - "operationId": "settings-array-list-parameter", - "summary": "A route with list", + "operationId": "settings-boolean-false-parameter", + "summary": "A route with boolean or false", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -2975,21 +3566,18 @@ } ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { "type": "object", + "required": [ + "yesOrNo" + ], "properties": { - "value": { - "type": "array", - "default": [ - "test" - ], - "description": "Some array value", - "items": { - "type": "string" - } + "yesOrNo": { + "type": "boolean", + "description": "boolean or false" } } } @@ -3048,75 +3636,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/array-keyed": { - "post": { - "operationId": "settings-array-keyed-parameter", - "summary": "A route with keyed array", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "object", - "default": { - "test": "abc" - }, - "description": "Some array value", - "additionalProperties": { - "type": "string" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -3146,10 +3696,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/204": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/boolean-true-false": { "post": { - "operationId": "settings-empty204", - "summary": "A route 204 response", + "operationId": "settings-boolean-true-false-parameter", + "summary": "A route with boolean or true or false", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -3162,6 +3712,25 @@ "basic_auth": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "yesOrNo" + ], + "properties": { + "yesOrNo": { + "type": "boolean", + "description": "boolean or true or false" + } + } + } + } + } + }, "parameters": [ { "name": "apiVersion", @@ -3187,71 +3756,98 @@ } ], "responses": { - "204": { - "description": "No settings", - "headers": { - "X-Custom": { + "200": { + "description": "Admin settings updated", + "content": { + "application/json": { "schema": { - "type": "string" + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/304": { - "post": { - "operationId": "settings-empty304", - "summary": "A route 304 response", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } } - ], - "responses": { - "304": { - "description": "No settings" - } } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/passwordConfirmationAnnotation": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/true-false": { "post": { - "operationId": "settings-password-confirmation-annotation", - "summary": "Route with password confirmation annotation", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "operationId": "settings-true-false-parameter", + "summary": "A route with true or false", + "description": "This endpoint requires admin access", "tags": [ "settings" ], @@ -3263,6 +3859,29 @@ "basic_auth": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "yesOrNo" + ], + "properties": { + "yesOrNo": { + "type": "boolean", + "enum": [ + true, + false + ], + "description": "true or false" + } + } + } + } + } + }, "parameters": [ { "name": "apiVersion", @@ -3289,7 +3908,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "Admin settings updated", "content": { "application/json": { "schema": { @@ -3315,17 +3934,2993 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/passwordConfirmationAttribute": { - "post": { - "operationId": "settings-password-confirmation-attribute", - "summary": "Route with password confirmation attribute", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", - "tags": [ - "settings" + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/string-value": { + "post": { + "operationId": "settings-string-value-parameter", + "summary": "A route with string or 'test'", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "string", + "description": "string or 'test'" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/string-default-null": { + "post": { + "operationId": "settings-string-default-null-parameter", + "summary": "A route with string or null", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string", + "nullable": true, + "default": null, + "description": "string or null" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/int-value": { + "post": { + "operationId": "settings-int-value-parameter", + "summary": "A route with int or 0", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "integer", + "format": "int64", + "description": "int or 0" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/numeric": { + "post": { + "operationId": "settings-numeric-parameter", + "summary": "A route with numeric", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "number", + "description": "Some numeric value" + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/array-list": { + "post": { + "operationId": "settings-array-list-parameter", + "summary": "A route with list", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "array", + "default": [ + "test" + ], + "description": "Some array value", + "items": { + "type": "string" + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/array-keyed": { + "post": { + "operationId": "settings-array-keyed-parameter", + "summary": "A route with keyed array", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "object", + "default": { + "test": "abc" + }, + "description": "Some array value", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/204": { + "post": { + "operationId": "settings-empty204", + "summary": "A route 204 response", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "204": { + "description": "No settings", + "headers": { + "X-Custom": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/304": { + "post": { + "operationId": "settings-empty304", + "summary": "A route 304 response", + "description": "This endpoint requires admin access", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "304": { + "description": "No settings" + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/passwordConfirmationAnnotation": { + "post": { + "operationId": "settings-password-confirmation-annotation", + "summary": "Route with password confirmation annotation", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/passwordConfirmationAttribute": { + "post": { + "operationId": "settings-password-confirmation-attribute", + "summary": "Route with password confirmation attribute", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/oneOf": { + "post": { + "operationId": "settings-one-of", + "summary": "Route with oneOf", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "double" + }, + { + "type": "boolean" + } + ] + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/anyOf": { + "post": { + "operationId": "settings-any-of", + "summary": "Route with anyOf", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "anyOf": [ + { + "type": "object", + "required": [ + "test" + ], + "properties": { + "test": { + "type": "string" + } + } + }, + { + "type": "object", + "required": [ + "test", + "abc" + ], + "properties": { + "test": { + "type": "string" + }, + "abc": { + "type": "integer", + "format": "int64" + } + } + } + ] + } + } + } + } + } + } + } + }, + "201": { + "description": "CREATED", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "anyOf": [ + { + "type": "object", + "required": [ + "foobar" + ], + "properties": { + "foobar": { + "type": "string" + } + } + }, + { + "type": "object", + "required": [ + "disco", + "abc" + ], + "properties": { + "disco": { + "type": "string" + }, + "abc": { + "type": "integer", + "format": "int64" + } + } + }, + { + "type": "object", + "required": [ + "test", + "abc" + ], + "properties": { + "test": { + "type": "string" + }, + "abc": { + "type": "integer", + "format": "int64" + } + } + } + ] + } + } + } + } + } + } + } + }, + "202": { + "description": "ACCEPTED", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "anyOf": [ + { + "type": "number", + "format": "double" + }, + { + "type": "number" + } + ] + } + } + } + } + } + } + } + }, + "205": { + "description": "RESET CONTENT", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "anyOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "number", + "format": "double" + } + ] + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/floatDouble": { + "post": { + "operationId": "settings-float-double", + "summary": "Route with float and double", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "number", + "format": "double" + } + } + } + } + } + } + } + }, + "201": { + "description": "CREATED", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "number", + "format": "double" + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/emptyArray": { + "post": { + "operationId": "settings-empty-array", + "summary": "Route with empty array", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/parameterGET": { + "get": { + "operationId": "settings-parameter-request-body-get", + "summary": "Route with parameter", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "simple", + "in": "query", + "description": "Value", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "complex", + "in": "query", + "description": "Values", + "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": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/parameterHEAD": { + "head": { + "operationId": "settings-parameter-request-body-head", + "summary": "Route with parameter", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "simple", + "in": "query", + "description": "Value", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "complex", + "in": "query", + "description": "Values", + "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": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/parameterPOST": { + "post": { + "operationId": "settings-parameter-request-body-post", + "summary": "Route with parameter", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "simple", + "complex" + ], + "properties": { + "simple": { + "type": "integer", + "format": "int64", + "description": "Value" + }, + "complex": { + "type": "object", + "description": "Values", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/parameterPUT": { + "put": { + "operationId": "settings-parameter-request-body-put", + "summary": "Route with parameter", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "simple", + "complex" + ], + "properties": { + "simple": { + "type": "integer", + "format": "int64", + "description": "Value" + }, + "complex": { + "type": "object", + "description": "Values", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/parameterDELETE": { + "delete": { + "operationId": "settings-parameter-request-body-delete", + "summary": "Route with parameter", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "simple", + "in": "query", + "description": "Value", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "complex", + "in": "query", + "description": "Values", + "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": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/parameterPATCH": { + "patch": { + "operationId": "settings-parameter-request-body-patch", + "summary": "Route with parameter", + "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "tags": [ + "settings" ], "security": [ { @@ -3335,6 +6930,34 @@ "basic_auth": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "simple", + "complex" + ], + "properties": { + "simple": { + "type": "integer", + "format": "int64", + "description": "Value" + }, + "complex": { + "type": "object", + "description": "Values", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, "parameters": [ { "name": "apiVersion", @@ -3357,11 +6980,78 @@ "type": "boolean", "default": true } - } - ], - "responses": { - "200": { - "description": "OK", + } + ], + "responses": { + "200": { + "description": "OK", + "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": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 + } + } + } + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -3391,10 +7081,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/oneOf": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/objectDefaults": { "post": { - "operationId": "settings-one-of", - "summary": "Route with oneOf", + "operationId": "settings-object-defaults", + "summary": "Route with object defaults", "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", "tags": [ "settings" @@ -3407,6 +7097,36 @@ "basic_auth": [] } ], + "requestBody": { + "required": false, + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "empty": { + "type": "object", + "default": {}, + "description": "Empty", + "additionalProperties": { + "type": "string" + } + }, + "values": { + "type": "object", + "default": { + "key": "value" + }, + "description": "Values", + "additionalProperties": { + "type": "string" + } + } + } + } + } + } + }, "parameters": [ { "name": "apiVersion", @@ -3453,22 +7173,16 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "integer", - "format": "int64" - }, - { - "type": "number", - "format": "double" - }, - { - "type": "boolean" + "type": "object", + "required": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 } - ] + } } } } @@ -3476,15 +7190,71 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/anyOf": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/whitespace": { "post": { - "operationId": "settings-any-of", - "summary": "Route with anyOf", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "operationId": "settings-whitespace", + "summary": "some whitespace", + "description": "even more whitespace\nThis endpoint requires admin access\nThis endpoint requires password confirmation", "tags": [ "settings" ], @@ -3496,6 +7266,26 @@ "basic_auth": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "value" + ], + "properties": { + "value": { + "type": "integer", + "format": "int64", + "description": "and this one has even more whitespace" + } + } + } + } + } + }, "parameters": [ { "name": "apiVersion", @@ -3542,109 +7332,16 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "anyOf": [ - { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "test", - "abc" - ], - "properties": { - "test": { - "type": "string" - }, - "abc": { - "type": "integer", - "format": "int64" - } - } - } - ] - } - } - } - } - } - } - } - }, - "201": { - "description": "CREATED", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "anyOf": [ - { - "type": "object", - "required": [ - "foobar" - ], - "properties": { - "foobar": { - "type": "string" - } - } - }, - { - "type": "object", - "required": [ - "disco", - "abc" - ], - "properties": { - "disco": { - "type": "string" - }, - "abc": { - "type": "integer", - "format": "int64" - } - } - }, - { - "type": "object", - "required": [ - "test", - "abc" - ], - "properties": { - "test": { - "type": "string" - }, - "abc": { - "type": "integer", - "format": "int64" - } - } + "type": "object", + "required": [ + "test" + ], + "properties": { + "test": { + "type": "array", + "maxItems": 0 } - ] + } } } } @@ -3653,8 +7350,8 @@ } } }, - "202": { - "description": "ACCEPTED", + "401": { + "description": "Current user is not logged in", "content": { "application/json": { "schema": { @@ -3673,17 +7370,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "anyOf": [ - { - "type": "number", - "format": "double" - }, - { - "type": "number" - } - ] - } + "data": {} } } } @@ -3691,8 +7378,8 @@ } } }, - "205": { - "description": "RESET CONTENT", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -3711,18 +7398,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "anyOf": [ - { - "type": "integer", - "format": "int64" - }, - { - "type": "number", - "format": "double" - } - ] - } + "data": {} } } } @@ -3733,18 +7409,15 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/floatDouble": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/cors/annotation": { "post": { - "operationId": "settings-float-double", - "summary": "Route with float and double", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "operationId": "settings-with-cors-annotation", + "summary": "Route with CORS annotation", + "description": "This endpoint requires admin access\nThis endpoint allows CORS requests", "tags": [ "settings" ], "security": [ - { - "bearer_auth": [] - }, { "basic_auth": [] } @@ -3794,10 +7467,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "number", - "format": "double" - } + "data": {} } } } @@ -3805,8 +7475,8 @@ } } }, - "201": { - "description": "CREATED", + "401": { + "description": "Current user is not logged in", "content": { "application/json": { "schema": { @@ -3825,10 +7495,35 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "number", - "format": "double" - } + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} } } } @@ -3839,18 +7534,15 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/emptyArray": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/cors/attribute": { "post": { - "operationId": "settings-empty-array", - "summary": "Route with empty array", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "operationId": "settings-with-cors-attribute", + "summary": "Route with CORS attribute", + "description": "This endpoint requires admin access\nThis endpoint allows CORS requests", "tags": [ "settings" ], "security": [ - { - "bearer_auth": [] - }, { "basic_auth": [] } @@ -3900,18 +7592,63 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} } } } @@ -3922,11 +7659,12 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/parameterGET": { - "get": { - "operationId": "settings-parameter-request-body-get", - "summary": "Route with parameter", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated": { + "post": { + "operationId": "settings-deprecated-route", + "summary": "A deprecated POST route", + "description": "This endpoint requires admin access", + "deprecated": true, "tags": [ "settings" ], @@ -3938,6 +7676,25 @@ "basic_auth": [] } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "active" + ], + "properties": { + "active": { + "type": "boolean", + "description": "Not deprecated" + } + } + } + } + } + }, "parameters": [ { "name": "apiVersion", @@ -3952,38 +7709,75 @@ } }, { - "name": "simple", - "in": "query", - "description": "Value", + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", "required": true, "schema": { - "type": "integer", - "format": "int64" + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } }, - { - "name": "complex", - "in": "query", - "description": "Values", - "required": true, - "schema": { - "type": "string" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } }, - { - "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": "OK", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -4002,18 +7796,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} } } } @@ -4024,11 +7807,12 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/parameterHEAD": { - "head": { - "operationId": "settings-parameter-request-body-head", - "summary": "Route with parameter", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-get": { + "get": { + "operationId": "settings-deprecated-route-get", + "summary": "A deprecated GET route", + "description": "This endpoint requires admin access", + "deprecated": true, "tags": [ "settings" ], @@ -4054,22 +7838,16 @@ } }, { - "name": "simple", + "name": "active", "in": "query", - "description": "Value", + "description": "Not deprecated", "required": true, "schema": { "type": "integer", - "format": "int64" - } - }, - { - "name": "complex", - "in": "query", - "description": "Values", - "required": true, - "schema": { - "type": "string" + "enum": [ + 0, + 1 + ] } }, { @@ -4085,7 +7863,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "Admin settings updated", "content": { "application/json": { "schema": { @@ -4104,99 +7882,44 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} } } } } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/parameterPOST": { - "post": { - "operationId": "settings-parameter-request-body-post", - "summary": "Route with parameter", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "simple", - "complex" - ], - "properties": { - "simple": { - "type": "integer", - "format": "int64", - "description": "Value" - }, - "complex": { - "type": "object", - "description": "Values", - "additionalProperties": { - "type": "string" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "OK", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -4215,18 +7938,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} } } } @@ -4237,11 +7949,11 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/parameterPUT": { - "put": { - "operationId": "settings-parameter-request-body-put", - "summary": "Route with parameter", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-parameter": { + "post": { + "operationId": "settings-deprecated-parameter", + "summary": "A deprecated parameter does not deprecate the POST method", + "description": "This endpoint requires admin access", "tags": [ "settings" ], @@ -4260,21 +7972,18 @@ "schema": { "type": "object", "required": [ - "simple", - "complex" + "active", + "deprecated" ], "properties": { - "simple": { - "type": "integer", - "format": "int64", - "description": "Value" + "active": { + "type": "boolean", + "description": "Not deprecated" }, - "complex": { - "type": "object", - "description": "Values", - "additionalProperties": { - "type": "string" - } + "deprecated": { + "type": "boolean", + "deprecated": true, + "description": "boolean Deprecated: This parameter will be removed in a future version" } } } @@ -4307,7 +8016,63 @@ ], "responses": { "200": { - "description": "OK", + "description": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -4326,18 +8091,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} } } } @@ -4348,11 +8102,11 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/parameterDELETE": { - "delete": { - "operationId": "settings-parameter-request-body-delete", - "summary": "Route with parameter", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-parameter-get": { + "get": { + "operationId": "settings-deprecated-parameter-get", + "summary": "A deprecated parameter does not deprecate the GET method", + "description": "This endpoint requires admin access", "tags": [ "settings" ], @@ -4378,22 +8132,30 @@ } }, { - "name": "simple", + "name": "active", "in": "query", - "description": "Value", + "description": "Not deprecated", "required": true, "schema": { "type": "integer", - "format": "int64" + "enum": [ + 0, + 1 + ] } }, { - "name": "complex", + "name": "deprecated", "in": "query", - "description": "Values", + "description": "boolean Deprecated: This parameter will be removed in a future version", "required": true, + "deprecated": true, "schema": { - "type": "string" + "type": "integer", + "enum": [ + 0, + 1 + ] } }, { @@ -4409,7 +8171,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "Admin settings updated", "content": { "application/json": { "schema": { @@ -4428,99 +8190,44 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} } } } } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/parameterPATCH": { - "patch": { - "operationId": "settings-parameter-request-body-patch", - "summary": "Route with parameter", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "simple", - "complex" - ], - "properties": { - "simple": { - "type": "integer", - "format": "int64", - "description": "Value" - }, - "complex": { - "type": "object", - "description": "Values", - "additionalProperties": { - "type": "string" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "OK", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -4539,18 +8246,7 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} } } } @@ -4561,11 +8257,12 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/objectDefaults": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-route-parameter": { "post": { - "operationId": "settings-object-defaults", - "summary": "Route with object defaults", - "description": "This endpoint requires admin access\nThis endpoint requires password confirmation", + "operationId": "settings-deprecated-route-and-parameter", + "summary": "A deprecated parameter on a deprecated POST method", + "description": "This endpoint requires admin access", + "deprecated": true, "tags": [ "settings" ], @@ -4578,29 +8275,24 @@ } ], "requestBody": { - "required": false, + "required": true, "content": { "application/json": { "schema": { "type": "object", + "required": [ + "active", + "deprecated" + ], "properties": { - "empty": { - "type": "object", - "default": {}, - "description": "Empty", - "additionalProperties": { - "type": "string" - } + "active": { + "type": "boolean", + "description": "Not deprecated" }, - "values": { - "type": "object", - "default": { - "key": "value" - }, - "description": "Values", - "additionalProperties": { - "type": "string" - } + "deprecated": { + "type": "boolean", + "deprecated": true, + "description": "boolean Deprecated: This parameter will be removed in a future version" } } } @@ -4633,7 +8325,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "Admin settings updated", "content": { "application/json": { "schema": { @@ -4652,18 +8344,63 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} } } } @@ -4674,11 +8411,12 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/whitespace": { - "post": { - "operationId": "settings-whitespace", - "summary": "some whitespace", - "description": "even more whitespace\nThis endpoint requires admin access\nThis endpoint requires password confirmation", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-route-parameter-get": { + "get": { + "operationId": "settings-deprecated-route-and-parameter-get", + "summary": "A deprecated parameter on a deprecated GET method", + "description": "This endpoint requires admin access", + "deprecated": true, "tags": [ "settings" ], @@ -4690,26 +8428,6 @@ "basic_auth": [] } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "value" - ], - "properties": { - "value": { - "type": "integer", - "format": "int64", - "description": "and this one has even more whitespace" - } - } - } - } - } - }, "parameters": [ { "name": "apiVersion", @@ -4723,6 +8441,33 @@ "default": "v2" } }, + { + "name": "active", + "in": "query", + "description": "Not deprecated", + "required": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "deprecated", + "in": "query", + "description": "boolean Deprecated: This parameter will be removed in a future version", + "required": true, + "deprecated": true, + "schema": { + "type": "integer", + "enum": [ + 0, + 1 + ] + } + }, { "name": "OCS-APIRequest", "in": "header", @@ -4736,7 +8481,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "Admin settings updated", "content": { "application/json": { "schema": { @@ -4755,68 +8500,44 @@ "meta": { "$ref": "#/components/schemas/OCSMeta" }, - "data": { - "type": "object", - "required": [ - "test" - ], - "properties": { - "test": { - "type": "array", - "maxItems": 0 - } - } - } + "data": {} } } } } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/cors/annotation": { - "post": { - "operationId": "settings-with-cors-annotation", - "summary": "Route with CORS annotation", - "description": "This endpoint requires admin access\nThis endpoint allows CORS requests", - "tags": [ - "settings" - ], - "security": [ - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } - } - ], - "responses": { - "200": { - "description": "OK", + }, + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -4846,15 +8567,18 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/cors/attribute": { - "post": { - "operationId": "settings-with-cors-attribute", - "summary": "Route with CORS attribute", - "description": "This endpoint requires admin access\nThis endpoint allows CORS requests", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/same-path": { + "get": { + "operationId": "settings-same-path-get", + "summary": "A GET method with the same path as the POST method", + "description": "This endpoint requires admin access", "tags": [ "settings" ], "security": [ + { + "bearer_auth": [] + }, { "basic_auth": [] } @@ -4885,7 +8609,7 @@ ], "responses": { "200": { - "description": "OK", + "description": "Admin settings updated", "content": { "application/json": { "schema": { @@ -4911,73 +8635,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated": { - "post": { - "operationId": "settings-deprecated-route", - "summary": "A deprecated POST route", - "description": "This endpoint requires admin access", - "deprecated": true, - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "active" - ], - "properties": { - "active": { - "type": "boolean", - "description": "Not deprecated" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -5004,15 +8692,12 @@ } } } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-get": { - "get": { - "operationId": "settings-deprecated-route-get", - "summary": "A deprecated GET route", + } + }, + "post": { + "operationId": "settings-same-path-post", + "summary": "A POST method with the same path as the GET method", "description": "This endpoint requires admin access", - "deprecated": true, "tags": [ "settings" ], @@ -5037,19 +8722,6 @@ "default": "v2" } }, - { - "name": "active", - "in": "query", - "description": "Not deprecated", - "required": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } - }, { "name": "OCS-APIRequest", "in": "header", @@ -5089,78 +8761,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-parameter": { - "post": { - "operationId": "settings-deprecated-parameter", - "summary": "A deprecated parameter does not deprecate the POST method", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "active", - "deprecated" - ], - "properties": { - "active": { - "type": "boolean", - "description": "Not deprecated" - }, - "deprecated": { - "type": "boolean", - "deprecated": true, - "description": "boolean Deprecated: This parameter will be removed in a future version" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } } } } } - } - }, - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -5190,10 +8821,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-parameter-get": { - "get": { - "operationId": "settings-deprecated-parameter-get", - "summary": "A deprecated parameter does not deprecate the GET method", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/request-header": { + "post": { + "operationId": "settings-request-header", + "summary": "A method with a request header.", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -5220,30 +8851,64 @@ } }, { - "name": "active", - "in": "query", - "description": "Not deprecated", - "required": true, + "name": "x-custom-header-1", + "in": "header", + "description": "A custom header 1", "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] + "type": "string" } }, { - "name": "deprecated", - "in": "query", - "description": "boolean Deprecated: This parameter will be removed in a future version", - "required": true, - "deprecated": true, + "name": "x-custom-header-2", + "in": "header", + "description": "A custom header 2", "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] + "type": "string" + } + }, + { + "name": "x-custom-header-3", + "in": "header", + "description": "A custom header 3", + "schema": { + "type": "string" + } + }, + { + "name": "x-custom-header-4", + "in": "header", + "description": "A custom header 4", + "schema": { + "type": "string" + } + }, + { + "name": "x-custom-header-7", + "in": "header", + "description": "A custom header 7", + "schema": { + "type": "string" + } + }, + { + "name": "x-custom-header-5", + "in": "header", + "schema": { + "type": "string" + } + }, + { + "name": "custom-header-6", + "in": "header", + "schema": { + "type": "string" + } + }, + { + "name": "user-agent", + "in": "header", + "schema": { + "type": "string" } }, { @@ -5285,16 +8950,71 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "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/notifications/api/{apiVersion}/deprecated-route-parameter": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/request-params": { "post": { - "operationId": "settings-deprecated-route-and-parameter", - "summary": "A deprecated parameter on a deprecated POST method", + "operationId": "settings-request-params", + "summary": "A method with a request params.", "description": "This endpoint requires admin access", - "deprecated": true, "tags": [ "settings" ], @@ -5307,24 +9027,21 @@ } ], "requestBody": { - "required": true, + "required": false, "content": { "application/json": { "schema": { "type": "object", - "required": [ - "active", - "deprecated" - ], "properties": { - "active": { - "type": "boolean", - "description": "Not deprecated" + "some-param": { + "type": "object", + "nullable": true, + "default": null }, - "deprecated": { - "type": "boolean", - "deprecated": true, - "description": "boolean Deprecated: This parameter will be removed in a future version" + "some-param-with-explicit-default-value": { + "type": "object", + "nullable": true, + "default": "abc" } } } @@ -5383,81 +9100,37 @@ } } } - } - } - } - }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/deprecated-route-parameter-get": { - "get": { - "operationId": "settings-deprecated-route-and-parameter-get", - "summary": "A deprecated parameter on a deprecated GET method", - "description": "This endpoint requires admin access", - "deprecated": true, - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } - }, - { - "name": "active", - "in": "query", - "description": "Not deprecated", - "required": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] - } }, - { - "name": "deprecated", - "in": "query", - "description": "boolean Deprecated: This parameter will be removed in a future version", - "required": true, - "deprecated": true, - "schema": { - "type": "integer", - "enum": [ - 0, - 1 - ] + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -5487,10 +9160,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/same-path": { - "get": { - "operationId": "settings-same-path-get", - "summary": "A GET method with the same path as the POST method", + "/ocs/v2.php/apps/notifications/api/{apiVersion}/merged-responses": { + "post": { + "operationId": "settings-merged-responses", + "summary": "A with merged responses.", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -5530,6 +9203,60 @@ "responses": { "200": { "description": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "a" + ], + "properties": { + "a": { + "type": "string" + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "b" + ], + "properties": { + "b": { + "type": "integer", + "format": "int64" + } + } + } + ] + } + } + } + }, + "401": { + "description": "Current user is not logged in", "content": { "application/json": { "schema": { @@ -5555,51 +9282,9 @@ } } } - } - } - }, - "post": { - "operationId": "settings-same-path-post", - "summary": "A POST method with the same path as the GET method", - "description": "This endpoint requires admin access", - "tags": [ - "settings" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "apiVersion", - "in": "path", - "required": true, - "schema": { - "type": "string", - "enum": [ - "v2" - ], - "default": "v2" - } }, - { - "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": "Admin settings updated", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -5629,10 +9314,10 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/request-header": { + "/ocs/v2.php/apps/notifications/api/{apiVersion}/custom/403": { "post": { - "operationId": "settings-request-header", - "summary": "A method with a request header.", + "operationId": "settings-custom403", + "summary": "A page with a custom 403.", "description": "This endpoint requires admin access", "tags": [ "settings" @@ -5654,69 +9339,8 @@ "type": "string", "enum": [ "v2" - ], - "default": "v2" - } - }, - { - "name": "x-custom-header-1", - "in": "header", - "description": "A custom header 1", - "schema": { - "type": "string" - } - }, - { - "name": "x-custom-header-2", - "in": "header", - "description": "A custom header 2", - "schema": { - "type": "string" - } - }, - { - "name": "x-custom-header-3", - "in": "header", - "description": "A custom header 3", - "schema": { - "type": "string" - } - }, - { - "name": "x-custom-header-4", - "in": "header", - "description": "A custom header 4", - "schema": { - "type": "string" - } - }, - { - "name": "x-custom-header-7", - "in": "header", - "description": "A custom header 7", - "schema": { - "type": "string" - } - }, - { - "name": "x-custom-header-5", - "in": "header", - "schema": { - "type": "string" - } - }, - { - "name": "custom-header-6", - "in": "header", - "schema": { - "type": "string" - } - }, - { - "name": "user-agent", - "in": "header", - "schema": { - "type": "string" + ], + "default": "v2" } }, { @@ -5731,8 +9355,71 @@ } ], "responses": { - "200": { + "403": { "description": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "a" + ], + "properties": { + "a": { + "type": "string" + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + ] + } + } + } + }, + "401": { + "description": "Current user is not logged in", "content": { "application/json": { "schema": { @@ -5762,13 +9449,13 @@ } } }, - "/ocs/v2.php/apps/notifications/api/{apiVersion}/request-params": { - "post": { - "operationId": "settings-request-params", - "summary": "A method with a request params.", + "/ocs/v2.php/tests/attribute-ocs/{param}": { + "get": { + "operationId": "routing-attributeocs-route", + "summary": "OCS Route with attribute", "description": "This endpoint requires admin access", "tags": [ - "settings" + "routing" ], "security": [ { @@ -5778,39 +9465,15 @@ "basic_auth": [] } ], - "requestBody": { - "required": false, - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "some-param": { - "type": "object", - "nullable": true, - "default": null - }, - "some-param-with-explicit-default-value": { - "type": "object", - "nullable": true, - "default": "abc" - } - } - } - } - } - }, "parameters": [ { - "name": "apiVersion", + "name": "param", "in": "path", "required": true, "schema": { "type": "string", - "enum": [ - "v2" - ], - "default": "v2" + "pattern": "^[a-z]+$", + "default": "abc" } }, { @@ -5826,7 +9489,63 @@ ], "responses": { "200": { - "description": "Admin settings updated", + "description": "Success", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -5854,11 +9573,9 @@ } } } - } - }, - "/ocs/v2.php/tests/attribute-ocs/{param}": { - "get": { - "operationId": "routing-attributeocs-route", + }, + "post": { + "operationId": "routing-attributeocs-apiroute", "summary": "OCS Route with attribute", "description": "This endpoint requires admin access", "tags": [ @@ -5922,12 +9639,70 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } - }, - "post": { - "operationId": "routing-attributeocs-apiroute", - "summary": "OCS Route with attribute", + } + }, + "/index.php/tests/attribute-index/{param}": { + "get": { + "operationId": "routing-attribute-index-route", + "summary": "Index Route with attribute", "description": "This endpoint requires admin access", "tags": [ "routing" @@ -5990,13 +9765,67 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } - } - }, - "/index.php/tests/attribute-index/{param}": { - "get": { - "operationId": "routing-attribute-index-route", + }, + "post": { + "operationId": "routing-attribute-index-frontpageroute", "summary": "Index Route with attribute", "description": "This endpoint requires admin access", "tags": [ @@ -6060,49 +9889,37 @@ } } } - } - } - }, - "post": { - "operationId": "routing-attribute-index-frontpageroute", - "summary": "Index Route with attribute", - "description": "This endpoint requires admin access", - "tags": [ - "routing" - ], - "security": [ - { - "bearer_auth": [] }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "param", - "in": "path", - "required": true, - "schema": { - "type": "string", - "pattern": "^[a-z]+$", - "default": "abc" + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } }, - { - "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": "Success", + "403": { + "description": "Logged in account must be an admin", "content": { "application/json": { "schema": { @@ -6196,6 +10013,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -6268,6 +10141,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -6358,6 +10287,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -6434,6 +10391,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -6507,6 +10492,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -6606,6 +10619,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -6687,6 +10728,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -6836,43 +10905,321 @@ } } }, - "203": { - "description": "STATUS_NON_AUTHORATIVE_INFORMATION", + "203": { + "description": "STATUS_NON_AUTHORATIVE_INFORMATION", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "204": { + "description": "STATUS_NO_CONTENT" + }, + "500": { + "description": "STATUS_INTERNAL_SERVER_ERROR", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "401": { + "description": "Current user is not logged in", + "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/notifications/api/{apiVersion}/public-page/annotation": { + "post": { + "operationId": "settings-public-page-annotation", + "summary": "A public page with annotation.", + "tags": [ + "settings" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "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/notifications/api/{apiVersion}/public-page/attribute": { + "post": { + "operationId": "settings-public-page-attribute", + "summary": "A public page with attribute.", + "tags": [ + "settings" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "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/notifications/api/{apiVersion}/custom/401": { + "post": { + "operationId": "settings-custom401", + "summary": "A page with a custom 401.", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "401": { + "description": "Admin settings updated", "content": { "application/json": { "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { + "anyOf": [ + { "type": "object", "required": [ - "meta", - "data" + "ocs" ], "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "a" + ], + "properties": { + "a": { + "type": "string" + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } } } - } - } - } - } - }, - "204": { - "description": "STATUS_NO_CONTENT" - }, - "500": { - "description": "STATUS_INTERNAL_SERVER_ERROR", - "content": { - "text/plain": { - "schema": { - "type": "string" + ] } } } @@ -6935,6 +11282,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -6958,6 +11333,42 @@ "responses": { "200": { "description": "Response returned" + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } } } } @@ -7030,6 +11441,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -7101,6 +11568,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -7172,6 +11667,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } diff --git a/tests/openapi.json b/tests/openapi.json index f06cd8a..1c5bb6e 100644 --- a/tests/openapi.json +++ b/tests/openapi.json @@ -374,6 +374,62 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -464,6 +520,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -535,6 +619,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -611,6 +723,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -684,6 +824,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -783,6 +951,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -864,6 +1060,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -1053,6 +1277,284 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "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/notifications/api/{apiVersion}/public-page/annotation": { + "post": { + "operationId": "settings-public-page-annotation", + "summary": "A public page with annotation.", + "tags": [ + "settings" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "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/notifications/api/{apiVersion}/public-page/attribute": { + "post": { + "operationId": "settings-public-page-attribute", + "summary": "A public page with attribute.", + "tags": [ + "settings" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "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": "Admin settings updated", + "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/notifications/api/{apiVersion}/custom/401": { + "post": { + "operationId": "settings-custom401", + "summary": "A page with a custom 401.", + "tags": [ + "settings" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "apiVersion", + "in": "path", + "required": true, + "schema": { + "type": "string", + "enum": [ + "v2" + ], + "default": "v2" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "401": { + "description": "Admin settings updated", + "content": { + "application/json": { + "schema": { + "anyOf": [ + { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "a" + ], + "properties": { + "a": { + "type": "string" + } + } + } + } + } + } + }, + { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + ] + } + } + } } } } @@ -1112,6 +1614,34 @@ } } } + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } } } @@ -1135,6 +1665,42 @@ "responses": { "200": { "description": "Response returned" + }, + "401": { + "description": "Current user is not logged in", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + }, + "403": { + "description": "Logged in account must be an admin", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } } } }