diff --git a/packages/spec_templates/bin/generate.dart b/packages/spec_templates/bin/generate.dart index 1d84ab5f..a7eb5447 100644 --- a/packages/spec_templates/bin/generate.dart +++ b/packages/spec_templates/bin/generate.dart @@ -125,26 +125,133 @@ Future main(final List args) async { RegExp('\\/\\*\\*((?:(?!\\/\\*\\*).)*?)\\*\\/(?:(?!\\*\\/).)*?public function $methodName\\(([^\\)]*)\\)'); final match = reg.allMatches(controllerContent).single; + final docParameters = []; + var current = ''; + for (final docLine in match + .group(1)! + .split('*') + .map((final s) { + var r = s.trim(); + while (r.contains(' ')) { + r = r.replaceAll(' ', ' '); + } + return r; + }) + .where((final s) => s.isNotEmpty) + .toList()) { + if (docLine.startsWith('@')) { + if (current != '') { + docParameters.add(current); + } + } + + if (docLine.startsWith('@return')) { + current = ''; + break; + } + + if (docLine.startsWith('@param')) { + current = docLine; + } else if (current != '') { + current += ' $docLine'; + } + } + if (current != '') { + docParameters.add(current); + } + final methodParameters = _getMethodParameters( controllerName, methodName, match.group(2)!.split(',').map((final s) => s.trim()).where((final s) => s.isNotEmpty).toList(), - match - .group(1)! - .split('*') - .map((final s) { - var r = s.trim(); - while (r.contains(' ')) { - r = r.replaceAll(' ', ' '); - } - return r; - }) - .where((final s) => s.isNotEmpty && s.startsWith('@param')) - .toList(), + docParameters, ); + final parameterNames = RegExp('{[^}]*}').allMatches(url).map((final m) { + final t = m.group(0)!; + return t.substring(1, t.length - 1); + }).toList(); + + final parameters = []; + for (final parameterName in parameterNames) { + MethodParameter? parameter; + for (final methodParameter in methodParameters) { + if (methodParameter.name == parameterName) { + parameter = methodParameter; + break; + } + } + if (parameter == null && (requirements == null || requirements[parameterName] == null)) { + throw Exception('Could not find parameter for $parameterName in $name'); + } + parameters.add( + Parameter( + name: parameterName, + in_: 'path', + required: true, + description: parameter?.description, + schema: { + 'type': parameter?.openAPIType ?? 'TODO', + if (parameter?.defaultValue != null) ...{ + 'default': parameter?.defaultValue, + }, + }, + ), + ); + } + final queryParameters = []; + for (final methodParameter in methodParameters) { + var found = false; + for (final parameter in parameters) { + if (parameter.name == methodParameter.name) { + found = true; + break; + } + } + if (!found) { + queryParameters.add(methodParameter); + } + } + + if (paths[url] == null) { + paths[url] = Path( + 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', + parameters: queryParameters.isNotEmpty + ? queryParameters + .map( + (final queryParameter) => Parameter( + name: queryParameter.name, + in_: 'query', + description: queryParameter.description, + required: !queryParameter.nullable && queryParameter.defaultValue == null, + schema: { + 'type': queryParameter.openAPIType ?? 'TODO', + if (queryParameter.defaultValue != null) ...{ + 'default': queryParameter.defaultValue, + }, + }, + ), + ) + .toList() + : null, responses: { 200: Response( description: '', @@ -159,44 +266,6 @@ Future main(final List args) async { }, ); - if (paths[url] == null) { - final parameterNames = RegExp('{[^}]*}').allMatches(url).map((final m) { - final t = m.group(0)!; - return t.substring(1, t.length - 1); - }).toList(); - - final parameters = []; - for (final parameterName in parameterNames) { - MethodParameter? parameter; - for (final methodParameter in methodParameters) { - if (methodParameter.name == parameterName) { - parameter = methodParameter; - break; - } - } - if (parameter == null && (requirements == null || requirements[parameterName] == null)) { - throw Exception('Could not find parameter for $parameterName in $name'); - } - parameters.add( - Parameter( - name: parameterName, - in_: 'path', - required: true, - description: parameter?.description, - schema: { - 'type': parameter?.openAPIType ?? 'TODO', - if (parameter?.defaultValue != null) ...{ - 'default': parameter?.defaultValue, - }, - }, - ), - ); - } - - paths[url] = Path( - parameters: parameters, - ); - } switch (verb) { case 'DELETE': paths[url]!.delete = operation; @@ -355,8 +424,8 @@ List _getMethodParameters( type = 'string'; continue; } - print( - 'WARNING: Can not determine reliable type for "$docType" for parameter "$name" of method "$methodName" in controller "$controllerName"', + throw Exception( + 'Can not determine reliable type for "$docType" for parameter "$name" of method "$methodName" in controller "$controllerName"', ); } else { type = nonNullableParts.single; diff --git a/packages/spec_templates/lib/method_parameter.dart b/packages/spec_templates/lib/method_parameter.dart index 71684851..75859975 100644 --- a/packages/spec_templates/lib/method_parameter.dart +++ b/packages/spec_templates/lib/method_parameter.dart @@ -5,32 +5,49 @@ class MethodParameter { required this.type, required this.nullable, required this.name, - required this.defaultValue, + required final String? defaultValue, required this.description, required this.controllerName, required this.methodName, }) { + if (defaultValue == 'null') { + nullable = true; + } + if (type == null && defaultValue != null && defaultValue != 'null') { + nullable = false; + if (int.tryParse(defaultValue) != null) { + type = 'int'; + } + if (defaultValue == 'true' || defaultValue == 'false') { + type = 'bool'; + } + if (defaultValue == "''" || defaultValue == '""') { + type = 'string'; + } + if (defaultValue == '[]') { + type = 'array'; + } + } if (type == null) { - if (defaultValue != null && defaultValue != 'null') { - if (int.tryParse(defaultValue!) != null) { - type = 'int'; - } - if (defaultValue == 'true' || defaultValue == 'false') { - type = 'bool'; - } - if (defaultValue == "''" || defaultValue == '""') { - type = 'string'; - } - if (defaultValue != null) { - nullable = false; - } - if (type == null) { - print( - 'WARNING: Unknown type for parameter "$name" with default value "$defaultValue" of method "$methodName" in controller "$controllerName"', - ); - } - } else { - print('WARNING: Unknown type for parameter "$name" of method "$methodName" in controller "$controllerName"'); + throw Exception( + 'Unknown type for parameter "$name" with default value "$defaultValue" of method "$methodName" in controller "$controllerName"', + ); + } + if (defaultValue != null && defaultValue != 'null') { + switch (type) { + case 'int': + this.defaultValue = int.tryParse(defaultValue); + break; + case 'bool': + this.defaultValue = defaultValue == 'true'; + break; + case 'string': + this.defaultValue = defaultValue.substring(1, defaultValue.length - 1); + break; + case 'array': + break; + default: + throw Exception('Unknown way to parse default value for type "$type"'); } } } @@ -38,7 +55,7 @@ class MethodParameter { String? type; bool nullable; final String name; - final String? defaultValue; + dynamic defaultValue; final String? description; final String controllerName; @@ -49,15 +66,18 @@ class MethodParameter { if (type == 'string') { return 'string'; } - if (type == 'int') { + if (type == 'int' || type == 'integer') { return 'integer'; } - if (type == 'bool') { + if (type == 'bool' || type == 'boolean') { return 'boolean'; } + if (type == 'array') { + return 'array'; + } - print( - 'WARNING: Could not infer OpenAPI type from type "$type" for parameter "$name" of method "$methodName" in controller "$controllerName"', + throw Exception( + 'Could not infer OpenAPI type from type "$type" for parameter "$name" of method "$methodName" in controller "$controllerName"', ); } return null; diff --git a/packages/spec_templates/lib/openapi_spec.dart b/packages/spec_templates/lib/openapi_spec.dart index d70e4ddd..0ea582db 100644 --- a/packages/spec_templates/lib/openapi_spec.dart +++ b/packages/spec_templates/lib/openapi_spec.dart @@ -184,11 +184,17 @@ class Parameter { class Operation { Operation({ required this.responses, + this.parameters, this.operationID, }); Map toMap() => { - if (operationID != null) 'operationId': operationID, + if (operationID != null) ...{ + 'operationId': operationID, + }, + if (parameters != null) ...{ + 'parameters': parameters!.map((final p) => p.toMap()).toList(), + }, 'responses': responses.map( (final key, final value) => MapEntry( key.toString(), @@ -198,6 +204,7 @@ class Operation { }; final Map responses; + final List? parameters; final String? operationID; } diff --git a/specs/templates/core.json b/specs/templates/core.json index adcba270..b0e90aec 100644 --- a/specs/templates/core.json +++ b/specs/templates/core.json @@ -38,6 +38,16 @@ "/core/lostpassword/email": { "post": { "operationId": "lost-email-TODO", + "parameters": [ + { + "name": "user", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -108,6 +118,24 @@ ], "post": { "operationId": "lost-setpassword-TODO", + "parameters": [ + { + "name": "password", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "proceed", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "", @@ -152,6 +180,16 @@ "/core/displaynames": { "post": { "operationId": "user-getdisplaynames-TODO", + "parameters": [ + { + "name": "users", + "in": "query", + "required": true, + "schema": { + "type": "array" + } + } + ], "responses": { "200": { "description": "", @@ -204,6 +242,16 @@ "/core/avatar": { "post": { "operationId": "avatar-postavatar-TODO", + "parameters": [ + { + "name": "path", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -236,6 +284,16 @@ "/core/avatar/cropped": { "post": { "operationId": "avatar-postcroppedavatar-TODO", + "parameters": [ + { + "name": "crop", + "in": "query", + "required": true, + "schema": { + "type": "array" + } + } + ], "responses": { "200": { "description": "", @@ -324,6 +382,24 @@ "/core/login": { "get": { "operationId": "login-showloginform-TODO", + "parameters": [ + { + "name": "user", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "redirect_url", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -339,6 +415,50 @@ }, "post": { "operationId": "login-trylogin-TODO", + "parameters": [ + { + "name": "user", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "password", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "redirect_url", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "timezone", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "timezone_offset", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], "responses": { "200": { "description": "", @@ -356,6 +476,16 @@ "/core/login/confirm": { "post": { "operationId": "login-confirmpassword-TODO", + "parameters": [ + { + "name": "password", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -390,6 +520,35 @@ "/core/login/flow": { "get": { "operationId": "clientflowlogin-showauthpickerpage-TODO", + "parameters": [ + { + "name": "clientIdentifier", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "user", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "direct", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + } + ], "responses": { "200": { "description": "", @@ -405,6 +564,25 @@ }, "post": { "operationId": "clientflowlogin-generateapppassword-TODO", + "parameters": [ + { + "name": "stateToken", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "clientIdentifier", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], "responses": { "200": { "description": "", @@ -422,6 +600,35 @@ "/core/login/flow/grant": { "get": { "operationId": "clientflowlogin-grantpage-TODO", + "parameters": [ + { + "name": "stateToken", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "clientIdentifier", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "direct", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + } + ], "responses": { "200": { "description": "", @@ -439,6 +646,32 @@ "/core/login/flow/apptoken": { "post": { "operationId": "clientflowlogin-apptokenredirect-TODO", + "parameters": [ + { + "name": "stateToken", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "user", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "password", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -456,6 +689,16 @@ "/core/login/v2/poll": { "post": { "operationId": "clientflowloginv2-poll-TODO", + "parameters": [ + { + "name": "token", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -473,6 +716,17 @@ "/core/login/v2/flow": { "get": { "operationId": "clientflowloginv2-showauthpickerpage-TODO", + "parameters": [ + { + "name": "user", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], "responses": { "200": { "description": "", @@ -500,6 +754,17 @@ ], "get": { "operationId": "clientflowloginv2-landing-TODO", + "parameters": [ + { + "name": "user", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], "responses": { "200": { "description": "", @@ -517,6 +782,16 @@ "/core/login/v2/grant": { "get": { "operationId": "clientflowloginv2-grantpage-TODO", + "parameters": [ + { + "name": "stateToken", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -532,6 +807,16 @@ }, "post": { "operationId": "clientflowloginv2-generateapppassword-TODO", + "parameters": [ + { + "name": "stateToken", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -566,6 +851,32 @@ "/core/login/v2/apptoken": { "post": { "operationId": "clientflowloginv2-apptokenredirect-TODO", + "parameters": [ + { + "name": "stateToken", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "user", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "password", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -583,6 +894,16 @@ "/core/login/selectchallenge": { "get": { "operationId": "twofactorchallenge-selectchallenge-TODO", + "parameters": [ + { + "name": "redirect_url", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -610,6 +931,16 @@ ], "get": { "operationId": "twofactorchallenge-showchallenge-TODO", + "parameters": [ + { + "name": "redirect_url", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -625,6 +956,24 @@ }, "post": { "operationId": "twofactorchallenge-solvechallenge-TODO", + "parameters": [ + { + "name": "challenge", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "redirect_url", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -718,6 +1067,62 @@ "/core/core/preview": { "get": { "operationId": "preview-getpreviewbyfileid-TODO", + "parameters": [ + { + "name": "fileId", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": -1 + } + }, + { + "name": "x", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 32 + } + }, + { + "name": "y", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 32 + } + }, + { + "name": "a", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "forceIcon", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "mode", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "fill" + } + } + ], "responses": { "200": { "description": "", @@ -735,6 +1140,62 @@ "/core/core/preview.png": { "get": { "operationId": "preview-getpreview-TODO", + "parameters": [ + { + "name": "file", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "x", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 32 + } + }, + { + "name": "y", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 32 + } + }, + { + "name": "a", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + }, + { + "name": "forceIcon", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "mode", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "fill" + } + } + ], "responses": { "200": { "description": "", @@ -787,6 +1248,17 @@ ], "get": { "operationId": "svg-getsvgfromcore-TODO", + "parameters": [ + { + "name": "color", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "ffffff" + } + } + ], "responses": { "200": { "description": "", @@ -822,6 +1294,17 @@ ], "get": { "operationId": "svg-getsvgfromapp-TODO", + "parameters": [ + { + "name": "color", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "ffffff" + } + } + ], "responses": { "200": { "description": "", @@ -913,6 +1396,16 @@ "/core/contactsmenu/contacts": { "post": { "operationId": "contactsmenu-index-TODO", + "parameters": [ + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -930,6 +1423,24 @@ "/core/contactsmenu/findOne": { "post": { "operationId": "contactsmenu-findone-TODO", + "parameters": [ + { + "name": "shareType", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "shareWith", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -964,6 +1475,42 @@ "/core/core/search": { "get": { "operationId": "search-search-TODO", + "parameters": [ + { + "name": "query", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "inApps", + "in": "query", + "required": true, + "schema": { + "type": "array" + } + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 1 + } + }, + { + "name": "size", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 30 + } + } + ], "responses": { "200": { "description": "", @@ -981,6 +1528,16 @@ "/core/core/wipe/check": { "post": { "operationId": "wipe-checkwipe-TODO", + "parameters": [ + { + "name": "token", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -998,6 +1555,16 @@ "/core/core/wipe/success": { "post": { "operationId": "wipe-wipedone-TODO", + "parameters": [ + { + "name": "token", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -1015,6 +1582,16 @@ "/core/login/webauthn/start": { "post": { "operationId": "webauthn-startauthentication-TODO", + "parameters": [ + { + "name": "loginName", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -1032,6 +1609,16 @@ "/core/login/webauthn/finish": { "post": { "operationId": "webauthn-finishauthentication-TODO", + "parameters": [ + { + "name": "data", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -1110,6 +1697,26 @@ "/ocs/v1.php/core/check": { "post": { "operationId": "ocs-personcheck-TODO", + "parameters": [ + { + "name": "login", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "password", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], "responses": { "200": { "description": "", @@ -1154,6 +1761,17 @@ "/ocs/v1.php/core/navigation/apps": { "get": { "operationId": "navigation-getappsnavigation-TODO", + "parameters": [ + { + "name": "absolute", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], "responses": { "200": { "description": "", @@ -1171,6 +1789,17 @@ "/ocs/v1.php/core/navigation/settings": { "get": { "operationId": "navigation-getsettingsnavigation-TODO", + "parameters": [ + { + "name": "absolute", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], "responses": { "200": { "description": "", @@ -1188,6 +1817,58 @@ "/ocs/v1.php/core/autocomplete/get": { "get": { "operationId": "autocomplete-get-TODO", + "parameters": [ + { + "name": "search", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "itemType", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "itemId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "sorter", + "in": "query", + "description": "can be piped, top prio first, e.g.: \"commenters|share-recipients\"", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "shareTypes", + "in": "query", + "required": true, + "schema": { + "type": "array" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 10 + } + } + ], "responses": { "200": { "description": "", @@ -1220,6 +1901,16 @@ }, "post": { "operationId": "whatsnew-dismiss-TODO", + "parameters": [ + { + "name": "version", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -1367,6 +2058,16 @@ }, "put": { "operationId": "collaborationresources-renamecollection-TODO", + "parameters": [ + { + "name": "collectionName", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -1382,6 +2083,24 @@ }, "post": { "operationId": "collaborationresources-addresource-TODO", + "parameters": [ + { + "name": "resourceType", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resourceId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -1397,6 +2116,24 @@ }, "delete": { "operationId": "collaborationresources-removeresource-TODO", + "parameters": [ + { + "name": "resourceType", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resourceId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -1467,6 +2204,16 @@ ], "post": { "operationId": "collaborationresources-createcollectiononresource-TODO", + "parameters": [ + { + "name": "name", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -1494,6 +2241,24 @@ ], "put": { "operationId": "profileapi-setvisibility-TODO", + "parameters": [ + { + "name": "paramId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "visibility", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -1511,6 +2276,18 @@ "/ocs/v1.php/core/providers": { "get": { "operationId": "unifiedsearch-getproviders-TODO", + "parameters": [ + { + "name": "from", + "in": "query", + "description": "the url the user is currently at", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], "responses": { "200": { "description": "", @@ -1538,6 +2315,50 @@ ], "get": { "operationId": "unifiedsearch-search-TODO", + "parameters": [ + { + "name": "term", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "sortOrder", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "cursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "from", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], "responses": { "200": { "description": "", diff --git a/specs/templates/news.json b/specs/templates/news.json index 724c7874..6770c4cf 100644 --- a/specs/templates/news.json +++ b/specs/templates/news.json @@ -53,6 +53,24 @@ }, "post": { "operationId": "folder-create-TODO", + "parameters": [ + { + "name": "folderName", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "parent", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -135,6 +153,17 @@ ], "post": { "operationId": "folder-rename-TODO", + "parameters": [ + { + "name": "folderName", + "in": "query", + "description": "The new name of the folder", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -162,6 +191,16 @@ ], "post": { "operationId": "folder-read-TODO", + "parameters": [ + { + "name": "maxItemId", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -189,6 +228,16 @@ ], "post": { "operationId": "folder-open-TODO", + "parameters": [ + { + "name": "open", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "", @@ -221,6 +270,57 @@ }, "post": { "operationId": "feed-create-TODO", + "parameters": [ + { + "name": "url", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "parentFolderId", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "title", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "user", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "password", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "fullDiscover", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], "responses": { "200": { "description": "", @@ -263,6 +363,57 @@ }, "patch": { "operationId": "feed-patch-TODO", + "parameters": [ + { + "name": "pinned", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "fullTextEnabled", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "updateMode", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "ordering", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "folderId", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": -1 + } + }, + { + "name": "title", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -317,6 +468,16 @@ ], "post": { "operationId": "feed-read-TODO", + "parameters": [ + { + "name": "highestItemId", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -378,6 +539,16 @@ "/feeds/import/articles": { "post": { "operationId": "feed-import-TODO", + "parameters": [ + { + "name": "json", + "in": "query", + "required": true, + "schema": { + "type": "array" + } + } + ], "responses": { "200": { "description": "", @@ -395,6 +566,69 @@ "/items": { "get": { "operationId": "item-index-TODO", + "parameters": [ + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 3 + } + }, + { + "name": "id", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 50 + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "showAll", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "oldestFirst", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + }, + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], "responses": { "200": { "description": "", @@ -412,6 +646,33 @@ "/items/new": { "get": { "operationId": "item-new_items-TODO", + "parameters": [ + { + "name": "type", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "lastModified", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + } + ], "responses": { "200": { "description": "", @@ -429,6 +690,16 @@ "/items/read": { "post": { "operationId": "item-readall-TODO", + "parameters": [ + { + "name": "highestItemId", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -456,6 +727,17 @@ ], "post": { "operationId": "item-read-TODO", + "parameters": [ + { + "name": "isRead", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + } + ], "responses": { "200": { "description": "", @@ -473,6 +755,17 @@ "/items/read/multiple": { "post": { "operationId": "item-read_multiple-TODO", + "parameters": [ + { + "name": "itemIds", + "in": "query", + "description": "item ids", + "required": true, + "schema": { + "type": "array" + } + } + ], "responses": { "200": { "description": "", @@ -508,6 +801,16 @@ ], "post": { "operationId": "item-star-TODO", + "parameters": [ + { + "name": "isStarred", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "", @@ -746,6 +1049,16 @@ }, "post": { "operationId": "folder_api-create-TODO", + "parameters": [ + { + "name": "name", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -781,6 +1094,16 @@ ], "put": { "operationId": "folder_api-update-TODO", + "parameters": [ + { + "name": "name", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -832,6 +1155,17 @@ ], "post": { "operationId": "folder_api-read-TODO", + "parameters": [ + { + "name": "newestItemId", + "in": "query", + "description": "The newest read item", + "required": true, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -860,6 +1194,17 @@ ], "put": { "operationId": "folder_api-read-TODO", + "parameters": [ + { + "name": "newestItemId", + "in": "query", + "description": "The newest read item", + "required": true, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -902,6 +1247,24 @@ }, "post": { "operationId": "feed_api-create-TODO", + "parameters": [ + { + "name": "url", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "folderId", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -937,6 +1300,16 @@ ], "put": { "operationId": "feed_api-update-TODO", + "parameters": [ + { + "name": "userId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -1014,6 +1387,16 @@ ], "post": { "operationId": "feed_api-move-TODO", + "parameters": [ + { + "name": "folderId", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -1041,6 +1424,16 @@ ], "put": { "operationId": "feed_api-move-TODO", + "parameters": [ + { + "name": "folderId", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -1076,6 +1469,16 @@ ], "post": { "operationId": "feed_api-rename-TODO", + "parameters": [ + { + "name": "feedTitle", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -1103,6 +1506,16 @@ ], "put": { "operationId": "feed_api-rename-TODO", + "parameters": [ + { + "name": "feedTitle", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -1138,6 +1551,16 @@ ], "post": { "operationId": "feed_api-read-TODO", + "parameters": [ + { + "name": "newestItemId", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -1165,6 +1588,16 @@ ], "put": { "operationId": "feed_api-read-TODO", + "parameters": [ + { + "name": "newestItemId", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -1192,6 +1625,24 @@ ], "get": { "operationId": "feed_api-update-TODO", + "parameters": [ + { + "name": "userId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "feedId", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -1219,6 +1670,62 @@ ], "get": { "operationId": "item_api-index-TODO", + "parameters": [ + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 3 + } + }, + { + "name": "id", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "getRead", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": true + } + }, + { + "name": "batchSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": -1 + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "oldestFirst", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], "responses": { "200": { "description": "", @@ -1246,6 +1753,35 @@ ], "get": { "operationId": "item_api-updated-TODO", + "parameters": [ + { + "name": "type", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 3 + } + }, + { + "name": "id", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "lastModified", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + } + ], "responses": { "200": { "description": "", @@ -1397,6 +1933,16 @@ ], "post": { "operationId": "item_api-read_all-TODO", + "parameters": [ + { + "name": "newestItemId", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -1414,6 +1960,16 @@ "/api/v1-2/items/read": { "put": { "operationId": "item_api-read_all-TODO", + "parameters": [ + { + "name": "newestItemId", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -1441,6 +1997,17 @@ ], "post": { "operationId": "item_api-read_multiple_by_ids-TODO", + "parameters": [ + { + "name": "itemIds", + "in": "query", + "description": "item ids", + "required": true, + "schema": { + "type": "array" + } + } + ], "responses": { "200": { "description": "", @@ -1458,6 +2025,17 @@ "/api/v1-2/items/read/multiple": { "put": { "operationId": "item_api-read_multiple-TODO", + "parameters": [ + { + "name": "items", + "in": "query", + "description": "item ids", + "required": true, + "schema": { + "type": "array" + } + } + ], "responses": { "200": { "description": "", @@ -1485,6 +2063,17 @@ ], "post": { "operationId": "item_api-unread_multiple_by_ids-TODO", + "parameters": [ + { + "name": "itemIds", + "in": "query", + "description": "item ids", + "required": true, + "schema": { + "type": "array" + } + } + ], "responses": { "200": { "description": "", @@ -1502,6 +2091,17 @@ "/api/v1-2/items/unread/multiple": { "put": { "operationId": "item_api-unread_multiple-TODO", + "parameters": [ + { + "name": "items", + "in": "query", + "description": "item ids", + "required": true, + "schema": { + "type": "array" + } + } + ], "responses": { "200": { "description": "", @@ -1669,6 +2269,16 @@ ], "post": { "operationId": "item_api-star_multiple_by_item_ids-TODO", + "parameters": [ + { + "name": "itemIds", + "in": "query", + "required": true, + "schema": { + "type": "array" + } + } + ], "responses": { "200": { "description": "", @@ -1686,6 +2296,17 @@ "/api/v1-2/items/star/multiple": { "put": { "operationId": "item_api-star_multiple-TODO", + "parameters": [ + { + "name": "items", + "in": "query", + "description": "items", + "required": true, + "schema": { + "type": "array" + } + } + ], "responses": { "200": { "description": "", @@ -1713,6 +2334,16 @@ ], "post": { "operationId": "item_api-unstar_multiple_by_item_ids-TODO", + "parameters": [ + { + "name": "itemIds", + "in": "query", + "required": true, + "schema": { + "type": "array" + } + } + ], "responses": { "200": { "description": "", @@ -1730,6 +2361,17 @@ "/api/v1-2/items/unstar/multiple": { "put": { "operationId": "item_api-unstar_multiple-TODO", + "parameters": [ + { + "name": "items", + "in": "query", + "description": "items", + "required": true, + "schema": { + "type": "array" + } + } + ], "responses": { "200": { "description": "", @@ -1747,6 +2389,16 @@ "/api/v2/folders": { "post": { "operationId": "folder_api_v2-create-TODO", + "parameters": [ + { + "name": "name", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -1789,6 +2441,16 @@ }, "patch": { "operationId": "folder_api_v2-update-TODO", + "parameters": [ + { + "name": "name", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", diff --git a/specs/templates/notes.json b/specs/templates/notes.json index 832cca40..723b432f 100644 --- a/specs/templates/notes.json +++ b/specs/templates/notes.json @@ -38,6 +38,17 @@ "/notes": { "get": { "operationId": "notes-index-TODO", + "parameters": [ + { + "name": "pruneBefore", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + } + ], "responses": { "200": { "description": "", @@ -53,6 +64,16 @@ }, "post": { "operationId": "notes-create-TODO", + "parameters": [ + { + "name": "category", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -112,6 +133,16 @@ }, "put": { "operationId": "notes-update-TODO", + "parameters": [ + { + "name": "content", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -144,6 +175,56 @@ "/notes/undo": { "post": { "operationId": "notes-undo-TODO", + "parameters": [ + { + "name": "id", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "title", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "content", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "category", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "modified", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "favorite", + "in": "query", + "required": true, + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "", @@ -206,6 +287,40 @@ ], "put": { "operationId": "notes-updateproperty-TODO", + "parameters": [ + { + "name": "modified", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "title", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "category", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "favorite", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "", @@ -233,6 +348,16 @@ ], "get": { "operationId": "notes-getattachment-TODO", + "parameters": [ + { + "name": "path", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -307,6 +432,51 @@ ], "get": { "operationId": "notes_api-index-TODO", + "parameters": [ + { + "name": "category", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "exclude", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "pruneBefore", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "chunkSize", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "chunkCursor", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -322,6 +492,53 @@ }, "post": { "operationId": "notes_api-create-TODO", + "parameters": [ + { + "name": "category", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "title", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "content", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "modified", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + }, + { + "name": "favorite", + "in": "query", + "required": false, + "schema": { + "type": "boolean", + "default": false + } + } + ], "responses": { "200": { "description": "", @@ -357,6 +574,17 @@ ], "get": { "operationId": "notes_api-get-TODO", + "parameters": [ + { + "name": "exclude", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], "responses": { "200": { "description": "", @@ -372,6 +600,48 @@ }, "put": { "operationId": "notes_api-update-TODO", + "parameters": [ + { + "name": "content", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "modified", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "title", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "category", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "favorite", + "in": "query", + "required": false, + "schema": { + "type": "boolean" + } + } + ], "responses": { "200": { "description": "", diff --git a/specs/templates/notifications.json b/specs/templates/notifications.json index a223765c..b78525c5 100644 --- a/specs/templates/notifications.json +++ b/specs/templates/notifications.json @@ -140,6 +140,32 @@ ], "post": { "operationId": "push-registerdevice-TODO", + "parameters": [ + { + "name": "pushTokenHash", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "devicePublicKey", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "proxyServer", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -190,6 +216,25 @@ ], "post": { "operationId": "api-generatenotification-TODO", + "parameters": [ + { + "name": "shortMessage", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "longMessage", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], "responses": { "200": { "description": "", @@ -217,6 +262,32 @@ ], "post": { "operationId": "settings-personal-TODO", + "parameters": [ + { + "name": "batchSetting", + "in": "query", + "required": true, + "schema": { + "type": "integer" + } + }, + { + "name": "soundNotification", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "soundTalk", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", diff --git a/specs/templates/provisioning_api.json b/specs/templates/provisioning_api.json index 3ff741a5..9a341631 100644 --- a/specs/templates/provisioning_api.json +++ b/specs/templates/provisioning_api.json @@ -38,6 +38,16 @@ "/ocs/v1.php/apps/provisioning_api/apps": { "get": { "operationId": "apps-getapps-TODO", + "parameters": [ + { + "name": "filter", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -112,6 +122,34 @@ "/ocs/v1.php/apps/provisioning_api/groups": { "get": { "operationId": "groups-getgroups-TODO", + "parameters": [ + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + } + ], "responses": { "200": { "description": "", @@ -127,6 +165,25 @@ }, "post": { "operationId": "groups-addgroup-TODO", + "parameters": [ + { + "name": "groupid", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "displayname", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], "responses": { "200": { "description": "", @@ -144,6 +201,34 @@ "/ocs/v1.php/apps/provisioning_api/groups/details": { "get": { "operationId": "groups-getgroupsdetails-TODO", + "parameters": [ + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + } + ], "responses": { "200": { "description": "", @@ -198,6 +283,34 @@ ], "get": { "operationId": "groups-getgroupusersdetails-TODO", + "parameters": [ + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + } + ], "responses": { "200": { "description": "", @@ -267,6 +380,24 @@ }, "put": { "operationId": "groups-updategroup-TODO", + "parameters": [ + { + "name": "key", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "value", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -299,6 +430,34 @@ "/ocs/v1.php/apps/provisioning_api/users": { "get": { "operationId": "users-getusers-TODO", + "parameters": [ + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + } + ], "responses": { "200": { "description": "", @@ -314,6 +473,77 @@ }, "post": { "operationId": "users-adduser-TODO", + "parameters": [ + { + "name": "userid", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "password", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "displayName", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "email", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "groups", + "in": "query", + "required": true, + "schema": { + "type": "array" + } + }, + { + "name": "subadmin", + "in": "query", + "required": true, + "schema": { + "type": "array" + } + }, + { + "name": "quota", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "language", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], "responses": { "200": { "description": "", @@ -331,6 +561,34 @@ "/ocs/v1.php/apps/provisioning_api/users/details": { "get": { "operationId": "users-getusersdetails-TODO", + "parameters": [ + { + "name": "search", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer", + "default": 0 + } + } + ], "responses": { "200": { "description": "", @@ -348,6 +606,24 @@ "/ocs/v1.php/apps/provisioning_api/users/search/by-phone": { "post": { "operationId": "users-searchbyphonenumbers-TODO", + "parameters": [ + { + "name": "location", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "search", + "in": "query", + "required": true, + "schema": { + "type": "array" + } + } + ], "responses": { "200": { "description": "", @@ -390,6 +666,24 @@ }, "put": { "operationId": "users-edituser-TODO", + "parameters": [ + { + "name": "key", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "value", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -501,6 +795,24 @@ ], "put": { "operationId": "users-editusermultivalue-TODO", + "parameters": [ + { + "name": "key", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "value", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -624,6 +936,17 @@ }, "post": { "operationId": "users-addtogroup-TODO", + "parameters": [ + { + "name": "groupid", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], "responses": { "200": { "description": "", @@ -639,6 +962,16 @@ }, "delete": { "operationId": "users-removefromgroup-TODO", + "parameters": [ + { + "name": "groupid", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -681,6 +1014,16 @@ }, "post": { "operationId": "users-addsubadmin-TODO", + "parameters": [ + { + "name": "groupid", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -696,6 +1039,16 @@ }, "delete": { "operationId": "users-removesubadmin-TODO", + "parameters": [ + { + "name": "groupid", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -802,6 +1155,17 @@ ], "get": { "operationId": "appconfig-getvalue-TODO", + "parameters": [ + { + "name": "defaultValue", + "in": "query", + "required": false, + "schema": { + "type": "string", + "default": "" + } + } + ], "responses": { "200": { "description": "", @@ -817,6 +1181,16 @@ }, "post": { "operationId": "appconfig-setvalue-TODO", + "parameters": [ + { + "name": "value", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", diff --git a/specs/templates/user_status.json b/specs/templates/user_status.json index 53e92f89..31e6e968 100644 --- a/specs/templates/user_status.json +++ b/specs/templates/user_status.json @@ -38,6 +38,24 @@ "/ocs/v1.php/apps/user_status/api/v1/statuses": { "get": { "operationId": "statuses-findall-TODO", + "parameters": [ + { + "name": "limit", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + }, + { + "name": "offset", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -99,6 +117,16 @@ "/ocs/v1.php/apps/user_status/api/v1/user_status/status": { "put": { "operationId": "userstatus-setstatus-TODO", + "parameters": [ + { + "name": "statusType", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -116,6 +144,24 @@ "/ocs/v1.php/apps/user_status/api/v1/user_status/message/predefined": { "put": { "operationId": "userstatus-setpredefinedmessage-TODO", + "parameters": [ + { + "name": "messageId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "clearAt", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -133,6 +179,32 @@ "/ocs/v1.php/apps/user_status/api/v1/user_status/message/custom": { "put": { "operationId": "userstatus-setcustommessage-TODO", + "parameters": [ + { + "name": "statusIcon", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "message", + "in": "query", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "clearAt", + "in": "query", + "required": false, + "schema": { + "type": "integer" + } + } + ], "responses": { "200": { "description": "", @@ -184,6 +256,16 @@ "/apps/user_status/heartbeat": { "put": { "operationId": "heartbeat-heartbeat-TODO", + "parameters": [ + { + "name": "status", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "",