Browse Source

spec_templates,specs: Cleanup and fix

pull/61/head
jld3103 2 years ago
parent
commit
3478b92efa
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 61
      packages/spec_templates/bin/generate.dart
  2. 68
      packages/spec_templates/lib/openapi_spec.dart
  3. 32
      specs/common.json
  4. 90
      specs/core.json
  5. 131
      specs/news.json
  6. 80
      specs/notes.json
  7. 96
      specs/notifications.json
  8. 57
      specs/provisioning_api.json
  9. 275
      specs/templates/core.json
  10. 397
      specs/templates/news.json
  11. 127
      specs/templates/notes.json
  12. 64
      specs/templates/notifications.json
  13. 153
      specs/templates/provisioning_api.json
  14. 57
      specs/templates/user_status.json
  15. 144
      specs/user_status.json

61
packages/spec_templates/bin/generate.dart

@ -81,13 +81,11 @@ Future main(final List<String> 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';
}
}
final verb = route['verb'] as String? ?? 'GET';
if (name.startsWith('page#') || name.startsWith('admin#')) {
@ -218,22 +216,10 @@ Future main(final List<String> 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<Parameter>(
@ -242,7 +228,16 @@ Future main(final List<String> args) async {
in_: 'query',
description: queryParameter.description,
required: !queryParameter.nullable && queryParameter.defaultValue == null,
schema: {
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,
@ -291,6 +286,15 @@ Future main(final List<String> 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<String> 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(),
),

68
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<String, dynamic> 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) => <String, String>{'name': tag}).toList(),
'paths': paths.map((final key, final value) => MapEntry(key, value.toMap())),
};
final String version;
final Info info;
final List<String> tags;
final Map<String, Path> paths;
final List<Server>? servers;
final Components? components;
final List<Map<String, 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<String, dynamic> 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<String, dynamic> 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(
if (responses != null) ...{
'responses': responses!.map(
(final key, final value) => MapEntry(
key.toString(),
value.toMap(),
),
),
},
};
final Map<dynamic, Response> responses;
final List<Parameter>? parameters;
final String? operationID;
final List<String>? tags;
final List<Parameter>? parameters;
final Map<dynamic, Response>? responses;
}
class Response {
@ -240,34 +247,3 @@ class MediaType {
final Map<String, dynamic>? schema;
}
class Components {
Components({
this.securitySchemes,
});
Map<String, dynamic> toMap() => {
if (securitySchemes != null)
'securitySchemes': securitySchemes!.map((final key, final value) => MapEntry(key, value.toMap()))
};
final Map<String, SecurityScheme>? securitySchemes;
}
class SecurityScheme {
SecurityScheme({
required this.type,
required this.scheme,
this.description,
});
Map<String, dynamic> toMap() => {
'type': type,
'scheme': scheme,
if (description != null) 'description': description,
};
final String type;
final String scheme;
final String? description;
}

32
specs/common.json

@ -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"
}
}
}
}
}
}

90
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": []
}
],
"components": {
"securitySchemes": {
"basic_auth": {
"type": "http",
"scheme": "basic"
"tags": [
{
"name": "core"
}
},
],
"components": {
"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"
}
}
}

131
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": []
}
],
"components": {
"securitySchemes": {
"basic_auth": {
"type": "http",
"scheme": "basic"
"tags": [
{
"name": "news"
}
},
],
"components": {
"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": ""

80
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": []
}
],
"components": {
"securitySchemes": {
"basic_auth": {
"type": "http",
"scheme": "basic"
"tags": [
{
"name": "notes"
}
},
],
"components": {
"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": {

96
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": []
}
],
"components": {
"securitySchemes": {
"basic_auth": {
"type": "http",
"scheme": "basic"
"tags": [
{
"name": "notifications"
}
},
],
"components": {
"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",

57
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": []
}
],
"components": {
"securitySchemes": {
"basic_auth": {
"type": "http",
"scheme": "basic"
"tags": [
{
"name": "provisioning_api"
}
},
],
"components": {
"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": "",

275
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",

397
specs/templates/news.json

File diff suppressed because it is too large Load Diff

127
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": "",

64
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",

153
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": "",

57
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"
}
}
"name": "user_status"
}
],
"security": [
{
"basic_auth": []
}
],
"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",

144
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": []
}
],
"components": {
"securitySchemes": {
"basic_auth": {
"type": "http",
"scheme": "basic"
"tags": [
{
"name": "user_status"
}
},
],
"components": {
"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": {
"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"
}
}
],

Loading…
Cancel
Save