diff --git a/packages/spec_templates/bin/generate.dart b/packages/spec_templates/bin/generate.dart index a7eb5447..aecdfb15 100644 --- a/packages/spec_templates/bin/generate.dart +++ b/packages/spec_templates/bin/generate.dart @@ -81,12 +81,10 @@ Future main(final List args) async { if (url.endsWith('/')) { url = url.substring(0, url.length - 1); } - if (hasRoutes && hasOCS) { - if (k == 'routes') { - url = '$routesBasePath$url'; - } else if (k == 'ocs') { - url = '$ocsBasePath$url'; - } + if (k == 'routes') { + url = '$routesBasePath$url'; + } else if (k == 'ocs') { + url = '$ocsBasePath$url'; } final verb = route['verb'] as String? ?? 'GET'; @@ -218,22 +216,10 @@ Future main(final List args) async { parameters: parameters, ); } - /* - for (final bodyParameter in queryParameters) ...{ - bodyParameter.name: { - if (bodyParameter.description != null) ...{ - 'description': bodyParameter.description, - }, - 'type': bodyParameter.openAPIType ?? 'TODO', - if (bodyParameter.defaultValue != null) ...{ - 'default': bodyParameter.defaultValue, - }, - } - }, - */ final operation = Operation( operationID: '${name.replaceAll('#', '-').toLowerCase()}-TODO', + tags: [id], parameters: queryParameters.isNotEmpty ? queryParameters .map( @@ -242,12 +228,21 @@ Future main(final List args) async { in_: 'query', description: queryParameter.description, required: !queryParameter.nullable && queryParameter.defaultValue == null, - schema: { - 'type': queryParameter.openAPIType ?? 'TODO', - if (queryParameter.defaultValue != null) ...{ - 'default': queryParameter.defaultValue, - }, - }, + schema: queryParameter.openAPIType == 'boolean' + ? { + // This is a quirk in Nextcloud where sending literal booleans in query parameters doesn't work and only integers work. + // See https://github.com/nextcloud/server/issues/34226 + 'type': 'integer', + if (queryParameter.defaultValue != null) ...{ + 'default': queryParameter.defaultValue == 'true' ? 1 : 0, + }, + } + : { + 'type': queryParameter.openAPIType ?? 'TODO', + if (queryParameter.defaultValue != null) ...{ + 'default': queryParameter.defaultValue, + }, + }, ), ) .toList() @@ -291,6 +286,15 @@ Future main(final List args) async { } } + late String spdxIdentifier; + switch (license) { + case 'agpl': + spdxIdentifier = ' AGPL-3.0'; + break; + default: + throw Exception('Can not convert license name "$license" to a SPDX identifier'); + } + File( p.join( 'specs', @@ -300,36 +304,17 @@ Future main(final List args) async { ).writeAsStringSync( const JsonEncoder.withIndent(' ').convert( Spec( - version: '3.0.3', + version: '3.1.0', info: Info( title: name, version: version, description: summary, license: License( name: license, + identifier: spdxIdentifier, ), ), - servers: [ - Server( - url: - 'https://{hostname}:{port}${isCore || (hasRoutes && hasOCS) ? '' : hasOCS ? ocsBasePath : routesBasePath}', - variables: { - 'hostname': ServerVariable(default_: 'localhost'), - 'port': ServerVariable(default_: '8080'), - }, - ) - ], - security: [ - {'basic_auth': []}, - ], - components: Components( - securitySchemes: { - 'basic_auth': SecurityScheme( - type: 'http', - scheme: 'basic', - ), - }, - ), + tags: [id], paths: paths, ).toMap(), ), diff --git a/packages/spec_templates/lib/openapi_spec.dart b/packages/spec_templates/lib/openapi_spec.dart index 0ea582db..5b6f07ff 100644 --- a/packages/spec_templates/lib/openapi_spec.dart +++ b/packages/spec_templates/lib/openapi_spec.dart @@ -4,27 +4,21 @@ class Spec { Spec({ required this.version, required this.info, + required this.tags, required this.paths, - this.servers, - this.security, - this.components, }); Map toMap() => { 'openapi': version, 'info': info.toMap(), - if (servers != null) 'servers': servers!.map((final s) => s.toMap()).toList(), - if (security != null) 'security': security!, - if (components != null) 'components': components!.toMap(), + 'tags': tags.map((final tag) => {'name': tag}).toList(), 'paths': paths.map((final key, final value) => MapEntry(key, value.toMap())), }; final String version; final Info info; + final List tags; final Map paths; - final List? servers; - final Components? components; - final List>? security; } class Info { @@ -51,15 +45,21 @@ class Info { class License { License({ required this.name, + this.identifier, this.url, - }); + }) : assert( + (identifier == null) != (url == null), + 'Specify either identifier or url', + ); Map toMap() => { 'name': name, + if (identifier != null) 'identifier': identifier, if (url != null) 'url': url, }; final String name; + final String? identifier; final String? url; } @@ -183,29 +183,36 @@ class Parameter { class Operation { Operation({ - required this.responses, - this.parameters, this.operationID, + this.tags, + this.parameters, + this.responses, }); Map toMap() => { if (operationID != null) ...{ 'operationId': operationID, }, + if (tags != null) ...{ + 'tags': tags, + }, if (parameters != null) ...{ 'parameters': parameters!.map((final p) => p.toMap()).toList(), }, - 'responses': responses.map( - (final key, final value) => MapEntry( - key.toString(), - value.toMap(), + if (responses != null) ...{ + 'responses': responses!.map( + (final key, final value) => MapEntry( + key.toString(), + value.toMap(), + ), ), - ), + }, }; - final Map responses; - final List? parameters; final String? operationID; + final List? tags; + final List? parameters; + final Map? responses; } class Response { @@ -240,34 +247,3 @@ class MediaType { final Map? schema; } - -class Components { - Components({ - this.securitySchemes, - }); - - Map toMap() => { - if (securitySchemes != null) - 'securitySchemes': securitySchemes!.map((final key, final value) => MapEntry(key, value.toMap())) - }; - - final Map? securitySchemes; -} - -class SecurityScheme { - SecurityScheme({ - required this.type, - required this.scheme, - this.description, - }); - - Map toMap() => { - 'type': type, - 'scheme': scheme, - if (description != null) 'description': description, - }; - - final String type; - final String scheme; - final String? description; -} diff --git a/specs/common.json b/specs/common.json deleted file mode 100644 index 742d81c9..00000000 --- a/specs/common.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "openapi": "3.0.3", - "info": { - "title": "Common", - "version": "0.0.1" - }, - "paths": {}, - "components": { - "schemas": { - "OCSMeta": { - "type": "object", - "properties": { - "status": { - "type": "string" - }, - "statuscode": { - "type": "integer" - }, - "message": { - "type": "string" - }, - "totalitems": { - "type": "integer" - }, - "itemsperpage": { - "type": "integer" - } - } - } - } - } -} diff --git a/specs/core.json b/specs/core.json index 716d3418..094b4555 100644 --- a/specs/core.json +++ b/specs/core.json @@ -1,11 +1,12 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "Core", "version": "24.0.5", "description": "Core functionality of Nextcloud", "license": { - "name": "agpl" + "name": "agpl", + "identifier": " AGPL-3.0" } }, "servers": [ @@ -26,17 +27,32 @@ "basic_auth": [] } ], + "tags": [ + { + "name": "core" + } + ], "components": { - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - }, "schemas": { "OCSMeta": { - "deprecated": true, - "description": "Stub" + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } }, "CoreServerStatus": { "type": "object", @@ -677,8 +693,15 @@ "type": "string" }, "order": { - "type": "object", - "description": "Can either be a string or integer, see bug report https://github.com/nextcloud/server/issues/32828" + "description": "Should always be an integer, but there is a bug. See https://github.com/nextcloud/server/issues/32828", + "oneOf": [ + { + "type": "integer" + }, + { + "type": "string" + } + ] }, "href": { "type": "string" @@ -741,12 +764,21 @@ } } } + }, + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + } } }, "paths": { "/status.php": { "get": { "operationId": "get-status", + "tags": [ + "core" + ], "responses": { "200": { "description": "Status of the Nextcloud instance", @@ -764,6 +796,9 @@ "/ocs/v1.php/cloud/capabilities": { "get": { "operationId": "get-capabilities", + "tags": [ + "core" + ], "responses": { "200": { "description": "Capabilities of the Nextcloud instance", @@ -781,6 +816,9 @@ "/ocs/v1.php/core/navigation/apps": { "get": { "operationId": "get-navigation-apps", + "tags": [ + "core" + ], "responses": { "200": { "description": "Navigation apps of the Nextcloud instance", @@ -798,6 +836,9 @@ "/login/v2": { "post": { "operationId": "init-login-flow", + "tags": [ + "core" + ], "responses": { "200": { "description": "Login flow init", @@ -815,6 +856,9 @@ "/login/v2/poll": { "post": { "operationId": "get-login-flow-result", + "tags": [ + "core" + ], "parameters": [ { "name": "token", @@ -873,8 +917,8 @@ "in": "query", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "integer", + "default": 0 } }, { @@ -882,8 +926,8 @@ "in": "query", "required": false, "schema": { - "type": "boolean", - "default": true + "type": "integer", + "default": 1 } }, { @@ -898,13 +942,17 @@ ], "get": { "operationId": "get-preview", + "tags": [ + "core" + ], "responses": { "200": { "description": "Preview image of a file", "content": { "image/png": { "schema": { - "type": "string" + "type": "string", + "format": "binary" } } } @@ -933,13 +981,17 @@ ], "get": { "operationId": "get-avatar", + "tags": [ + "core" + ], "responses": { "200": { "description": "", "content": { - "application/json": { + "image/png": { "schema": { - "type": "string" + "type": "string", + "format": "binary" } } } diff --git a/specs/news.json b/specs/news.json index bc442fc8..d384bcef 100644 --- a/specs/news.json +++ b/specs/news.json @@ -1,16 +1,17 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "News", "version": "18.1.1", "description": "An RSS/Atom feed reader", "license": { - "name": "agpl" + "name": "agpl", + "identifier": " AGPL-3.0" } }, "servers": [ { - "url": "https://{hostname}:{port}/apps/news", + "url": "https://{hostname}:{port}", "variables": { "hostname": { "default": "localhost" @@ -26,13 +27,12 @@ "basic_auth": [] } ], + "tags": [ + { + "name": "news" + } + ], "components": { - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - }, "schemas": { "NewsListFeeds": { "type": "object", @@ -206,13 +206,42 @@ } } } + }, + "OCSMeta": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + } + }, + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" } } }, "paths": { - "/api/v1-2/folders": { + "/apps/news/api/v1-2/folders": { "get": { "operationId": "list-folders", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -228,6 +257,9 @@ }, "post": { "operationId": "create-folder", + "tags": [ + "news" + ], "parameters": [ { "name": "name", @@ -252,7 +284,7 @@ } } }, - "/api/v1-2/folders/{folderId}": { + "/apps/news/api/v1-2/folders/{folderId}": { "parameters": [ { "name": "folderId", @@ -265,6 +297,9 @@ ], "put": { "operationId": "rename-folder", + "tags": [ + "news" + ], "parameters": [ { "name": "name", @@ -283,6 +318,9 @@ }, "delete": { "operationId": "delete-folder", + "tags": [ + "news" + ], "responses": { "200": { "description": "" @@ -290,7 +328,7 @@ } } }, - "/api/v1-2/folders/{folderId}/read": { + "/apps/news/api/v1-2/folders/{folderId}/read": { "parameters": [ { "name": "folderId", @@ -304,6 +342,9 @@ ], "put": { "operationId": "mark-folder-as-read", + "tags": [ + "news" + ], "parameters": [ { "name": "newestItemId", @@ -322,9 +363,12 @@ } } }, - "/api/v1-2/feeds": { + "/apps/news/api/v1-2/feeds": { "get": { "operationId": "list-feeds", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -340,6 +384,9 @@ }, "post": { "operationId": "add-feed", + "tags": [ + "news" + ], "parameters": [ { "name": "url", @@ -372,7 +419,7 @@ } } }, - "/api/v1-2/feeds/{feedId}": { + "/apps/news/api/v1-2/feeds/{feedId}": { "parameters": [ { "name": "feedId", @@ -385,6 +432,9 @@ ], "delete": { "operationId": "delete-feed", + "tags": [ + "news" + ], "responses": { "200": { "description": "" @@ -392,7 +442,7 @@ } } }, - "/api/v1-2/feeds/{feedId}/move": { + "/apps/news/api/v1-2/feeds/{feedId}/move": { "parameters": [ { "name": "feedId", @@ -405,6 +455,9 @@ ], "put": { "operationId": "move-feed", + "tags": [ + "news" + ], "parameters": [ { "name": "folderId", @@ -422,7 +475,7 @@ } } }, - "/api/v1-2/feeds/{feedId}/rename": { + "/apps/news/api/v1-2/feeds/{feedId}/rename": { "parameters": [ { "name": "feedId", @@ -435,6 +488,9 @@ ], "put": { "operationId": "rename-feed", + "tags": [ + "news" + ], "parameters": [ { "name": "feedTitle", @@ -452,7 +508,7 @@ } } }, - "/api/v1-2/feeds/{feedId}/read": { + "/apps/news/api/v1-2/feeds/{feedId}/read": { "parameters": [ { "name": "feedId", @@ -465,6 +521,9 @@ ], "put": { "operationId": "mark-feed-as-read", + "tags": [ + "news" + ], "parameters": [ { "name": "newestItemId", @@ -482,9 +541,12 @@ } } }, - "/api/v1-2/items": { + "/apps/news/api/v1-2/items": { "get": { "operationId": "list-articles", + "tags": [ + "news" + ], "parameters": [ { "name": "type", @@ -509,8 +571,8 @@ "in": "query", "required": false, "schema": { - "type": "boolean", - "default": true + "type": "integer", + "default": 1 } }, { @@ -536,8 +598,8 @@ "in": "query", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "integer", + "default": 0 } } ], @@ -555,9 +617,12 @@ } } }, - "/api/v1-2/items/updated": { + "/apps/news/api/v1-2/items/updated": { "get": { "operationId": "list-updated-articles", + "tags": [ + "news" + ], "parameters": [ { "name": "type", @@ -601,7 +666,7 @@ } } }, - "/api/v1-2/items/{itemId}/read": { + "/apps/news/api/v1-2/items/{itemId}/read": { "parameters": [ { "name": "itemId", @@ -614,6 +679,9 @@ ], "put": { "operationId": "mark-article-as-read", + "tags": [ + "news" + ], "responses": { "200": { "description": "" @@ -621,7 +689,7 @@ } } }, - "/api/v1-2/items/{itemId}/unread": { + "/apps/news/api/v1-2/items/{itemId}/unread": { "parameters": [ { "name": "itemId", @@ -634,6 +702,9 @@ ], "put": { "operationId": "mark-article-as-unread", + "tags": [ + "news" + ], "responses": { "200": { "description": "" @@ -641,7 +712,7 @@ } } }, - "/api/v1-2/items/{feedId}/{guidHash}/star": { + "/apps/news/api/v1-2/items/{feedId}/{guidHash}/star": { "parameters": [ { "name": "feedId", @@ -662,6 +733,9 @@ ], "put": { "operationId": "star-article", + "tags": [ + "news" + ], "responses": { "200": { "description": "" @@ -669,7 +743,7 @@ } } }, - "/api/v1-2/items/{feedId}/{guidHash}/unstar": { + "/apps/news/api/v1-2/items/{feedId}/{guidHash}/unstar": { "parameters": [ { "name": "feedId", @@ -690,6 +764,9 @@ ], "put": { "operationId": "unstar-article", + "tags": [ + "news" + ], "responses": { "200": { "description": "" diff --git a/specs/notes.json b/specs/notes.json index ccec7c11..f4659e00 100644 --- a/specs/notes.json +++ b/specs/notes.json @@ -1,16 +1,17 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "Notes", "version": "4.5.1", "description": "Distraction-free notes and writing", "license": { - "name": "agpl" + "name": "agpl", + "identifier": " AGPL-3.0" } }, "servers": [ { - "url": "https://{hostname}:{port}/apps/notes", + "url": "https://{hostname}:{port}", "variables": { "hostname": { "default": "localhost" @@ -26,13 +27,12 @@ "basic_auth": [] } ], + "tags": [ + { + "name": "notes" + } + ], "components": { - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - }, "schemas": { "NotesNote": { "type": "object", @@ -86,13 +86,42 @@ ] } } + }, + "OCSMeta": { + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } + } + }, + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" } } }, "paths": { - "/api/v1/notes": { + "/apps/notes/api/v1/notes": { "get": { "operationId": "get-notes", + "tags": [ + "notes" + ], "parameters": [ { "name": "category", @@ -163,6 +192,9 @@ }, "post": { "operationId": "create-note", + "tags": [ + "notes" + ], "parameters": [ { "name": "category", @@ -205,8 +237,8 @@ "in": "query", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "integer", + "default": 0 } } ], @@ -224,7 +256,7 @@ } } }, - "/api/v1/notes/{id}": { + "/apps/notes/api/v1/notes/{id}": { "parameters": [ { "name": "id", @@ -236,6 +268,10 @@ } ], "get": { + "operationId": "get-note", + "tags": [ + "notes" + ], "parameters": [ { "name": "exclude", @@ -254,7 +290,6 @@ } } ], - "operationId": "get-note", "responses": { "200": { "description": "", @@ -270,6 +305,9 @@ }, "put": { "operationId": "update-note", + "tags": [ + "notes" + ], "parameters": [ { "name": "content", @@ -308,7 +346,8 @@ "in": "query", "required": false, "schema": { - "type": "boolean" + "type": "integer", + "default": 0 } }, { @@ -334,6 +373,9 @@ }, "delete": { "operationId": "delete-note", + "tags": [ + "notes" + ], "responses": { "200": { "description": "", @@ -348,9 +390,12 @@ } } }, - "/api/v1/settings": { + "/apps/notes/api/v1/settings": { "get": { "operationId": "get-settings", + "tags": [ + "notes" + ], "responses": { "200": { "description": "", @@ -366,6 +411,9 @@ }, "put": { "operationId": "update-settings", + "tags": [ + "notes" + ], "requestBody": { "required": true, "content": { diff --git a/specs/notifications.json b/specs/notifications.json index 4590c5cd..a9dc5e31 100644 --- a/specs/notifications.json +++ b/specs/notifications.json @@ -1,16 +1,17 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "Notifications", "version": "2.12.1", "description": "This app provides a backend and frontend for the notification API available in Nextcloud.", "license": { - "name": "agpl" + "name": "agpl", + "identifier": " AGPL-3.0" } }, "servers": [ { - "url": "https://{hostname}:{port}/ocs/v1.php/apps/notifications", + "url": "https://{hostname}:{port}", "variables": { "hostname": { "default": "localhost" @@ -26,17 +27,32 @@ "basic_auth": [] } ], + "tags": [ + { + "name": "notifications" + } + ], "components": { - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - }, "schemas": { "OCSMeta": { - "deprecated": true, - "description": "Stub" + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } }, "NotificationsEmpty": { "type": "object", @@ -181,6 +197,9 @@ }, "signature": { "type": "string" + }, + "message": { + "type": "string" } } }, @@ -200,6 +219,23 @@ } } }, + "NotificationsPushNotification": { + "type": "object", + "properties": { + "accountID": { + "type": "string" + }, + "priority": { + "type": "string" + }, + "type": { + "type": "string" + }, + "subject": { + "$ref": "#/components/schemas/NotificationsPushNotificationDecryptedSubject" + } + } + }, "NotificationsPushNotificationDecryptedSubject": { "type": "object", "properties": { @@ -226,12 +262,21 @@ } } } + }, + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + } } }, "paths": { - "/api/v2/notifications": { + "/ocs/v1.php/apps/notifications/api/v2/notifications": { "get": { "operationId": "list-notifications", + "tags": [ + "notifications" + ], "responses": { "200": { "description": "", @@ -247,6 +292,9 @@ }, "delete": { "operationId": "delete-all-notifications", + "tags": [ + "notifications" + ], "responses": { "200": { "description": "", @@ -261,7 +309,7 @@ } } }, - "/api/v2/notifications/{id}": { + "/ocs/v1.php/apps/notifications/api/v2/notifications/{id}": { "parameters": [ { "name": "id", @@ -274,6 +322,9 @@ ], "get": { "operationId": "get-notification", + "tags": [ + "notifications" + ], "responses": { "200": { "description": "", @@ -289,6 +340,9 @@ }, "delete": { "operationId": "delete-notification", + "tags": [ + "notifications" + ], "responses": { "200": { "description": "", @@ -303,9 +357,12 @@ } } }, - "/api/v2/push": { + "/ocs/v1.php/apps/notifications/api/v2/push": { "post": { "operationId": "register-device", + "tags": [ + "notifications" + ], "parameters": [ { "name": "pushTokenHash", @@ -329,7 +386,8 @@ "required": true, "schema": { "type": "string" - } + }, + "description": "This URL has to end with a / otherwise the device will not be able to register" } ], "responses": { @@ -347,6 +405,9 @@ }, "delete": { "operationId": "remove-device", + "tags": [ + "notifications" + ], "responses": { "200": { "description": "", @@ -361,7 +422,7 @@ } } }, - "/api/v2/admin_notifications/{userId}": { + "/ocs/v1.php/apps/notifications/api/v2/admin_notifications/{userId}": { "parameters": [ { "name": "userId", @@ -374,6 +435,9 @@ ], "post": { "operationId": "send-admin-notification", + "tags": [ + "notifications" + ], "parameters": [ { "name": "shortMessage", diff --git a/specs/provisioning_api.json b/specs/provisioning_api.json index c64169f8..f642efd7 100644 --- a/specs/provisioning_api.json +++ b/specs/provisioning_api.json @@ -1,16 +1,17 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "Provisioning API", "version": "1.14.0", "description": "This application enables a set of APIs that external systems can use to manage users, groups and apps.", "license": { - "name": "agpl" + "name": "agpl", + "identifier": " AGPL-3.0" } }, "servers": [ { - "url": "https://{hostname}:{port}/ocs/v1.php/cloud", + "url": "https://{hostname}:{port}", "variables": { "hostname": { "default": "localhost" @@ -26,17 +27,32 @@ "basic_auth": [] } ], + "tags": [ + { + "name": "provisioning_api" + } + ], "components": { - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - }, "schemas": { "OCSMeta": { - "deprecated": true, - "description": "Stub" + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } }, "ProvisioningApiUser": { "type": "object", @@ -57,6 +73,9 @@ "ProvisioningApiUserDetails": { "type": "object", "properties": { + "enabled": { + "type": "boolean" + }, "storageLocation": { "type": "string" }, @@ -207,12 +226,21 @@ } } } + }, + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + } } }, "paths": { - "/user": { + "/ocs/v1.php/cloud/user": { "get": { "operationId": "get-current-user", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -227,7 +255,7 @@ } } }, - "/users/{userId}": { + "/ocs/v1.php/cloud/users/{userId}": { "parameters": [ { "name": "userId", @@ -240,6 +268,9 @@ ], "get": { "operationId": "get-user", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", diff --git a/specs/templates/core.json b/specs/templates/core.json index b0e90aec..b5a68522 100644 --- a/specs/templates/core.json +++ b/specs/templates/core.json @@ -1,43 +1,26 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "Core", "version": "24.0.5", "description": "Core functionality of Nextcloud", "license": { - "name": "agpl" + "name": "agpl", + "identifier": " AGPL-3.0" } }, - "servers": [ + "tags": [ { - "url": "https://{hostname}:{port}", - "variables": { - "hostname": { - "default": "localhost" - }, - "port": { - "default": "8080" - } - } - } - ], - "security": [ - { - "basic_auth": [] + "name": "core" } ], - "components": { - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - } - }, "paths": { "/core/lostpassword/email": { "post": { "operationId": "lost-email-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "user", @@ -83,6 +66,9 @@ ], "get": { "operationId": "lost-resetform-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -118,6 +104,9 @@ ], "post": { "operationId": "lost-setpassword-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "password", @@ -132,7 +121,7 @@ "in": "query", "required": true, "schema": { - "type": "boolean" + "type": "integer" } } ], @@ -163,6 +152,9 @@ ], "get": { "operationId": "profilepage-index-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -180,6 +172,9 @@ "/core/displaynames": { "post": { "operationId": "user-getdisplaynames-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "users", @@ -225,6 +220,9 @@ ], "get": { "operationId": "avatar-getavatar-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -242,6 +240,9 @@ "/core/avatar": { "post": { "operationId": "avatar-postavatar-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "path", @@ -267,6 +268,9 @@ }, "delete": { "operationId": "avatar-deleteavatar-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -284,6 +288,9 @@ "/core/avatar/cropped": { "post": { "operationId": "avatar-postcroppedavatar-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "crop", @@ -311,6 +318,9 @@ "/core/avatar/tmp": { "get": { "operationId": "avatar-gettmpavatar-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -348,6 +358,9 @@ ], "get": { "operationId": "guestavatar-getavatar-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -365,6 +378,9 @@ "/core/csrftoken": { "get": { "operationId": "csrftoken-index-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -382,6 +398,9 @@ "/core/login": { "get": { "operationId": "login-showloginform-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "user", @@ -415,6 +434,9 @@ }, "post": { "operationId": "login-trylogin-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "user", @@ -476,6 +498,9 @@ "/core/login/confirm": { "post": { "operationId": "login-confirmpassword-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "password", @@ -503,6 +528,9 @@ "/core/logout": { "get": { "operationId": "login-logout-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -520,6 +548,9 @@ "/core/login/flow": { "get": { "operationId": "clientflowlogin-showauthpickerpage-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "clientIdentifier", @@ -564,6 +595,9 @@ }, "post": { "operationId": "clientflowlogin-generateapppassword-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "stateToken", @@ -600,6 +634,9 @@ "/core/login/flow/grant": { "get": { "operationId": "clientflowlogin-grantpage-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "stateToken", @@ -646,6 +683,9 @@ "/core/login/flow/apptoken": { "post": { "operationId": "clientflowlogin-apptokenredirect-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "stateToken", @@ -689,6 +729,9 @@ "/core/login/v2/poll": { "post": { "operationId": "clientflowloginv2-poll-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "token", @@ -716,6 +759,9 @@ "/core/login/v2/flow": { "get": { "operationId": "clientflowloginv2-showauthpickerpage-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "user", @@ -754,6 +800,9 @@ ], "get": { "operationId": "clientflowloginv2-landing-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "user", @@ -782,6 +831,9 @@ "/core/login/v2/grant": { "get": { "operationId": "clientflowloginv2-grantpage-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "stateToken", @@ -807,6 +859,9 @@ }, "post": { "operationId": "clientflowloginv2-generateapppassword-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "stateToken", @@ -834,6 +889,9 @@ "/core/login/v2": { "post": { "operationId": "clientflowloginv2-init-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -851,6 +909,9 @@ "/core/login/v2/apptoken": { "post": { "operationId": "clientflowloginv2-apptokenredirect-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "stateToken", @@ -894,6 +955,9 @@ "/core/login/selectchallenge": { "get": { "operationId": "twofactorchallenge-selectchallenge-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "redirect_url", @@ -931,6 +995,9 @@ ], "get": { "operationId": "twofactorchallenge-showchallenge-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "redirect_url", @@ -956,6 +1023,9 @@ }, "post": { "operationId": "twofactorchallenge-solvechallenge-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "challenge", @@ -991,6 +1061,9 @@ "/core/login/setupchallenge": { "get": { "operationId": "twofactorchallenge-setupproviders-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1018,6 +1091,9 @@ ], "get": { "operationId": "twofactorchallenge-setupprovider-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1033,6 +1109,9 @@ }, "post": { "operationId": "twofactorchallenge-confirmprovidersetup-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1050,6 +1129,9 @@ "/core/core/js/oc.js": { "get": { "operationId": "ocjs-getconfig-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1067,6 +1149,9 @@ "/core/core/preview": { "get": { "operationId": "preview-getpreviewbyfileid-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "fileId", @@ -1100,8 +1185,8 @@ "in": "query", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "integer", + "default": 0 } }, { @@ -1109,8 +1194,8 @@ "in": "query", "required": false, "schema": { - "type": "boolean", - "default": true + "type": "integer", + "default": 0 } }, { @@ -1140,6 +1225,9 @@ "/core/core/preview.png": { "get": { "operationId": "preview-getpreview-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "file", @@ -1173,8 +1261,8 @@ "in": "query", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "integer", + "default": 0 } }, { @@ -1182,8 +1270,8 @@ "in": "query", "required": false, "schema": { - "type": "boolean", - "default": true + "type": "integer", + "default": 0 } }, { @@ -1213,6 +1301,9 @@ "/core/core/apps/recommended": { "get": { "operationId": "recommendedapps-index-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1248,6 +1339,9 @@ ], "get": { "operationId": "svg-getsvgfromcore-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "color", @@ -1294,6 +1388,9 @@ ], "get": { "operationId": "svg-getsvgfromapp-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "color", @@ -1342,6 +1439,9 @@ ], "get": { "operationId": "css-getcss-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1379,6 +1479,9 @@ ], "get": { "operationId": "js-getjs-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1396,6 +1499,9 @@ "/core/contactsmenu/contacts": { "post": { "operationId": "contactsmenu-index-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "filter", @@ -1423,6 +1529,9 @@ "/core/contactsmenu/findOne": { "post": { "operationId": "contactsmenu-findone-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "shareType", @@ -1458,6 +1567,9 @@ "/core/204": { "get": { "operationId": "walledgarden-get-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1475,6 +1587,9 @@ "/core/core/search": { "get": { "operationId": "search-search-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "query", @@ -1528,6 +1643,9 @@ "/core/core/wipe/check": { "post": { "operationId": "wipe-checkwipe-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "token", @@ -1555,6 +1673,9 @@ "/core/core/wipe/success": { "post": { "operationId": "wipe-wipedone-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "token", @@ -1582,6 +1703,9 @@ "/core/login/webauthn/start": { "post": { "operationId": "webauthn-startauthentication-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "loginName", @@ -1609,6 +1733,9 @@ "/core/login/webauthn/finish": { "post": { "operationId": "webauthn-finishauthentication-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "data", @@ -1646,6 +1773,9 @@ ], "get": { "operationId": "wellknown-handle-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1663,6 +1793,9 @@ "/ocs/v1.php/core/capabilities": { "get": { "operationId": "ocs-getcapabilities-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1680,6 +1813,9 @@ "/ocs/v1.php/core/config": { "get": { "operationId": "ocs-getconfig-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1697,6 +1833,9 @@ "/ocs/v1.php/core/check": { "post": { "operationId": "ocs-personcheck-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "login", @@ -1744,6 +1883,9 @@ ], "get": { "operationId": "ocs-getidentityproof-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1761,14 +1903,17 @@ "/ocs/v1.php/core/navigation/apps": { "get": { "operationId": "navigation-getappsnavigation-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "absolute", "in": "query", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "integer", + "default": 0 } } ], @@ -1789,14 +1934,17 @@ "/ocs/v1.php/core/navigation/settings": { "get": { "operationId": "navigation-getsettingsnavigation-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "absolute", "in": "query", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "integer", + "default": 0 } } ], @@ -1817,6 +1965,9 @@ "/ocs/v1.php/core/autocomplete/get": { "get": { "operationId": "autocomplete-get-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "search", @@ -1886,6 +2037,9 @@ "/ocs/v1.php/core/whatsnew": { "get": { "operationId": "whatsnew-get-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1901,6 +2055,9 @@ }, "post": { "operationId": "whatsnew-dismiss-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "version", @@ -1928,6 +2085,9 @@ "/ocs/v1.php/core/getapppassword": { "get": { "operationId": "apppassword-getapppassword-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1945,6 +2105,9 @@ "/ocs/v1.php/core/apppassword/rotate": { "post": { "operationId": "apppassword-rotateapppassword-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1962,6 +2125,9 @@ "/ocs/v1.php/core/apppassword": { "delete": { "operationId": "apppassword-deleteapppassword-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -1989,6 +2155,9 @@ ], "get": { "operationId": "hovercard-getuser-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -2016,6 +2185,9 @@ ], "get": { "operationId": "collaborationresources-searchcollections-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -2043,6 +2215,9 @@ ], "get": { "operationId": "collaborationresources-listcollection-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -2058,6 +2233,9 @@ }, "put": { "operationId": "collaborationresources-renamecollection-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "collectionName", @@ -2083,6 +2261,9 @@ }, "post": { "operationId": "collaborationresources-addresource-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "resourceType", @@ -2116,6 +2297,9 @@ }, "delete": { "operationId": "collaborationresources-removeresource-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "resourceType", @@ -2169,6 +2353,9 @@ ], "get": { "operationId": "collaborationresources-getcollectionsbyresource-TODO", + "tags": [ + "core" + ], "responses": { "200": { "description": "", @@ -2204,6 +2391,9 @@ ], "post": { "operationId": "collaborationresources-createcollectiononresource-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "name", @@ -2241,6 +2431,9 @@ ], "put": { "operationId": "profileapi-setvisibility-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "paramId", @@ -2276,6 +2469,9 @@ "/ocs/v1.php/core/providers": { "get": { "operationId": "unifiedsearch-getproviders-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "from", @@ -2315,6 +2511,9 @@ ], "get": { "operationId": "unifiedsearch-search-TODO", + "tags": [ + "core" + ], "parameters": [ { "name": "term", diff --git a/specs/templates/news.json b/specs/templates/news.json index 6770c4cf..5677b35a 100644 --- a/specs/templates/news.json +++ b/specs/templates/news.json @@ -1,43 +1,26 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "News", "version": "18.1.1", "description": "An RSS/Atom feed reader", "license": { - "name": "agpl" + "name": "agpl", + "identifier": " AGPL-3.0" } }, - "servers": [ + "tags": [ { - "url": "https://{hostname}:{port}/apps/news", - "variables": { - "hostname": { - "default": "localhost" - }, - "port": { - "default": "8080" - } - } - } - ], - "security": [ - { - "basic_auth": [] + "name": "news" } ], - "components": { - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - } - }, "paths": { - "/folders": { + "/apps/news/folders": { "get": { "operationId": "folder-index-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -53,6 +36,9 @@ }, "post": { "operationId": "folder-create-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "folderName", @@ -85,7 +71,7 @@ } } }, - "/folders/{folderId}": { + "/apps/news/folders/{folderId}": { "parameters": [ { "name": "folderId", @@ -98,6 +84,9 @@ ], "delete": { "operationId": "folder-delete-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -112,7 +101,7 @@ } } }, - "/folders/{folderId}/restore": { + "/apps/news/folders/{folderId}/restore": { "parameters": [ { "name": "folderId", @@ -125,6 +114,9 @@ ], "post": { "operationId": "folder-restore-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -139,7 +131,7 @@ } } }, - "/folders/{folderId}/rename": { + "/apps/news/folders/{folderId}/rename": { "parameters": [ { "name": "folderId", @@ -153,6 +145,9 @@ ], "post": { "operationId": "folder-rename-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "folderName", @@ -178,7 +173,7 @@ } } }, - "/folders/{folderId}/read": { + "/apps/news/folders/{folderId}/read": { "parameters": [ { "name": "folderId", @@ -191,6 +186,9 @@ ], "post": { "operationId": "folder-read-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "maxItemId", @@ -215,7 +213,7 @@ } } }, - "/folders/{folderId}/open": { + "/apps/news/folders/{folderId}/open": { "parameters": [ { "name": "folderId", @@ -228,13 +226,16 @@ ], "post": { "operationId": "folder-open-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "open", "in": "query", "required": true, "schema": { - "type": "boolean" + "type": "integer" } } ], @@ -252,9 +253,12 @@ } } }, - "/feeds": { + "/apps/news/feeds": { "get": { "operationId": "feed-index-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -270,6 +274,9 @@ }, "post": { "operationId": "feed-create-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "url", @@ -316,8 +323,8 @@ "in": "query", "required": false, "schema": { - "type": "boolean", - "default": true + "type": "integer", + "default": 0 } } ], @@ -335,7 +342,7 @@ } } }, - "/feeds/{feedId}": { + "/apps/news/feeds/{feedId}": { "parameters": [ { "name": "feedId", @@ -348,6 +355,9 @@ ], "delete": { "operationId": "feed-delete-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -363,13 +373,16 @@ }, "patch": { "operationId": "feed-patch-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "pinned", "in": "query", "required": false, "schema": { - "type": "boolean" + "type": "integer" } }, { @@ -377,7 +390,7 @@ "in": "query", "required": false, "schema": { - "type": "boolean" + "type": "integer" } }, { @@ -428,7 +441,7 @@ } } }, - "/feeds/{feedId}/restore": { + "/apps/news/feeds/{feedId}/restore": { "parameters": [ { "name": "feedId", @@ -441,6 +454,9 @@ ], "post": { "operationId": "feed-restore-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -455,7 +471,7 @@ } } }, - "/feeds/{feedId}/read": { + "/apps/news/feeds/{feedId}/read": { "parameters": [ { "name": "feedId", @@ -468,6 +484,9 @@ ], "post": { "operationId": "feed-read-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "highestItemId", @@ -492,7 +511,7 @@ } } }, - "/feeds/{feedId}/update": { + "/apps/news/feeds/{feedId}/update": { "parameters": [ { "name": "feedId", @@ -505,6 +524,9 @@ ], "post": { "operationId": "feed-update-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -519,9 +541,12 @@ } } }, - "/feeds/active": { + "/apps/news/feeds/active": { "get": { "operationId": "feed-active-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -536,9 +561,12 @@ } } }, - "/feeds/import/articles": { + "/apps/news/feeds/import/articles": { "post": { "operationId": "feed-import-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "json", @@ -563,9 +591,12 @@ } } }, - "/items": { + "/apps/news/items": { "get": { "operationId": "item-index-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "type", @@ -608,7 +639,7 @@ "in": "query", "required": false, "schema": { - "type": "boolean" + "type": "integer" } }, { @@ -616,7 +647,7 @@ "in": "query", "required": false, "schema": { - "type": "boolean" + "type": "integer" } }, { @@ -643,9 +674,12 @@ } } }, - "/items/new": { + "/apps/news/items/new": { "get": { "operationId": "item-new_items-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "type", @@ -687,9 +721,12 @@ } } }, - "/items/read": { + "/apps/news/items/read": { "post": { "operationId": "item-readall-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "highestItemId", @@ -714,7 +751,7 @@ } } }, - "/items/{itemId}/read": { + "/apps/news/items/{itemId}/read": { "parameters": [ { "name": "itemId", @@ -727,14 +764,17 @@ ], "post": { "operationId": "item-read-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "isRead", "in": "query", "required": false, "schema": { - "type": "boolean", - "default": true + "type": "integer", + "default": 0 } } ], @@ -752,9 +792,12 @@ } } }, - "/items/read/multiple": { + "/apps/news/items/read/multiple": { "post": { "operationId": "item-read_multiple-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "itemIds", @@ -780,7 +823,7 @@ } } }, - "/items/{feedId}/{guidHash}/star": { + "/apps/news/items/{feedId}/{guidHash}/star": { "parameters": [ { "name": "feedId", @@ -801,13 +844,16 @@ ], "post": { "operationId": "item-star-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "isStarred", "in": "query", "required": true, "schema": { - "type": "boolean" + "type": "integer" } } ], @@ -825,7 +871,7 @@ } } }, - "/items/{itemId}/share/{shareRecipientId}": { + "/apps/news/items/{itemId}/share/{shareRecipientId}": { "parameters": [ { "name": "itemId", @@ -848,6 +894,9 @@ ], "post": { "operationId": "item-share-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -862,9 +911,12 @@ } } }, - "/export/opml": { + "/apps/news/export/opml": { "get": { "operationId": "export-opml-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -879,9 +931,12 @@ } } }, - "/export/articles": { + "/apps/news/export/articles": { "get": { "operationId": "export-articles-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -896,9 +951,12 @@ } } }, - "/api": { + "/apps/news/api": { "get": { "operationId": "api-index-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -913,7 +971,7 @@ } } }, - "/api/{apiVersion}/version": { + "/apps/news/api/{apiVersion}/version": { "parameters": [ { "name": "apiVersion", @@ -926,6 +984,9 @@ ], "get": { "operationId": "utility_api-version-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -940,7 +1001,7 @@ } } }, - "/api/{apiVersion}/status": { + "/apps/news/api/{apiVersion}/status": { "parameters": [ { "name": "apiVersion", @@ -953,6 +1014,9 @@ ], "get": { "operationId": "utility_api-status-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -967,7 +1031,7 @@ } } }, - "/api/{apiVersion}/cleanup/before-update": { + "/apps/news/api/{apiVersion}/cleanup/before-update": { "parameters": [ { "name": "apiVersion", @@ -980,6 +1044,9 @@ ], "get": { "operationId": "utility_api-before_update-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -994,7 +1061,7 @@ } } }, - "/api/{apiVersion}/cleanup/after-update": { + "/apps/news/api/{apiVersion}/cleanup/after-update": { "parameters": [ { "name": "apiVersion", @@ -1007,6 +1074,9 @@ ], "get": { "operationId": "utility_api-after_update-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -1021,7 +1091,7 @@ } } }, - "/api/{apiVersion}/folders": { + "/apps/news/api/{apiVersion}/folders": { "parameters": [ { "name": "apiVersion", @@ -1034,6 +1104,9 @@ ], "get": { "operationId": "folder_api-index-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -1049,6 +1122,9 @@ }, "post": { "operationId": "folder_api-create-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "name", @@ -1073,7 +1149,7 @@ } } }, - "/api/{apiVersion}/folders/{folderId}": { + "/apps/news/api/{apiVersion}/folders/{folderId}": { "parameters": [ { "name": "apiVersion", @@ -1094,6 +1170,9 @@ ], "put": { "operationId": "folder_api-update-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "name", @@ -1119,6 +1198,9 @@ }, "delete": { "operationId": "folder_api-delete-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -1133,7 +1215,7 @@ } } }, - "/api/{apiVersion}/folders/{folderId}/read": { + "/apps/news/api/{apiVersion}/folders/{folderId}/read": { "parameters": [ { "name": "apiVersion", @@ -1155,6 +1237,9 @@ ], "post": { "operationId": "folder_api-read-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "newestItemId", @@ -1180,7 +1265,7 @@ } } }, - "/api/v1-2/folders/{folderId}/read": { + "/apps/news/api/v1-2/folders/{folderId}/read": { "parameters": [ { "name": "folderId", @@ -1194,6 +1279,9 @@ ], "put": { "operationId": "folder_api-read-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "newestItemId", @@ -1219,7 +1307,7 @@ } } }, - "/api/{apiVersion}/feeds": { + "/apps/news/api/{apiVersion}/feeds": { "parameters": [ { "name": "apiVersion", @@ -1232,6 +1320,9 @@ ], "get": { "operationId": "feed_api-index-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -1247,6 +1338,9 @@ }, "post": { "operationId": "feed_api-create-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "url", @@ -1279,7 +1373,7 @@ } } }, - "/api/{apiVersion}/feeds/{feedId}": { + "/apps/news/api/{apiVersion}/feeds/{feedId}": { "parameters": [ { "name": "apiVersion", @@ -1300,6 +1394,9 @@ ], "put": { "operationId": "feed_api-update-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "userId", @@ -1325,6 +1422,9 @@ }, "delete": { "operationId": "feed_api-delete-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -1339,7 +1439,7 @@ } } }, - "/api/{apiVersion}/feeds/all": { + "/apps/news/api/{apiVersion}/feeds/all": { "parameters": [ { "name": "apiVersion", @@ -1352,6 +1452,9 @@ ], "get": { "operationId": "feed_api-from_all_users-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -1366,7 +1469,7 @@ } } }, - "/api/{apiVersion}/feeds/{feedId}/move": { + "/apps/news/api/{apiVersion}/feeds/{feedId}/move": { "parameters": [ { "name": "apiVersion", @@ -1387,6 +1490,9 @@ ], "post": { "operationId": "feed_api-move-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "folderId", @@ -1411,7 +1517,7 @@ } } }, - "/api/v1-2/feeds/{feedId}/move": { + "/apps/news/api/v1-2/feeds/{feedId}/move": { "parameters": [ { "name": "feedId", @@ -1424,6 +1530,9 @@ ], "put": { "operationId": "feed_api-move-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "folderId", @@ -1448,7 +1557,7 @@ } } }, - "/api/{apiVersion}/feeds/{feedId}/rename": { + "/apps/news/api/{apiVersion}/feeds/{feedId}/rename": { "parameters": [ { "name": "apiVersion", @@ -1469,6 +1578,9 @@ ], "post": { "operationId": "feed_api-rename-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "feedTitle", @@ -1493,7 +1605,7 @@ } } }, - "/api/v1-2/feeds/{feedId}/rename": { + "/apps/news/api/v1-2/feeds/{feedId}/rename": { "parameters": [ { "name": "feedId", @@ -1506,6 +1618,9 @@ ], "put": { "operationId": "feed_api-rename-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "feedTitle", @@ -1530,7 +1645,7 @@ } } }, - "/api/{apiVersion}/feeds/{feedId}/read": { + "/apps/news/api/{apiVersion}/feeds/{feedId}/read": { "parameters": [ { "name": "apiVersion", @@ -1551,6 +1666,9 @@ ], "post": { "operationId": "feed_api-read-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "newestItemId", @@ -1575,7 +1693,7 @@ } } }, - "/api/v1-2/feeds/{feedId}/read": { + "/apps/news/api/v1-2/feeds/{feedId}/read": { "parameters": [ { "name": "feedId", @@ -1588,6 +1706,9 @@ ], "put": { "operationId": "feed_api-read-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "newestItemId", @@ -1612,7 +1733,7 @@ } } }, - "/api/{apiVersion}/feeds/update": { + "/apps/news/api/{apiVersion}/feeds/update": { "parameters": [ { "name": "apiVersion", @@ -1625,6 +1746,9 @@ ], "get": { "operationId": "feed_api-update-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "userId", @@ -1657,7 +1781,7 @@ } } }, - "/api/{apiVersion}/items": { + "/apps/news/api/{apiVersion}/items": { "parameters": [ { "name": "apiVersion", @@ -1670,6 +1794,9 @@ ], "get": { "operationId": "item_api-index-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "type", @@ -1694,8 +1821,8 @@ "in": "query", "required": false, "schema": { - "type": "boolean", - "default": true + "type": "integer", + "default": 0 } }, { @@ -1721,8 +1848,8 @@ "in": "query", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "integer", + "default": 0 } } ], @@ -1740,7 +1867,7 @@ } } }, - "/api/{apiVersion}/items/updated": { + "/apps/news/api/{apiVersion}/items/updated": { "parameters": [ { "name": "apiVersion", @@ -1753,6 +1880,9 @@ ], "get": { "operationId": "item_api-updated-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "type", @@ -1796,7 +1926,7 @@ } } }, - "/api/{apiVersion}/items/{itemId}/read": { + "/apps/news/api/{apiVersion}/items/{itemId}/read": { "parameters": [ { "name": "apiVersion", @@ -1817,6 +1947,9 @@ ], "post": { "operationId": "item_api-read-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -1831,7 +1964,7 @@ } } }, - "/api/v1-2/items/{itemId}/read": { + "/apps/news/api/v1-2/items/{itemId}/read": { "parameters": [ { "name": "itemId", @@ -1844,6 +1977,9 @@ ], "put": { "operationId": "item_api-read-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -1858,7 +1994,7 @@ } } }, - "/api/{apiVersion}/items/{itemId}/unread": { + "/apps/news/api/{apiVersion}/items/{itemId}/unread": { "parameters": [ { "name": "apiVersion", @@ -1879,6 +2015,9 @@ ], "post": { "operationId": "item_api-unread-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -1893,7 +2032,7 @@ } } }, - "/api/v1-2/items/{itemId}/unread": { + "/apps/news/api/v1-2/items/{itemId}/unread": { "parameters": [ { "name": "itemId", @@ -1906,6 +2045,9 @@ ], "put": { "operationId": "item_api-unread-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -1920,7 +2062,7 @@ } } }, - "/api/{apiVersion}/items/read": { + "/apps/news/api/{apiVersion}/items/read": { "parameters": [ { "name": "apiVersion", @@ -1933,6 +2075,9 @@ ], "post": { "operationId": "item_api-read_all-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "newestItemId", @@ -1957,9 +2102,12 @@ } } }, - "/api/v1-2/items/read": { + "/apps/news/api/v1-2/items/read": { "put": { "operationId": "item_api-read_all-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "newestItemId", @@ -1984,7 +2132,7 @@ } } }, - "/api/{apiVersion}/items/read/multiple": { + "/apps/news/api/{apiVersion}/items/read/multiple": { "parameters": [ { "name": "apiVersion", @@ -1997,6 +2145,9 @@ ], "post": { "operationId": "item_api-read_multiple_by_ids-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "itemIds", @@ -2022,9 +2173,12 @@ } } }, - "/api/v1-2/items/read/multiple": { + "/apps/news/api/v1-2/items/read/multiple": { "put": { "operationId": "item_api-read_multiple-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "items", @@ -2050,7 +2204,7 @@ } } }, - "/api/{apiVersion}/items/unread/multiple": { + "/apps/news/api/{apiVersion}/items/unread/multiple": { "parameters": [ { "name": "apiVersion", @@ -2063,6 +2217,9 @@ ], "post": { "operationId": "item_api-unread_multiple_by_ids-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "itemIds", @@ -2088,9 +2245,12 @@ } } }, - "/api/v1-2/items/unread/multiple": { + "/apps/news/api/v1-2/items/unread/multiple": { "put": { "operationId": "item_api-unread_multiple-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "items", @@ -2116,7 +2276,7 @@ } } }, - "/api/{apiVersion}/items/{itemId}/star": { + "/apps/news/api/{apiVersion}/items/{itemId}/star": { "parameters": [ { "name": "apiVersion", @@ -2137,6 +2297,9 @@ ], "post": { "operationId": "item_api-star_by_item_id-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -2151,7 +2314,7 @@ } } }, - "/api/v1-2/items/{feedId}/{guidHash}/star": { + "/apps/news/api/v1-2/items/{feedId}/{guidHash}/star": { "parameters": [ { "name": "feedId", @@ -2172,6 +2335,9 @@ ], "put": { "operationId": "item_api-star-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -2186,7 +2352,7 @@ } } }, - "/api/{apiVersion}/items/{itemId}/unstar": { + "/apps/news/api/{apiVersion}/items/{itemId}/unstar": { "parameters": [ { "name": "apiVersion", @@ -2207,6 +2373,9 @@ ], "post": { "operationId": "item_api-unstar_by_item_id-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -2221,7 +2390,7 @@ } } }, - "/api/v1-2/items/{feedId}/{guidHash}/unstar": { + "/apps/news/api/v1-2/items/{feedId}/{guidHash}/unstar": { "parameters": [ { "name": "feedId", @@ -2242,6 +2411,9 @@ ], "put": { "operationId": "item_api-unstar-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -2256,7 +2428,7 @@ } } }, - "/api/{apiVersion}/items/star/multiple": { + "/apps/news/api/{apiVersion}/items/star/multiple": { "parameters": [ { "name": "apiVersion", @@ -2269,6 +2441,9 @@ ], "post": { "operationId": "item_api-star_multiple_by_item_ids-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "itemIds", @@ -2293,9 +2468,12 @@ } } }, - "/api/v1-2/items/star/multiple": { + "/apps/news/api/v1-2/items/star/multiple": { "put": { "operationId": "item_api-star_multiple-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "items", @@ -2321,7 +2499,7 @@ } } }, - "/api/{apiVersion}/items/unstar/multiple": { + "/apps/news/api/{apiVersion}/items/unstar/multiple": { "parameters": [ { "name": "apiVersion", @@ -2334,6 +2512,9 @@ ], "post": { "operationId": "item_api-unstar_multiple_by_item_ids-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "itemIds", @@ -2358,9 +2539,12 @@ } } }, - "/api/v1-2/items/unstar/multiple": { + "/apps/news/api/v1-2/items/unstar/multiple": { "put": { "operationId": "item_api-unstar_multiple-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "items", @@ -2386,9 +2570,12 @@ } } }, - "/api/v2/folders": { + "/apps/news/api/v2/folders": { "post": { "operationId": "folder_api_v2-create-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "name", @@ -2413,7 +2600,7 @@ } } }, - "/api/v2/folders/{folderId}": { + "/apps/news/api/v2/folders/{folderId}": { "parameters": [ { "name": "folderId", @@ -2426,6 +2613,9 @@ ], "delete": { "operationId": "folder_api_v2-delete-TODO", + "tags": [ + "news" + ], "responses": { "200": { "description": "", @@ -2441,6 +2631,9 @@ }, "patch": { "operationId": "folder_api_v2-update-TODO", + "tags": [ + "news" + ], "parameters": [ { "name": "name", diff --git a/specs/templates/notes.json b/specs/templates/notes.json index 723b432f..ea7059d9 100644 --- a/specs/templates/notes.json +++ b/specs/templates/notes.json @@ -1,43 +1,26 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "Notes", "version": "4.5.1", "description": "Distraction-free notes and writing", "license": { - "name": "agpl" + "name": "agpl", + "identifier": " AGPL-3.0" } }, - "servers": [ + "tags": [ { - "url": "https://{hostname}:{port}/apps/notes", - "variables": { - "hostname": { - "default": "localhost" - }, - "port": { - "default": "8080" - } - } + "name": "notes" } ], - "security": [ - { - "basic_auth": [] - } - ], - "components": { - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - } - }, "paths": { - "/notes": { + "/apps/notes/notes": { "get": { "operationId": "notes-index-TODO", + "tags": [ + "notes" + ], "parameters": [ { "name": "pruneBefore", @@ -64,6 +47,9 @@ }, "post": { "operationId": "notes-create-TODO", + "tags": [ + "notes" + ], "parameters": [ { "name": "category", @@ -88,9 +74,12 @@ } } }, - "/notes/dashboard": { + "/apps/notes/notes/dashboard": { "get": { "operationId": "notes-dashboard-TODO", + "tags": [ + "notes" + ], "responses": { "200": { "description": "", @@ -105,7 +94,7 @@ } } }, - "/notes/{id}": { + "/apps/notes/notes/{id}": { "parameters": [ { "name": "id", @@ -118,6 +107,9 @@ ], "get": { "operationId": "notes-get-TODO", + "tags": [ + "notes" + ], "responses": { "200": { "description": "", @@ -133,6 +125,9 @@ }, "put": { "operationId": "notes-update-TODO", + "tags": [ + "notes" + ], "parameters": [ { "name": "content", @@ -158,6 +153,9 @@ }, "delete": { "operationId": "notes-destroy-TODO", + "tags": [ + "notes" + ], "responses": { "200": { "description": "", @@ -172,9 +170,12 @@ } } }, - "/notes/undo": { + "/apps/notes/notes/undo": { "post": { "operationId": "notes-undo-TODO", + "tags": [ + "notes" + ], "parameters": [ { "name": "id", @@ -221,7 +222,7 @@ "in": "query", "required": true, "schema": { - "type": "boolean" + "type": "integer" } } ], @@ -239,7 +240,7 @@ } } }, - "/notes/{id}/autotitle": { + "/apps/notes/notes/{id}/autotitle": { "parameters": [ { "name": "id", @@ -252,6 +253,9 @@ ], "put": { "operationId": "notes-autotitle-TODO", + "tags": [ + "notes" + ], "responses": { "200": { "description": "", @@ -266,7 +270,7 @@ } } }, - "/notes/{id}/{property}": { + "/apps/notes/notes/{id}/{property}": { "parameters": [ { "name": "id", @@ -287,6 +291,9 @@ ], "put": { "operationId": "notes-updateproperty-TODO", + "tags": [ + "notes" + ], "parameters": [ { "name": "modified", @@ -317,7 +324,7 @@ "in": "query", "required": false, "schema": { - "type": "boolean" + "type": "integer" } } ], @@ -335,7 +342,7 @@ } } }, - "/notes/{noteid}/attachment": { + "/apps/notes/notes/{noteid}/attachment": { "parameters": [ { "name": "noteid", @@ -348,6 +355,9 @@ ], "get": { "operationId": "notes-getattachment-TODO", + "tags": [ + "notes" + ], "parameters": [ { "name": "path", @@ -373,6 +383,9 @@ }, "post": { "operationId": "notes-uploadfile-TODO", + "tags": [ + "notes" + ], "responses": { "200": { "description": "", @@ -387,9 +400,12 @@ } } }, - "/settings": { + "/apps/notes/settings": { "get": { "operationId": "settings-get-TODO", + "tags": [ + "notes" + ], "responses": { "200": { "description": "", @@ -405,6 +421,9 @@ }, "put": { "operationId": "settings-set-TODO", + "tags": [ + "notes" + ], "responses": { "200": { "description": "", @@ -419,7 +438,7 @@ } } }, - "/api/{apiVersion}/notes": { + "/apps/notes/api/{apiVersion}/notes": { "parameters": [ { "name": "apiVersion", @@ -432,6 +451,9 @@ ], "get": { "operationId": "notes_api-index-TODO", + "tags": [ + "notes" + ], "parameters": [ { "name": "category", @@ -492,6 +514,9 @@ }, "post": { "operationId": "notes_api-create-TODO", + "tags": [ + "notes" + ], "parameters": [ { "name": "category", @@ -534,8 +559,8 @@ "in": "query", "required": false, "schema": { - "type": "boolean", - "default": false + "type": "integer", + "default": 0 } } ], @@ -553,7 +578,7 @@ } } }, - "/api/{apiVersion}/notes/{id}": { + "/apps/notes/api/{apiVersion}/notes/{id}": { "parameters": [ { "name": "apiVersion", @@ -574,6 +599,9 @@ ], "get": { "operationId": "notes_api-get-TODO", + "tags": [ + "notes" + ], "parameters": [ { "name": "exclude", @@ -600,6 +628,9 @@ }, "put": { "operationId": "notes_api-update-TODO", + "tags": [ + "notes" + ], "parameters": [ { "name": "content", @@ -638,7 +669,7 @@ "in": "query", "required": false, "schema": { - "type": "boolean" + "type": "integer" } } ], @@ -657,6 +688,9 @@ }, "delete": { "operationId": "notes_api-destroy-TODO", + "tags": [ + "notes" + ], "responses": { "200": { "description": "", @@ -671,7 +705,7 @@ } } }, - "/api/{apiVersion}/settings": { + "/apps/notes/api/{apiVersion}/settings": { "parameters": [ { "name": "apiVersion", @@ -684,6 +718,9 @@ ], "get": { "operationId": "notes_api-getsettings-TODO", + "tags": [ + "notes" + ], "responses": { "200": { "description": "", @@ -699,6 +736,9 @@ }, "put": { "operationId": "notes_api-setsettings-TODO", + "tags": [ + "notes" + ], "responses": { "200": { "description": "", @@ -713,7 +753,7 @@ } } }, - "/api/{catchAll}": { + "/apps/notes/api/{catchAll}": { "parameters": [ { "name": "catchAll", @@ -726,6 +766,9 @@ ], "get": { "operationId": "notes_api-fail-TODO", + "tags": [ + "notes" + ], "responses": { "200": { "description": "", diff --git a/specs/templates/notifications.json b/specs/templates/notifications.json index b78525c5..909c9bcc 100644 --- a/specs/templates/notifications.json +++ b/specs/templates/notifications.json @@ -1,41 +1,21 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "Notifications", "version": "2.12.1", "description": "This app provides a backend and frontend for the notification API available in Nextcloud.", "license": { - "name": "agpl" + "name": "agpl", + "identifier": " AGPL-3.0" } }, - "servers": [ + "tags": [ { - "url": "https://{hostname}:{port}/ocs/v1.php/apps/notifications", - "variables": { - "hostname": { - "default": "localhost" - }, - "port": { - "default": "8080" - } - } + "name": "notifications" } ], - "security": [ - { - "basic_auth": [] - } - ], - "components": { - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - } - }, "paths": { - "/api/{apiVersion}/notifications": { + "/ocs/v1.php/apps/notifications/api/{apiVersion}/notifications": { "parameters": [ { "name": "apiVersion", @@ -48,6 +28,9 @@ ], "get": { "operationId": "endpoint-listnotifications-TODO", + "tags": [ + "notifications" + ], "responses": { "200": { "description": "", @@ -63,6 +46,9 @@ }, "delete": { "operationId": "endpoint-deleteallnotifications-TODO", + "tags": [ + "notifications" + ], "responses": { "200": { "description": "", @@ -77,7 +63,7 @@ } } }, - "/api/{apiVersion}/notifications/{id}": { + "/ocs/v1.php/apps/notifications/api/{apiVersion}/notifications/{id}": { "parameters": [ { "name": "apiVersion", @@ -98,6 +84,9 @@ ], "get": { "operationId": "endpoint-getnotification-TODO", + "tags": [ + "notifications" + ], "responses": { "200": { "description": "", @@ -113,6 +102,9 @@ }, "delete": { "operationId": "endpoint-deletenotification-TODO", + "tags": [ + "notifications" + ], "responses": { "200": { "description": "", @@ -127,7 +119,7 @@ } } }, - "/api/{apiVersion}/push": { + "/ocs/v1.php/apps/notifications/api/{apiVersion}/push": { "parameters": [ { "name": "apiVersion", @@ -140,6 +132,9 @@ ], "post": { "operationId": "push-registerdevice-TODO", + "tags": [ + "notifications" + ], "parameters": [ { "name": "pushTokenHash", @@ -181,6 +176,9 @@ }, "delete": { "operationId": "push-removedevice-TODO", + "tags": [ + "notifications" + ], "responses": { "200": { "description": "", @@ -195,7 +193,7 @@ } } }, - "/api/{apiVersion}/admin_notifications/{userId}": { + "/ocs/v1.php/apps/notifications/api/{apiVersion}/admin_notifications/{userId}": { "parameters": [ { "name": "apiVersion", @@ -216,6 +214,9 @@ ], "post": { "operationId": "api-generatenotification-TODO", + "tags": [ + "notifications" + ], "parameters": [ { "name": "shortMessage", @@ -249,7 +250,7 @@ } } }, - "/api/{apiVersion}/settings": { + "/ocs/v1.php/apps/notifications/api/{apiVersion}/settings": { "parameters": [ { "name": "apiVersion", @@ -262,6 +263,9 @@ ], "post": { "operationId": "settings-personal-TODO", + "tags": [ + "notifications" + ], "parameters": [ { "name": "batchSetting", diff --git a/specs/templates/provisioning_api.json b/specs/templates/provisioning_api.json index 9a341631..45f494f3 100644 --- a/specs/templates/provisioning_api.json +++ b/specs/templates/provisioning_api.json @@ -1,43 +1,26 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "Provisioning API", "version": "1.14.0", "description": "This application enables a set of APIs that external systems can use to manage users, groups and apps.", "license": { - "name": "agpl" + "name": "agpl", + "identifier": " AGPL-3.0" } }, - "servers": [ + "tags": [ { - "url": "https://{hostname}:{port}", - "variables": { - "hostname": { - "default": "localhost" - }, - "port": { - "default": "8080" - } - } + "name": "provisioning_api" } ], - "security": [ - { - "basic_auth": [] - } - ], - "components": { - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - } - }, "paths": { "/ocs/v1.php/apps/provisioning_api/apps": { "get": { "operationId": "apps-getapps-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "filter", @@ -75,6 +58,9 @@ ], "get": { "operationId": "apps-getappinfo-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -90,6 +76,9 @@ }, "post": { "operationId": "apps-enable-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -105,6 +94,9 @@ }, "delete": { "operationId": "apps-disable-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -122,6 +114,9 @@ "/ocs/v1.php/apps/provisioning_api/groups": { "get": { "operationId": "groups-getgroups-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "search", @@ -165,6 +160,9 @@ }, "post": { "operationId": "groups-addgroup-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "groupid", @@ -201,6 +199,9 @@ "/ocs/v1.php/apps/provisioning_api/groups/details": { "get": { "operationId": "groups-getgroupsdetails-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "search", @@ -256,6 +257,9 @@ ], "get": { "operationId": "groups-getgroupusers-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -283,6 +287,9 @@ ], "get": { "operationId": "groups-getgroupusersdetails-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "search", @@ -338,6 +345,9 @@ ], "get": { "operationId": "groups-getsubadminsofgroup-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -365,6 +375,9 @@ ], "get": { "operationId": "groups-getgroup-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -380,6 +393,9 @@ }, "put": { "operationId": "groups-updategroup-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "key", @@ -413,6 +429,9 @@ }, "delete": { "operationId": "groups-deletegroup-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -430,6 +449,9 @@ "/ocs/v1.php/apps/provisioning_api/users": { "get": { "operationId": "users-getusers-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "search", @@ -473,6 +495,9 @@ }, "post": { "operationId": "users-adduser-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "userid", @@ -561,6 +586,9 @@ "/ocs/v1.php/apps/provisioning_api/users/details": { "get": { "operationId": "users-getusersdetails-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "search", @@ -606,6 +634,9 @@ "/ocs/v1.php/apps/provisioning_api/users/search/by-phone": { "post": { "operationId": "users-searchbyphonenumbers-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "location", @@ -651,6 +682,9 @@ ], "get": { "operationId": "users-getuser-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -666,6 +700,9 @@ }, "put": { "operationId": "users-edituser-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "key", @@ -699,6 +736,9 @@ }, "delete": { "operationId": "users-deleteuser-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -716,6 +756,9 @@ "/ocs/v1.php/apps/provisioning_api/user": { "get": { "operationId": "users-getcurrentuser-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -733,6 +776,9 @@ "/ocs/v1.php/apps/provisioning_api/user/fields": { "get": { "operationId": "users-geteditablefields-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -760,6 +806,9 @@ ], "get": { "operationId": "users-geteditablefieldsforuser-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -795,6 +844,9 @@ ], "put": { "operationId": "users-editusermultivalue-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "key", @@ -840,6 +892,9 @@ ], "post": { "operationId": "users-wipeuserdevices-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -867,6 +922,9 @@ ], "put": { "operationId": "users-enableuser-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -894,6 +952,9 @@ ], "put": { "operationId": "users-disableuser-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -921,6 +982,9 @@ ], "get": { "operationId": "users-getusersgroups-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -936,6 +1000,9 @@ }, "post": { "operationId": "users-addtogroup-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "groupid", @@ -962,6 +1029,9 @@ }, "delete": { "operationId": "users-removefromgroup-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "groupid", @@ -999,6 +1069,9 @@ ], "get": { "operationId": "users-getusersubadmingroups-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -1014,6 +1087,9 @@ }, "post": { "operationId": "users-addsubadmin-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "groupid", @@ -1039,6 +1115,9 @@ }, "delete": { "operationId": "users-removesubadmin-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "groupid", @@ -1076,6 +1155,9 @@ ], "post": { "operationId": "users-resendwelcomemessage-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -1093,6 +1175,9 @@ "/ocs/v1.php/apps/provisioning_api/api/v1/config/apps": { "get": { "operationId": "appconfig-getapps-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -1120,6 +1205,9 @@ ], "get": { "operationId": "appconfig-getkeys-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -1155,6 +1243,9 @@ ], "get": { "operationId": "appconfig-getvalue-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "defaultValue", @@ -1181,6 +1272,9 @@ }, "post": { "operationId": "appconfig-setvalue-TODO", + "tags": [ + "provisioning_api" + ], "parameters": [ { "name": "value", @@ -1206,6 +1300,9 @@ }, "delete": { "operationId": "appconfig-deletekey-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -1249,6 +1346,9 @@ ], "get": { "operationId": "verification-showverifymail-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", @@ -1264,6 +1364,9 @@ }, "post": { "operationId": "verification-verifymail-TODO", + "tags": [ + "provisioning_api" + ], "responses": { "200": { "description": "", diff --git a/specs/templates/user_status.json b/specs/templates/user_status.json index 31e6e968..468c5e40 100644 --- a/specs/templates/user_status.json +++ b/specs/templates/user_status.json @@ -1,43 +1,26 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "User status", "version": "1.4.0", "description": "User status", "license": { - "name": "agpl" + "name": "agpl", + "identifier": " AGPL-3.0" } }, - "servers": [ + "tags": [ { - "url": "https://{hostname}:{port}", - "variables": { - "hostname": { - "default": "localhost" - }, - "port": { - "default": "8080" - } - } - } - ], - "security": [ - { - "basic_auth": [] + "name": "user_status" } ], - "components": { - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - } - }, "paths": { "/ocs/v1.php/apps/user_status/api/v1/statuses": { "get": { "operationId": "statuses-findall-TODO", + "tags": [ + "user_status" + ], "parameters": [ { "name": "limit", @@ -83,6 +66,9 @@ ], "get": { "operationId": "statuses-find-TODO", + "tags": [ + "user_status" + ], "responses": { "200": { "description": "", @@ -100,6 +86,9 @@ "/ocs/v1.php/apps/user_status/api/v1/user_status": { "get": { "operationId": "userstatus-getstatus-TODO", + "tags": [ + "user_status" + ], "responses": { "200": { "description": "", @@ -117,6 +106,9 @@ "/ocs/v1.php/apps/user_status/api/v1/user_status/status": { "put": { "operationId": "userstatus-setstatus-TODO", + "tags": [ + "user_status" + ], "parameters": [ { "name": "statusType", @@ -144,6 +136,9 @@ "/ocs/v1.php/apps/user_status/api/v1/user_status/message/predefined": { "put": { "operationId": "userstatus-setpredefinedmessage-TODO", + "tags": [ + "user_status" + ], "parameters": [ { "name": "messageId", @@ -179,6 +174,9 @@ "/ocs/v1.php/apps/user_status/api/v1/user_status/message/custom": { "put": { "operationId": "userstatus-setcustommessage-TODO", + "tags": [ + "user_status" + ], "parameters": [ { "name": "statusIcon", @@ -222,6 +220,9 @@ "/ocs/v1.php/apps/user_status/api/v1/user_status/message": { "delete": { "operationId": "userstatus-clearmessage-TODO", + "tags": [ + "user_status" + ], "responses": { "200": { "description": "", @@ -239,6 +240,9 @@ "/ocs/v1.php/apps/user_status/api/v1/predefined_statuses": { "get": { "operationId": "predefinedstatus-findall-TODO", + "tags": [ + "user_status" + ], "responses": { "200": { "description": "", @@ -256,6 +260,9 @@ "/apps/user_status/heartbeat": { "put": { "operationId": "heartbeat-heartbeat-TODO", + "tags": [ + "user_status" + ], "parameters": [ { "name": "status", diff --git a/specs/user_status.json b/specs/user_status.json index 4f86759b..2631f771 100644 --- a/specs/user_status.json +++ b/specs/user_status.json @@ -1,16 +1,17 @@ { - "openapi": "3.0.3", + "openapi": "3.1.0", "info": { "title": "User status", "version": "1.4.0", "description": "User status", "license": { - "name": "agpl" + "name": "agpl", + "identifier": " AGPL-3.0" } }, "servers": [ { - "url": "https://{hostname}:{port}/ocs/v1.php/apps/user_status", + "url": "https://{hostname}:{port}", "variables": { "hostname": { "default": "localhost" @@ -26,17 +27,32 @@ "basic_auth": [] } ], + "tags": [ + { + "name": "user_status" + } + ], "components": { - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - } - }, "schemas": { "OCSMeta": { - "deprecated": true, - "description": "Stub" + "type": "object", + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } + } }, "UserStatusPredefinedStatuses": { "type": "object", @@ -70,22 +86,49 @@ "type": "string" }, "clearAt": { - "type": "object" + "$ref": "#/components/schemas/UserStatusClearAtWrap" } } }, + "UserStatusClearAtWrap": { + "oneOf": [ + { + "$ref": "#/components/schemas/UserStatusClearAt" + }, + { + "type": "integer", + "description": "Time as unix timestamp" + } + ] + }, "UserStatusClearAt": { "type": "object", "properties": { "type": { - "type": "string" + "type": "string", + "enum": [ + "period", + "end-of" + ] }, "time": { - "type": "integer" + "oneOf": [ + { + "type": "string", + "enum": [ + "day", + "week" + ] + }, + { + "type": "integer", + "description": "Time offset in seconds" + } + ] } } }, - "UserStatusTypeEnum": { + "UserStatusType": { "type": "string", "enum": [ "online", @@ -105,7 +148,15 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "$ref": "#/components/schemas/UserStatus" + "oneOf": [ + { + "$ref": "#/components/schemas/UserStatus" + }, + { + "type": "array", + "description": "Only happens when the user has never set a status" + } + ] } } } @@ -165,10 +216,10 @@ "type": "string" }, "clearAt": { - "type": "object" + "$ref": "#/components/schemas/UserStatusClearAtWrap" }, "status": { - "$ref": "#/components/schemas/UserStatusTypeEnum" + "$ref": "#/components/schemas/UserStatusType" }, "statusIsUserDefined": { "type": "boolean" @@ -188,19 +239,28 @@ "type": "string" }, "clearAt": { - "type": "object" + "$ref": "#/components/schemas/UserStatusClearAtWrap" }, "status": { - "$ref": "#/components/schemas/UserStatusTypeEnum" + "$ref": "#/components/schemas/UserStatusType" } } } + }, + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + } } }, "paths": { - "/api/v1/statuses": { + "/ocs/v1.php/apps/user_status/api/v1/statuses": { "get": { "operationId": "find-all-statuses", + "tags": [ + "user_status" + ], "responses": { "200": { "description": "", @@ -215,7 +275,7 @@ } } }, - "/api/v1/statuses/{userId}": { + "/ocs/v1.php/apps/user_status/api/v1/statuses/{userId}": { "parameters": [ { "name": "userId", @@ -228,6 +288,9 @@ ], "get": { "operationId": "find-status", + "tags": [ + "user_status" + ], "responses": { "200": { "description": "", @@ -242,9 +305,12 @@ } } }, - "/api/v1/user_status": { + "/ocs/v1.php/apps/user_status/api/v1/user_status": { "get": { "operationId": "get-status", + "tags": [ + "user_status" + ], "responses": { "200": { "description": "", @@ -259,16 +325,19 @@ } } }, - "/api/v1/user_status/status": { + "/ocs/v1.php/apps/user_status/api/v1/user_status/status": { "put": { "operationId": "set-status", + "tags": [ + "user_status" + ], "parameters": [ { "name": "statusType", "in": "query", "required": true, "schema": { - "$ref": "#/components/schemas/UserStatusTypeEnum" + "$ref": "#/components/schemas/UserStatusType" } } ], @@ -286,9 +355,12 @@ } } }, - "/api/v1/user_status/message/predefined": { + "/ocs/v1.php/apps/user_status/api/v1/user_status/message/predefined": { "put": { "operationId": "set-predefined-message", + "tags": [ + "user_status" + ], "parameters": [ { "name": "messageId", @@ -321,9 +393,12 @@ } } }, - "/api/v1/user_status/message/custom": { + "/ocs/v1.php/apps/user_status/api/v1/user_status/message/custom": { "put": { "operationId": "set-custom-message", + "tags": [ + "user_status" + ], "parameters": [ { "name": "statusIcon", @@ -364,9 +439,12 @@ } } }, - "/api/v1/user_status/message": { + "/ocs/v1.php/apps/user_status/api/v1/user_status/message": { "delete": { "operationId": "clear-message", + "tags": [ + "user_status" + ], "responses": { "200": { "description": "" @@ -374,9 +452,12 @@ } } }, - "/api/v1/predefined_statuses": { + "/ocs/v1.php/apps/user_status/api/v1/predefined_statuses": { "get": { "operationId": "find-all-predefined-statuses", + "tags": [ + "user_status" + ], "responses": { "200": { "description": "", @@ -391,17 +472,20 @@ } } }, - "/api/v1/heartbeat": { + "/ocs/v1.php/apps/user_status/api/v1/heartbeat": { "description": "Depends on https://github.com/nextcloud/server/pull/32646", "put": { "operationId": "heartbeat", + "tags": [ + "user_status" + ], "parameters": [ { "name": "status", "in": "query", "required": true, "schema": { - "$ref": "#/components/schemas/UserStatusTypeEnum" + "$ref": "#/components/schemas/UserStatusType" } } ],