From 4392385d41c81065ef0dea99abd6237b586dbacc Mon Sep 17 00:00:00 2001 From: provokateurin Date: Thu, 18 Jan 2024 21:47:34 +0100 Subject: [PATCH 1/3] refactor(tool): Simplify generating specs Signed-off-by: provokateurin --- .../nextcloud/lib/src/api/core.openapi.dart | 142 ++-- .../nextcloud/lib/src/api/core.openapi.g.dart | 688 +++++++++--------- .../nextcloud/lib/src/api/core.openapi.json | 50 +- tool/generate-specs.sh | 20 +- 4 files changed, 454 insertions(+), 446 deletions(-) diff --git a/packages/nextcloud/lib/src/api/core.openapi.dart b/packages/nextcloud/lib/src/api/core.openapi.dart index 304feefb494..a364dbc59e6 100644 --- a/packages/nextcloud/lib/src/api/core.openapi.dart +++ b/packages/nextcloud/lib/src/api/core.openapi.dart @@ -8358,73 +8358,6 @@ abstract class FilesVersionsCapabilities static Serializer get serializer => _$filesVersionsCapabilitiesSerializer; } -@BuiltValue(instantiable: false) -abstract interface class $NotesCapabilities_NotesInterface { - @BuiltValueField(wireName: 'api_version') - BuiltList? get apiVersion; - String? get version; -} - -abstract class NotesCapabilities_Notes - implements $NotesCapabilities_NotesInterface, Built { - /// Creates a new NotesCapabilities_Notes object using the builder pattern. - factory NotesCapabilities_Notes([void Function(NotesCapabilities_NotesBuilder)? b]) = _$NotesCapabilities_Notes; - - // coverage:ignore-start - const NotesCapabilities_Notes._(); - // coverage:ignore-end - - /// Creates a new object from the given [json] data. - /// - /// Use [toJson] to serialize it back into json. - // coverage:ignore-start - factory NotesCapabilities_Notes.fromJson(Map json) => - _$jsonSerializers.deserializeWith(serializer, json)!; - // coverage:ignore-end - - /// Parses this object into a json like map. - /// - /// Use the fromJson factory to revive it again. - // coverage:ignore-start - Map toJson() => _$jsonSerializers.serializeWith(serializer, this)! as Map; - // coverage:ignore-end - - /// Serializer for NotesCapabilities_Notes. - static Serializer get serializer => _$notesCapabilitiesNotesSerializer; -} - -@BuiltValue(instantiable: false) -abstract interface class $NotesCapabilitiesInterface { - NotesCapabilities_Notes get notes; -} - -abstract class NotesCapabilities - implements $NotesCapabilitiesInterface, Built { - /// Creates a new NotesCapabilities object using the builder pattern. - factory NotesCapabilities([void Function(NotesCapabilitiesBuilder)? b]) = _$NotesCapabilities; - - // coverage:ignore-start - const NotesCapabilities._(); - // coverage:ignore-end - - /// Creates a new object from the given [json] data. - /// - /// Use [toJson] to serialize it back into json. - // coverage:ignore-start - factory NotesCapabilities.fromJson(Map json) => _$jsonSerializers.deserializeWith(serializer, json)!; - // coverage:ignore-end - - /// Parses this object into a json like map. - /// - /// Use the fromJson factory to revive it again. - // coverage:ignore-start - Map toJson() => _$jsonSerializers.serializeWith(serializer, this)! as Map; - // coverage:ignore-end - - /// Serializer for NotesCapabilities. - static Serializer get serializer => _$notesCapabilitiesSerializer; -} - @BuiltValue(instantiable: false) abstract interface class $NotificationsCapabilities_NotificationsInterface { @BuiltValueField(wireName: 'ocs-endpoints') @@ -9434,6 +9367,73 @@ abstract class WeatherStatusCapabilities static Serializer get serializer => _$weatherStatusCapabilitiesSerializer; } +@BuiltValue(instantiable: false) +abstract interface class $NotesCapabilities_NotesInterface { + @BuiltValueField(wireName: 'api_version') + BuiltList? get apiVersion; + String? get version; +} + +abstract class NotesCapabilities_Notes + implements $NotesCapabilities_NotesInterface, Built { + /// Creates a new NotesCapabilities_Notes object using the builder pattern. + factory NotesCapabilities_Notes([void Function(NotesCapabilities_NotesBuilder)? b]) = _$NotesCapabilities_Notes; + + // coverage:ignore-start + const NotesCapabilities_Notes._(); + // coverage:ignore-end + + /// Creates a new object from the given [json] data. + /// + /// Use [toJson] to serialize it back into json. + // coverage:ignore-start + factory NotesCapabilities_Notes.fromJson(Map json) => + _$jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + /// Parses this object into a json like map. + /// + /// Use the fromJson factory to revive it again. + // coverage:ignore-start + Map toJson() => _$jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + + /// Serializer for NotesCapabilities_Notes. + static Serializer get serializer => _$notesCapabilitiesNotesSerializer; +} + +@BuiltValue(instantiable: false) +abstract interface class $NotesCapabilitiesInterface { + NotesCapabilities_Notes get notes; +} + +abstract class NotesCapabilities + implements $NotesCapabilitiesInterface, Built { + /// Creates a new NotesCapabilities object using the builder pattern. + factory NotesCapabilities([void Function(NotesCapabilitiesBuilder)? b]) = _$NotesCapabilities; + + // coverage:ignore-start + const NotesCapabilities._(); + // coverage:ignore-end + + /// Creates a new object from the given [json] data. + /// + /// Use [toJson] to serialize it back into json. + // coverage:ignore-start + factory NotesCapabilities.fromJson(Map json) => _$jsonSerializers.deserializeWith(serializer, json)!; + // coverage:ignore-end + + /// Parses this object into a json like map. + /// + /// Use the fromJson factory to revive it again. + // coverage:ignore-start + Map toJson() => _$jsonSerializers.serializeWith(serializer, this)! as Map; + // coverage:ignore-end + + /// Serializer for NotesCapabilities. + static Serializer get serializer => _$notesCapabilitiesSerializer; +} + typedef OcsGetCapabilitiesResponseApplicationJson_Ocs_Data_Capabilities = ({ CommentsCapabilities? commentsCapabilities, DavCapabilities? davCapabilities, @@ -13978,10 +13978,6 @@ final Serializers _$serializers = (Serializers().toBuilder() ..add(FilesVersionsCapabilities.serializer) ..addBuilderFactory(const FullType(FilesVersionsCapabilities_Files), FilesVersionsCapabilities_FilesBuilder.new) ..add(FilesVersionsCapabilities_Files.serializer) - ..addBuilderFactory(const FullType(NotesCapabilities), NotesCapabilitiesBuilder.new) - ..add(NotesCapabilities.serializer) - ..addBuilderFactory(const FullType(NotesCapabilities_Notes), NotesCapabilities_NotesBuilder.new) - ..add(NotesCapabilities_Notes.serializer) ..addBuilderFactory(const FullType(NotificationsCapabilities), NotificationsCapabilitiesBuilder.new) ..add(NotificationsCapabilities.serializer) ..addBuilderFactory( @@ -14086,6 +14082,10 @@ final Serializers _$serializers = (Serializers().toBuilder() WeatherStatusCapabilities_WeatherStatusBuilder.new, ) ..add(WeatherStatusCapabilities_WeatherStatus.serializer) + ..addBuilderFactory(const FullType(NotesCapabilities), NotesCapabilitiesBuilder.new) + ..add(NotesCapabilities.serializer) + ..addBuilderFactory(const FullType(NotesCapabilities_Notes), NotesCapabilities_NotesBuilder.new) + ..add(NotesCapabilities_Notes.serializer) ..add($3dc1754764311166375258bea55197c8Extension._serializer) ..add(PreviewGetPreviewByFileIdA.serializer) ..add(PreviewGetPreviewByFileIdForceIcon.serializer) diff --git a/packages/nextcloud/lib/src/api/core.openapi.g.dart b/packages/nextcloud/lib/src/api/core.openapi.g.dart index 1720de14090..02d51547d6b 100644 --- a/packages/nextcloud/lib/src/api/core.openapi.g.dart +++ b/packages/nextcloud/lib/src/api/core.openapi.g.dart @@ -463,8 +463,6 @@ Serializer _$filesTrashbinCapabilitiesSerializer = _$ Serializer _$filesVersionsCapabilitiesFilesSerializer = _$FilesVersionsCapabilities_FilesSerializer(); Serializer _$filesVersionsCapabilitiesSerializer = _$FilesVersionsCapabilitiesSerializer(); -Serializer _$notesCapabilitiesNotesSerializer = _$NotesCapabilities_NotesSerializer(); -Serializer _$notesCapabilitiesSerializer = _$NotesCapabilitiesSerializer(); Serializer _$notificationsCapabilitiesNotificationsSerializer = _$NotificationsCapabilities_NotificationsSerializer(); Serializer _$notificationsCapabilitiesSerializer = _$NotificationsCapabilitiesSerializer(); @@ -516,6 +514,8 @@ Serializer _$userStatusCapabilitiesSerializer = _$UserSt Serializer _$weatherStatusCapabilitiesWeatherStatusSerializer = _$WeatherStatusCapabilities_WeatherStatusSerializer(); Serializer _$weatherStatusCapabilitiesSerializer = _$WeatherStatusCapabilitiesSerializer(); +Serializer _$notesCapabilitiesNotesSerializer = _$NotesCapabilities_NotesSerializer(); +Serializer _$notesCapabilitiesSerializer = _$NotesCapabilitiesSerializer(); Serializer _$ocsGetCapabilitiesResponseApplicationJsonOcsDataSerializer = _$OcsGetCapabilitiesResponseApplicationJson_Ocs_DataSerializer(); @@ -4610,96 +4610,6 @@ class _$FilesVersionsCapabilitiesSerializer implements StructuredSerializer { - @override - final Iterable types = const [NotesCapabilities_Notes, _$NotesCapabilities_Notes]; - @override - final String wireName = 'NotesCapabilities_Notes'; - - @override - Iterable serialize(Serializers serializers, NotesCapabilities_Notes object, - {FullType specifiedType = FullType.unspecified}) { - final result = []; - Object? value; - value = object.apiVersion; - if (value != null) { - result - ..add('api_version') - ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(String)]))); - } - value = object.version; - if (value != null) { - result - ..add('version') - ..add(serializers.serialize(value, specifiedType: const FullType(String))); - } - return result; - } - - @override - NotesCapabilities_Notes deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = NotesCapabilities_NotesBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final Object? value = iterator.current; - switch (key) { - case 'api_version': - result.apiVersion.replace(serializers.deserialize(value, - specifiedType: const FullType(BuiltList, [FullType(String)]))! as BuiltList); - break; - case 'version': - result.version = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; - break; - } - } - - return result.build(); - } -} - -class _$NotesCapabilitiesSerializer implements StructuredSerializer { - @override - final Iterable types = const [NotesCapabilities, _$NotesCapabilities]; - @override - final String wireName = 'NotesCapabilities'; - - @override - Iterable serialize(Serializers serializers, NotesCapabilities object, - {FullType specifiedType = FullType.unspecified}) { - final result = [ - 'notes', - serializers.serialize(object.notes, specifiedType: const FullType(NotesCapabilities_Notes)), - ]; - - return result; - } - - @override - NotesCapabilities deserialize(Serializers serializers, Iterable serialized, - {FullType specifiedType = FullType.unspecified}) { - final result = NotesCapabilitiesBuilder(); - - final iterator = serialized.iterator; - while (iterator.moveNext()) { - final key = iterator.current! as String; - iterator.moveNext(); - final Object? value = iterator.current; - switch (key) { - case 'notes': - result.notes.replace(serializers.deserialize(value, specifiedType: const FullType(NotesCapabilities_Notes))! - as NotesCapabilities_Notes); - break; - } - } - - return result.build(); - } -} - class _$NotificationsCapabilities_NotificationsSerializer implements StructuredSerializer { @override @@ -6060,6 +5970,96 @@ class _$WeatherStatusCapabilitiesSerializer implements StructuredSerializer { + @override + final Iterable types = const [NotesCapabilities_Notes, _$NotesCapabilities_Notes]; + @override + final String wireName = 'NotesCapabilities_Notes'; + + @override + Iterable serialize(Serializers serializers, NotesCapabilities_Notes object, + {FullType specifiedType = FullType.unspecified}) { + final result = []; + Object? value; + value = object.apiVersion; + if (value != null) { + result + ..add('api_version') + ..add(serializers.serialize(value, specifiedType: const FullType(BuiltList, [FullType(String)]))); + } + value = object.version; + if (value != null) { + result + ..add('version') + ..add(serializers.serialize(value, specifiedType: const FullType(String))); + } + return result; + } + + @override + NotesCapabilities_Notes deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NotesCapabilities_NotesBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'api_version': + result.apiVersion.replace(serializers.deserialize(value, + specifiedType: const FullType(BuiltList, [FullType(String)]))! as BuiltList); + break; + case 'version': + result.version = serializers.deserialize(value, specifiedType: const FullType(String)) as String?; + break; + } + } + + return result.build(); + } +} + +class _$NotesCapabilitiesSerializer implements StructuredSerializer { + @override + final Iterable types = const [NotesCapabilities, _$NotesCapabilities]; + @override + final String wireName = 'NotesCapabilities'; + + @override + Iterable serialize(Serializers serializers, NotesCapabilities object, + {FullType specifiedType = FullType.unspecified}) { + final result = [ + 'notes', + serializers.serialize(object.notes, specifiedType: const FullType(NotesCapabilities_Notes)), + ]; + + return result; + } + + @override + NotesCapabilities deserialize(Serializers serializers, Iterable serialized, + {FullType specifiedType = FullType.unspecified}) { + final result = NotesCapabilitiesBuilder(); + + final iterator = serialized.iterator; + while (iterator.moveNext()) { + final key = iterator.current! as String; + iterator.moveNext(); + final Object? value = iterator.current; + switch (key) { + case 'notes': + result.notes.replace(serializers.deserialize(value, specifiedType: const FullType(NotesCapabilities_Notes))! + as NotesCapabilities_Notes); + break; + } + } + + return result.build(); + } +} + class _$OcsGetCapabilitiesResponseApplicationJson_Ocs_DataSerializer implements StructuredSerializer { @override @@ -19277,290 +19277,83 @@ class FilesVersionsCapabilitiesBuilder } } -abstract mixin class $NotesCapabilities_NotesInterfaceBuilder { - void replace($NotesCapabilities_NotesInterface other); - void update(void Function($NotesCapabilities_NotesInterfaceBuilder) updates); - ListBuilder get apiVersion; - set apiVersion(ListBuilder? apiVersion); +abstract mixin class $NotificationsCapabilities_NotificationsInterfaceBuilder { + void replace($NotificationsCapabilities_NotificationsInterface other); + void update(void Function($NotificationsCapabilities_NotificationsInterfaceBuilder) updates); + ListBuilder get ocsEndpoints; + set ocsEndpoints(ListBuilder? ocsEndpoints); - String? get version; - set version(String? version); + ListBuilder get push; + set push(ListBuilder? push); + + ListBuilder get adminNotifications; + set adminNotifications(ListBuilder? adminNotifications); } -class _$NotesCapabilities_Notes extends NotesCapabilities_Notes { +class _$NotificationsCapabilities_Notifications extends NotificationsCapabilities_Notifications { @override - final BuiltList? apiVersion; + final BuiltList ocsEndpoints; @override - final String? version; + final BuiltList push; + @override + final BuiltList adminNotifications; - factory _$NotesCapabilities_Notes([void Function(NotesCapabilities_NotesBuilder)? updates]) => - (NotesCapabilities_NotesBuilder()..update(updates))._build(); + factory _$NotificationsCapabilities_Notifications( + [void Function(NotificationsCapabilities_NotificationsBuilder)? updates]) => + (NotificationsCapabilities_NotificationsBuilder()..update(updates))._build(); - _$NotesCapabilities_Notes._({this.apiVersion, this.version}) : super._(); + _$NotificationsCapabilities_Notifications._( + {required this.ocsEndpoints, required this.push, required this.adminNotifications}) + : super._() { + BuiltValueNullFieldError.checkNotNull(ocsEndpoints, r'NotificationsCapabilities_Notifications', 'ocsEndpoints'); + BuiltValueNullFieldError.checkNotNull(push, r'NotificationsCapabilities_Notifications', 'push'); + BuiltValueNullFieldError.checkNotNull( + adminNotifications, r'NotificationsCapabilities_Notifications', 'adminNotifications'); + } @override - NotesCapabilities_Notes rebuild(void Function(NotesCapabilities_NotesBuilder) updates) => + NotificationsCapabilities_Notifications rebuild( + void Function(NotificationsCapabilities_NotificationsBuilder) updates) => (toBuilder()..update(updates)).build(); @override - NotesCapabilities_NotesBuilder toBuilder() => NotesCapabilities_NotesBuilder()..replace(this); + NotificationsCapabilities_NotificationsBuilder toBuilder() => + NotificationsCapabilities_NotificationsBuilder()..replace(this); @override bool operator ==(Object other) { if (identical(other, this)) return true; - return other is NotesCapabilities_Notes && apiVersion == other.apiVersion && version == other.version; + return other is NotificationsCapabilities_Notifications && + ocsEndpoints == other.ocsEndpoints && + push == other.push && + adminNotifications == other.adminNotifications; } @override int get hashCode { var _$hash = 0; - _$hash = $jc(_$hash, apiVersion.hashCode); - _$hash = $jc(_$hash, version.hashCode); + _$hash = $jc(_$hash, ocsEndpoints.hashCode); + _$hash = $jc(_$hash, push.hashCode); + _$hash = $jc(_$hash, adminNotifications.hashCode); _$hash = $jf(_$hash); return _$hash; } @override String toString() { - return (newBuiltValueToStringHelper(r'NotesCapabilities_Notes') - ..add('apiVersion', apiVersion) - ..add('version', version)) + return (newBuiltValueToStringHelper(r'NotificationsCapabilities_Notifications') + ..add('ocsEndpoints', ocsEndpoints) + ..add('push', push) + ..add('adminNotifications', adminNotifications)) .toString(); } } -class NotesCapabilities_NotesBuilder +class NotificationsCapabilities_NotificationsBuilder implements - Builder, - $NotesCapabilities_NotesInterfaceBuilder { - _$NotesCapabilities_Notes? _$v; - - ListBuilder? _apiVersion; - ListBuilder get apiVersion => _$this._apiVersion ??= ListBuilder(); - set apiVersion(covariant ListBuilder? apiVersion) => _$this._apiVersion = apiVersion; - - String? _version; - String? get version => _$this._version; - set version(covariant String? version) => _$this._version = version; - - NotesCapabilities_NotesBuilder(); - - NotesCapabilities_NotesBuilder get _$this { - final $v = _$v; - if ($v != null) { - _apiVersion = $v.apiVersion?.toBuilder(); - _version = $v.version; - _$v = null; - } - return this; - } - - @override - void replace(covariant NotesCapabilities_Notes other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotesCapabilities_Notes; - } - - @override - void update(void Function(NotesCapabilities_NotesBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - NotesCapabilities_Notes build() => _build(); - - _$NotesCapabilities_Notes _build() { - _$NotesCapabilities_Notes _$result; - try { - _$result = _$v ?? _$NotesCapabilities_Notes._(apiVersion: _apiVersion?.build(), version: version); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'apiVersion'; - _apiVersion?.build(); - } catch (e) { - throw BuiltValueNestedFieldError(r'NotesCapabilities_Notes', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -abstract mixin class $NotesCapabilitiesInterfaceBuilder { - void replace($NotesCapabilitiesInterface other); - void update(void Function($NotesCapabilitiesInterfaceBuilder) updates); - NotesCapabilities_NotesBuilder get notes; - set notes(NotesCapabilities_NotesBuilder? notes); -} - -class _$NotesCapabilities extends NotesCapabilities { - @override - final NotesCapabilities_Notes notes; - - factory _$NotesCapabilities([void Function(NotesCapabilitiesBuilder)? updates]) => - (NotesCapabilitiesBuilder()..update(updates))._build(); - - _$NotesCapabilities._({required this.notes}) : super._() { - BuiltValueNullFieldError.checkNotNull(notes, r'NotesCapabilities', 'notes'); - } - - @override - NotesCapabilities rebuild(void Function(NotesCapabilitiesBuilder) updates) => (toBuilder()..update(updates)).build(); - - @override - NotesCapabilitiesBuilder toBuilder() => NotesCapabilitiesBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is NotesCapabilities && notes == other.notes; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, notes.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'NotesCapabilities')..add('notes', notes)).toString(); - } -} - -class NotesCapabilitiesBuilder - implements Builder, $NotesCapabilitiesInterfaceBuilder { - _$NotesCapabilities? _$v; - - NotesCapabilities_NotesBuilder? _notes; - NotesCapabilities_NotesBuilder get notes => _$this._notes ??= NotesCapabilities_NotesBuilder(); - set notes(covariant NotesCapabilities_NotesBuilder? notes) => _$this._notes = notes; - - NotesCapabilitiesBuilder(); - - NotesCapabilitiesBuilder get _$this { - final $v = _$v; - if ($v != null) { - _notes = $v.notes.toBuilder(); - _$v = null; - } - return this; - } - - @override - void replace(covariant NotesCapabilities other) { - ArgumentError.checkNotNull(other, 'other'); - _$v = other as _$NotesCapabilities; - } - - @override - void update(void Function(NotesCapabilitiesBuilder)? updates) { - if (updates != null) updates(this); - } - - @override - NotesCapabilities build() => _build(); - - _$NotesCapabilities _build() { - _$NotesCapabilities _$result; - try { - _$result = _$v ?? _$NotesCapabilities._(notes: notes.build()); - } catch (_) { - late String _$failedField; - try { - _$failedField = 'notes'; - notes.build(); - } catch (e) { - throw BuiltValueNestedFieldError(r'NotesCapabilities', _$failedField, e.toString()); - } - rethrow; - } - replace(_$result); - return _$result; - } -} - -abstract mixin class $NotificationsCapabilities_NotificationsInterfaceBuilder { - void replace($NotificationsCapabilities_NotificationsInterface other); - void update(void Function($NotificationsCapabilities_NotificationsInterfaceBuilder) updates); - ListBuilder get ocsEndpoints; - set ocsEndpoints(ListBuilder? ocsEndpoints); - - ListBuilder get push; - set push(ListBuilder? push); - - ListBuilder get adminNotifications; - set adminNotifications(ListBuilder? adminNotifications); -} - -class _$NotificationsCapabilities_Notifications extends NotificationsCapabilities_Notifications { - @override - final BuiltList ocsEndpoints; - @override - final BuiltList push; - @override - final BuiltList adminNotifications; - - factory _$NotificationsCapabilities_Notifications( - [void Function(NotificationsCapabilities_NotificationsBuilder)? updates]) => - (NotificationsCapabilities_NotificationsBuilder()..update(updates))._build(); - - _$NotificationsCapabilities_Notifications._( - {required this.ocsEndpoints, required this.push, required this.adminNotifications}) - : super._() { - BuiltValueNullFieldError.checkNotNull(ocsEndpoints, r'NotificationsCapabilities_Notifications', 'ocsEndpoints'); - BuiltValueNullFieldError.checkNotNull(push, r'NotificationsCapabilities_Notifications', 'push'); - BuiltValueNullFieldError.checkNotNull( - adminNotifications, r'NotificationsCapabilities_Notifications', 'adminNotifications'); - } - - @override - NotificationsCapabilities_Notifications rebuild( - void Function(NotificationsCapabilities_NotificationsBuilder) updates) => - (toBuilder()..update(updates)).build(); - - @override - NotificationsCapabilities_NotificationsBuilder toBuilder() => - NotificationsCapabilities_NotificationsBuilder()..replace(this); - - @override - bool operator ==(Object other) { - if (identical(other, this)) return true; - return other is NotificationsCapabilities_Notifications && - ocsEndpoints == other.ocsEndpoints && - push == other.push && - adminNotifications == other.adminNotifications; - } - - @override - int get hashCode { - var _$hash = 0; - _$hash = $jc(_$hash, ocsEndpoints.hashCode); - _$hash = $jc(_$hash, push.hashCode); - _$hash = $jc(_$hash, adminNotifications.hashCode); - _$hash = $jf(_$hash); - return _$hash; - } - - @override - String toString() { - return (newBuiltValueToStringHelper(r'NotificationsCapabilities_Notifications') - ..add('ocsEndpoints', ocsEndpoints) - ..add('push', push) - ..add('adminNotifications', adminNotifications)) - .toString(); - } -} - -class NotificationsCapabilities_NotificationsBuilder - implements - Builder, - $NotificationsCapabilities_NotificationsInterfaceBuilder { - _$NotificationsCapabilities_Notifications? _$v; + Builder, + $NotificationsCapabilities_NotificationsInterfaceBuilder { + _$NotificationsCapabilities_Notifications? _$v; ListBuilder? _ocsEndpoints; ListBuilder get ocsEndpoints => _$this._ocsEndpoints ??= ListBuilder(); @@ -22838,6 +22631,213 @@ class WeatherStatusCapabilitiesBuilder } } +abstract mixin class $NotesCapabilities_NotesInterfaceBuilder { + void replace($NotesCapabilities_NotesInterface other); + void update(void Function($NotesCapabilities_NotesInterfaceBuilder) updates); + ListBuilder get apiVersion; + set apiVersion(ListBuilder? apiVersion); + + String? get version; + set version(String? version); +} + +class _$NotesCapabilities_Notes extends NotesCapabilities_Notes { + @override + final BuiltList? apiVersion; + @override + final String? version; + + factory _$NotesCapabilities_Notes([void Function(NotesCapabilities_NotesBuilder)? updates]) => + (NotesCapabilities_NotesBuilder()..update(updates))._build(); + + _$NotesCapabilities_Notes._({this.apiVersion, this.version}) : super._(); + + @override + NotesCapabilities_Notes rebuild(void Function(NotesCapabilities_NotesBuilder) updates) => + (toBuilder()..update(updates)).build(); + + @override + NotesCapabilities_NotesBuilder toBuilder() => NotesCapabilities_NotesBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotesCapabilities_Notes && apiVersion == other.apiVersion && version == other.version; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, apiVersion.hashCode); + _$hash = $jc(_$hash, version.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotesCapabilities_Notes') + ..add('apiVersion', apiVersion) + ..add('version', version)) + .toString(); + } +} + +class NotesCapabilities_NotesBuilder + implements + Builder, + $NotesCapabilities_NotesInterfaceBuilder { + _$NotesCapabilities_Notes? _$v; + + ListBuilder? _apiVersion; + ListBuilder get apiVersion => _$this._apiVersion ??= ListBuilder(); + set apiVersion(covariant ListBuilder? apiVersion) => _$this._apiVersion = apiVersion; + + String? _version; + String? get version => _$this._version; + set version(covariant String? version) => _$this._version = version; + + NotesCapabilities_NotesBuilder(); + + NotesCapabilities_NotesBuilder get _$this { + final $v = _$v; + if ($v != null) { + _apiVersion = $v.apiVersion?.toBuilder(); + _version = $v.version; + _$v = null; + } + return this; + } + + @override + void replace(covariant NotesCapabilities_Notes other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotesCapabilities_Notes; + } + + @override + void update(void Function(NotesCapabilities_NotesBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotesCapabilities_Notes build() => _build(); + + _$NotesCapabilities_Notes _build() { + _$NotesCapabilities_Notes _$result; + try { + _$result = _$v ?? _$NotesCapabilities_Notes._(apiVersion: _apiVersion?.build(), version: version); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'apiVersion'; + _apiVersion?.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'NotesCapabilities_Notes', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + +abstract mixin class $NotesCapabilitiesInterfaceBuilder { + void replace($NotesCapabilitiesInterface other); + void update(void Function($NotesCapabilitiesInterfaceBuilder) updates); + NotesCapabilities_NotesBuilder get notes; + set notes(NotesCapabilities_NotesBuilder? notes); +} + +class _$NotesCapabilities extends NotesCapabilities { + @override + final NotesCapabilities_Notes notes; + + factory _$NotesCapabilities([void Function(NotesCapabilitiesBuilder)? updates]) => + (NotesCapabilitiesBuilder()..update(updates))._build(); + + _$NotesCapabilities._({required this.notes}) : super._() { + BuiltValueNullFieldError.checkNotNull(notes, r'NotesCapabilities', 'notes'); + } + + @override + NotesCapabilities rebuild(void Function(NotesCapabilitiesBuilder) updates) => (toBuilder()..update(updates)).build(); + + @override + NotesCapabilitiesBuilder toBuilder() => NotesCapabilitiesBuilder()..replace(this); + + @override + bool operator ==(Object other) { + if (identical(other, this)) return true; + return other is NotesCapabilities && notes == other.notes; + } + + @override + int get hashCode { + var _$hash = 0; + _$hash = $jc(_$hash, notes.hashCode); + _$hash = $jf(_$hash); + return _$hash; + } + + @override + String toString() { + return (newBuiltValueToStringHelper(r'NotesCapabilities')..add('notes', notes)).toString(); + } +} + +class NotesCapabilitiesBuilder + implements Builder, $NotesCapabilitiesInterfaceBuilder { + _$NotesCapabilities? _$v; + + NotesCapabilities_NotesBuilder? _notes; + NotesCapabilities_NotesBuilder get notes => _$this._notes ??= NotesCapabilities_NotesBuilder(); + set notes(covariant NotesCapabilities_NotesBuilder? notes) => _$this._notes = notes; + + NotesCapabilitiesBuilder(); + + NotesCapabilitiesBuilder get _$this { + final $v = _$v; + if ($v != null) { + _notes = $v.notes.toBuilder(); + _$v = null; + } + return this; + } + + @override + void replace(covariant NotesCapabilities other) { + ArgumentError.checkNotNull(other, 'other'); + _$v = other as _$NotesCapabilities; + } + + @override + void update(void Function(NotesCapabilitiesBuilder)? updates) { + if (updates != null) updates(this); + } + + @override + NotesCapabilities build() => _build(); + + _$NotesCapabilities _build() { + _$NotesCapabilities _$result; + try { + _$result = _$v ?? _$NotesCapabilities._(notes: notes.build()); + } catch (_) { + late String _$failedField; + try { + _$failedField = 'notes'; + notes.build(); + } catch (e) { + throw BuiltValueNestedFieldError(r'NotesCapabilities', _$failedField, e.toString()); + } + rethrow; + } + replace(_$result); + return _$result; + } +} + abstract mixin class $OcsGetCapabilitiesResponseApplicationJson_Ocs_DataInterfaceBuilder { void replace($OcsGetCapabilitiesResponseApplicationJson_Ocs_DataInterface other); void update(void Function($OcsGetCapabilitiesResponseApplicationJson_Ocs_DataInterfaceBuilder) updates); diff --git a/packages/nextcloud/lib/src/api/core.openapi.json b/packages/nextcloud/lib/src/api/core.openapi.json index 8aa4675d96c..f74ac4f5c8b 100644 --- a/packages/nextcloud/lib/src/api/core.openapi.json +++ b/packages/nextcloud/lib/src/api/core.openapi.json @@ -989,28 +989,6 @@ } } }, - "NotesCapabilities": { - "type": "object", - "required": [ - "notes" - ], - "properties": { - "notes": { - "type": "object", - "properties": { - "api_version": { - "type": "array", - "items": { - "type": "string" - } - }, - "version": { - "type": "string" - } - } - } - } - }, "NotificationsCapabilities": { "type": "object", "required": [ @@ -1454,6 +1432,28 @@ } } } + }, + "NotesCapabilities": { + "type": "object", + "required": [ + "notes" + ], + "properties": { + "notes": { + "type": "object", + "properties": { + "api_version": { + "type": "array", + "items": { + "type": "string" + } + }, + "version": { + "type": "string" + } + } + } + } } } }, @@ -2482,9 +2482,6 @@ { "$ref": "#/components/schemas/FilesVersionsCapabilities" }, - { - "$ref": "#/components/schemas/NotesCapabilities" - }, { "$ref": "#/components/schemas/NotificationsCapabilities" }, @@ -2505,6 +2502,9 @@ }, { "$ref": "#/components/schemas/WeatherStatusCapabilities" + }, + { + "$ref": "#/components/schemas/NotesCapabilities" } ] } diff --git a/tool/generate-specs.sh b/tool/generate-specs.sh index 33251f250cb..0a58235e6e6 100755 --- a/tool/generate-specs.sh +++ b/tool/generate-specs.sh @@ -8,7 +8,7 @@ mkdir -p /tmp/nextcloud-neon function generate_spec() { path="$1" codename="$2" - ../nextcloud-openapi-extractor/generate-spec "$path" "../../packages/nextcloud/lib/src/api/$codename.openapi.json" --first-content-type --openapi-version 3.1.0 + ../nextcloud-openapi-extractor/generate-spec "$path" "/tmp/nextcloud-neon/$codename.openapi.json" --first-content-type --openapi-version 3.1.0 } ( @@ -50,7 +50,7 @@ done generate_spec "." "spreed" ) -for spec in packages/nextcloud/lib/src/api/*.openapi.json; do +for spec in /tmp/nextcloud-neon/*.openapi.json; do name="$(basename "$spec" | cut -d "." -f 1)" dir="packages/nextcloud/lib/src/patches/$name" if [ -d "$dir" ]; then @@ -60,12 +60,20 @@ for spec in packages/nextcloud/lib/src/api/*.openapi.json; do fi done -./external/nextcloud-openapi-extractor/merge-specs --core packages/nextcloud/lib/src/api/core.openapi.json --merged /tmp/nextcloud-neon/merged.json packages/nextcloud/lib/src/api/*.openapi.json --openapi-version 3.1.0 +cp /tmp/nextcloud-neon/*.openapi.json packages/nextcloud/lib/src/api + +./external/nextcloud-openapi-extractor/merge-specs \ + --core /tmp/nextcloud-neon/core.openapi.json \ + --merged /tmp/nextcloud-neon/merged.json \ + /tmp/nextcloud-neon/*.openapi.json \ + packages/nextcloud/lib/src/api/news.openapi.json \ + packages/nextcloud/lib/src/api/notes.openapi.json \ + packages/nextcloud/lib/src/api/uppush.openapi.json \ + --openapi-version 3.1.0 jq \ -s \ '.[0] * {components: {schemas: .[1].components.schemas | with_entries(select(.key | endswith("Capabilities")))}, paths: {"/ocs/v2.php/cloud/capabilities": {get: {responses: .[1].paths."/ocs/v2.php/cloud/capabilities".get.responses}}}}' \ - packages/nextcloud/lib/src/api/core.openapi.json \ + /tmp/nextcloud-neon/core.openapi.json \ /tmp/nextcloud-neon/merged.json \ - > /tmp/nextcloud-neon/core.json -cp /tmp/nextcloud-neon/core.json packages/nextcloud/lib/src/api/core.openapi.json + > packages/nextcloud/lib/src/api/core.openapi.json From d24389975206083d843b33b16c9ee84008a87c79 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Thu, 18 Jan 2024 21:50:47 +0100 Subject: [PATCH 2/3] chore(tool): Set correct indentation for core.openapi.json Signed-off-by: provokateurin --- .../nextcloud/lib/src/api/core.openapi.json | 13446 ++++++++-------- tool/generate-specs.sh | 1 + 2 files changed, 6724 insertions(+), 6723 deletions(-) diff --git a/packages/nextcloud/lib/src/api/core.openapi.json b/packages/nextcloud/lib/src/api/core.openapi.json index f74ac4f5c8b..3336d486b09 100644 --- a/packages/nextcloud/lib/src/api/core.openapi.json +++ b/packages/nextcloud/lib/src/api/core.openapi.json @@ -1,7040 +1,7040 @@ { - "openapi": "3.1.0", - "info": { - "title": "core", - "version": "0.0.1", - "description": "Core functionality of Nextcloud", - "license": { - "name": "agpl", - "identifier": "AGPL-3.0-only" - } - }, - "components": { - "securitySchemes": { - "basic_auth": { - "type": "http", - "scheme": "basic" - }, - "bearer_auth": { - "type": "http", - "scheme": "bearer" - } + "openapi": "3.1.0", + "info": { + "title": "core", + "version": "0.0.1", + "description": "Core functionality of Nextcloud", + "license": { + "name": "agpl", + "identifier": "AGPL-3.0-only" + } }, - "schemas": { - "AutocompleteResult": { - "type": "object", - "required": [ - "id", - "label", - "icon", - "source", - "status", - "subline", - "shareWithDisplayNameUnique" - ], - "properties": { - "id": { - "type": "string" - }, - "label": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "source": { - "type": "string" - }, - "status": { - "oneOf": [ - { + "components": { + "securitySchemes": { + "basic_auth": { + "type": "http", + "scheme": "basic" + }, + "bearer_auth": { + "type": "http", + "scheme": "bearer" + } + }, + "schemas": { + "AutocompleteResult": { "type": "object", "required": [ - "status", - "message", - "icon", - "clearAt" + "id", + "label", + "icon", + "source", + "status", + "subline", + "shareWithDisplayNameUnique" ], "properties": { - "status": { - "type": "string" - }, - "message": { - "type": "string", - "nullable": true - }, - "icon": { - "type": "string", - "nullable": true - }, - "clearAt": { - "type": "integer", - "format": "int64", - "nullable": true - } + "id": { + "type": "string" + }, + "label": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "source": { + "type": "string" + }, + "status": { + "oneOf": [ + { + "type": "object", + "required": [ + "status", + "message", + "icon", + "clearAt" + ], + "properties": { + "status": { + "type": "string" + }, + "message": { + "type": "string", + "nullable": true + }, + "icon": { + "type": "string", + "nullable": true + }, + "clearAt": { + "type": "integer", + "format": "int64", + "nullable": true + } + } + }, + { + "type": "string" + } + ] + }, + "subline": { + "type": "string" + }, + "shareWithDisplayNameUnique": { + "type": "string" + } } - }, - { - "type": "string" - } - ] - }, - "subline": { - "type": "string" - }, - "shareWithDisplayNameUnique": { - "type": "string" - } - } - }, - "Collection": { - "type": "object", - "required": [ - "id", - "name", - "resources" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64" - }, - "name": { - "type": "string" - }, - "resources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Resource" - } - } - } - }, - "ContactsAction": { - "type": "object", - "required": [ - "title", - "icon", - "hyperlink", - "appId" - ], - "properties": { - "title": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "hyperlink": { - "type": "string" - }, - "appId": { - "type": "string" - } - } - }, - "LoginFlowV2": { - "type": "object", - "required": [ - "poll", - "login" - ], - "properties": { - "poll": { - "type": "object", - "required": [ - "token", - "endpoint" - ], - "properties": { - "token": { - "type": "string" - }, - "endpoint": { - "type": "string" - } - } - }, - "login": { - "type": "string" - } - } - }, - "LoginFlowV2Credentials": { - "type": "object", - "required": [ - "server", - "loginName", - "appPassword" - ], - "properties": { - "server": { - "type": "string" - }, - "loginName": { - "type": "string" - }, - "appPassword": { - "type": "string" - } - } - }, - "NavigationEntry": { - "type": "object", - "required": [ - "id", - "order", - "href", - "icon", - "type", - "name", - "active", - "classes", - "unread" - ], - "properties": { - "id": { - "type": "string" - }, - "order": { - "oneOf": [ - { - "type": "integer", - "format": "int64" - }, - { - "type": "string" - } - ] - }, - "href": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "type": { - "type": "string" - }, - "name": { - "type": "string" - }, - "active": { - "type": "boolean" - }, - "classes": { - "type": "string" - }, - "unread": { - "type": "integer", - "format": "int64" - } - } - }, - "OCSMeta": { - "type": "object", - "required": [ - "status", - "statuscode" - ], - "properties": { - "status": { - "type": "string" - }, - "statuscode": { - "type": "integer" - }, - "message": { - "type": "string" - }, - "totalitems": { - "type": "string" - }, - "itemsperpage": { - "type": "string" - } - } - }, - "OpenGraphObject": { - "type": "object", - "required": [ - "id", - "name", - "description", - "thumb", - "link" - ], - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string", - "nullable": true - }, - "thumb": { - "type": "string", - "nullable": true - }, - "link": { - "type": "string" - } - } - }, - "Reference": { - "type": "object", - "required": [ - "richObjectType", - "richObject", - "openGraphObject", - "accessible" - ], - "properties": { - "richObjectType": { - "type": "string" - }, - "richObject": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "openGraphObject": { - "$ref": "#/components/schemas/OpenGraphObject" - }, - "accessible": { - "type": "boolean" - } - } - }, - "ReferenceProvider": { - "type": "object", - "required": [ - "id", - "title", - "icon_url", - "order", - "search_providers_ids" - ], - "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" - }, - "icon_url": { - "type": "string" - }, - "order": { - "type": "integer", - "format": "int64" - }, - "search_providers_ids": { - "type": "array", - "nullable": true, - "items": { - "type": "string" - } - } - } - }, - "Resource": { - "type": "object", - "required": [ - "richObjectType", - "richObject", - "openGraphObject", - "accessible" - ], - "properties": { - "richObjectType": { - "type": "string" - }, - "richObject": { - "type": "object", - "additionalProperties": { - "type": "object" - } - }, - "openGraphObject": { - "$ref": "#/components/schemas/OpenGraphObject" - }, - "accessible": { - "type": "boolean" - } - } - }, - "Status": { - "type": "object", - "required": [ - "installed", - "maintenance", - "needsDbUpgrade", - "version", - "versionstring", - "edition", - "productname", - "extendedSupport" - ], - "properties": { - "installed": { - "type": "boolean" - }, - "maintenance": { - "type": "boolean" - }, - "needsDbUpgrade": { - "type": "boolean" - }, - "version": { - "type": "string" - }, - "versionstring": { - "type": "string" - }, - "edition": { - "type": "string" - }, - "productname": { - "type": "string" - }, - "extendedSupport": { - "type": "boolean" - } - } - }, - "TextProcessingTask": { - "type": "object", - "required": [ - "id", - "type", - "status", - "userId", - "appId", - "input", - "output", - "identifier", - "completionExpectedAt" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "type": { - "type": "string" - }, - "status": { - "type": "integer", - "format": "int64", - "enum": [ - 0, - 1, - 2, - 3, - 4 - ] - }, - "userId": { - "type": "string", - "nullable": true - }, - "appId": { - "type": "string" - }, - "input": { - "type": "string" - }, - "output": { - "type": "string", - "nullable": true - }, - "identifier": { - "type": "string" - }, - "completionExpectedAt": { - "type": "integer", - "format": "int64", - "nullable": true - } - } - }, - "TextToImageTask": { - "type": "object", - "required": [ - "id", - "status", - "userId", - "appId", - "input", - "identifier", - "numberOfImages", - "completionExpectedAt" - ], - "properties": { - "id": { - "type": "integer", - "format": "int64", - "nullable": true - }, - "status": { - "type": "integer", - "format": "int64", - "enum": [ - 0, - 1, - 2, - 3, - 4 - ] - }, - "userId": { - "type": "string", - "nullable": true - }, - "appId": { - "type": "string" - }, - "input": { - "type": "string" - }, - "identifier": { - "type": "string", - "nullable": true - }, - "numberOfImages": { - "type": "integer", - "format": "int64" - }, - "completionExpectedAt": { - "type": "integer", - "format": "int64", - "nullable": true - } - } - }, - "UnifiedSearchProvider": { - "type": "object", - "required": [ - "id", - "name", - "order" - ], - "properties": { - "id": { - "type": "string" - }, - "appId": { - "type": "string" - }, - "name": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "order": { - "type": "integer", - "format": "int64" - }, - "triggers": { - "type": "array", - "items": { - "type": "string" - } - }, - "filters": { - "type": "object", - "additionalProperties": { - "type": "string" - } - }, - "inAppSearch": { - "type": "boolean" - } - } - }, - "UnifiedSearchResult": { - "type": "object", - "required": [ - "name", - "isPaginated", - "entries", - "cursor" - ], - "properties": { - "name": { - "type": "string" - }, - "isPaginated": { - "type": "boolean" - }, - "entries": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UnifiedSearchResultEntry" - } - }, - "cursor": { - "nullable": true, - "oneOf": [ - { - "type": "integer", - "format": "int64" - }, - { - "type": "string" - } - ] - } - } - }, - "UnifiedSearchResultEntry": { - "type": "object", - "required": [ - "thumbnailUrl", - "title", - "subline", - "resourceUrl", - "icon", - "rounded", - "attributes" - ], - "properties": { - "thumbnailUrl": { - "type": "string" - }, - "title": { - "type": "string" - }, - "subline": { - "type": "string" - }, - "resourceUrl": { - "type": "string" - }, - "icon": { - "type": "string" - }, - "rounded": { - "type": "boolean" - }, - "attributes": { - "type": "array", - "items": { - "type": "string" - } - } - } - }, - "CommentsCapabilities": { - "type": "object", - "required": [ - "files" - ], - "properties": { - "files": { - "type": "object", - "required": [ - "comments" - ], - "properties": { - "comments": { - "type": "boolean" - } - } - } - } - }, - "DavCapabilities": { - "type": "object", - "required": [ - "dav" - ], - "properties": { - "dav": { - "type": "object", - "required": [ - "chunking" - ], - "properties": { - "chunking": { - "type": "string" - }, - "bulkupload": { - "type": "string" - } - } - } - } - }, - "FilesCapabilities": { - "type": "object", - "required": [ - "files" - ], - "properties": { - "files": { - "type": "object", - "required": [ - "bigfilechunking", - "blacklisted_files", - "directEditing" - ], - "properties": { - "bigfilechunking": { - "type": "boolean" - }, - "blacklisted_files": { - "type": "array", - "items": { - "type": "object" + }, + "Collection": { + "type": "object", + "required": [ + "id", + "name", + "resources" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64" + }, + "name": { + "type": "string" + }, + "resources": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Resource" + } + } + } + }, + "ContactsAction": { + "type": "object", + "required": [ + "title", + "icon", + "hyperlink", + "appId" + ], + "properties": { + "title": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "hyperlink": { + "type": "string" + }, + "appId": { + "type": "string" + } } - }, - "directEditing": { + }, + "LoginFlowV2": { "type": "object", "required": [ - "url", - "etag", - "supportsFileId" + "poll", + "login" ], "properties": { - "url": { - "type": "string" - }, - "etag": { - "type": "string" - }, - "supportsFileId": { - "type": "boolean" - } + "poll": { + "type": "object", + "required": [ + "token", + "endpoint" + ], + "properties": { + "token": { + "type": "string" + }, + "endpoint": { + "type": "string" + } + } + }, + "login": { + "type": "string" + } } - } - } - } - } - }, - "FilesSharingCapabilities": { - "type": "object", - "required": [ - "files_sharing" - ], - "properties": { - "files_sharing": { - "type": "object", - "required": [ - "api_enabled", - "public", - "user", - "resharing", - "federation", - "sharee" - ], - "properties": { - "api_enabled": { - "type": "boolean" - }, - "public": { + }, + "LoginFlowV2Credentials": { "type": "object", "required": [ - "enabled" + "server", + "loginName", + "appPassword" ], "properties": { - "enabled": { - "type": "boolean" - }, - "password": { - "type": "object", - "required": [ - "enforced", - "askForOptionalPassword" - ], - "properties": { - "enforced": { - "type": "boolean" - }, - "askForOptionalPassword": { - "type": "boolean" - } - } - }, - "multiple_links": { - "type": "boolean" - }, - "expire_date": { - "type": "object", - "required": [ - "enabled" - ], - "properties": { - "enabled": { - "type": "boolean" - }, - "days": { - "type": "integer", - "format": "int64" - }, - "enforced": { - "type": "boolean" - } - } - }, - "expire_date_internal": { - "type": "object", - "required": [ - "enabled" - ], - "properties": { - "enabled": { - "type": "boolean" - }, - "days": { - "type": "integer", - "format": "int64" - }, - "enforced": { - "type": "boolean" - } - } - }, - "expire_date_remote": { - "type": "object", - "required": [ - "enabled" - ], - "properties": { - "enabled": { + "server": { + "type": "string" + }, + "loginName": { + "type": "string" + }, + "appPassword": { + "type": "string" + } + } + }, + "NavigationEntry": { + "type": "object", + "required": [ + "id", + "order", + "href", + "icon", + "type", + "name", + "active", + "classes", + "unread" + ], + "properties": { + "id": { + "type": "string" + }, + "order": { + "oneOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "string" + } + ] + }, + "href": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "type": { + "type": "string" + }, + "name": { + "type": "string" + }, + "active": { "type": "boolean" - }, - "days": { + }, + "classes": { + "type": "string" + }, + "unread": { "type": "integer", "format": "int64" - }, - "enforced": { - "type": "boolean" - } - } - }, - "send_mail": { - "type": "boolean" - }, - "upload": { - "type": "boolean" - }, - "upload_files_drop": { - "type": "boolean" - } + } + } + }, + "OCSMeta": { + "type": "object", + "required": [ + "status", + "statuscode" + ], + "properties": { + "status": { + "type": "string" + }, + "statuscode": { + "type": "integer" + }, + "message": { + "type": "string" + }, + "totalitems": { + "type": "string" + }, + "itemsperpage": { + "type": "string" + } } - }, - "user": { + }, + "OpenGraphObject": { + "type": "object", + "required": [ + "id", + "name", + "description", + "thumb", + "link" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string", + "nullable": true + }, + "thumb": { + "type": "string", + "nullable": true + }, + "link": { + "type": "string" + } + } + }, + "Reference": { "type": "object", "required": [ - "send_mail" + "richObjectType", + "richObject", + "openGraphObject", + "accessible" ], "properties": { - "send_mail": { - "type": "boolean" - }, - "expire_date": { - "type": "object", - "required": [ - "enabled" - ], - "properties": { - "enabled": { + "richObjectType": { + "type": "string" + }, + "richObject": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "openGraphObject": { + "$ref": "#/components/schemas/OpenGraphObject" + }, + "accessible": { "type": "boolean" - } } - } } - }, - "resharing": { - "type": "boolean" - }, - "group_sharing": { - "type": "boolean" - }, - "group": { + }, + "ReferenceProvider": { + "type": "object", + "required": [ + "id", + "title", + "icon_url", + "order", + "search_providers_ids" + ], + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "icon_url": { + "type": "string" + }, + "order": { + "type": "integer", + "format": "int64" + }, + "search_providers_ids": { + "type": "array", + "nullable": true, + "items": { + "type": "string" + } + } + } + }, + "Resource": { "type": "object", "required": [ - "enabled" + "richObjectType", + "richObject", + "openGraphObject", + "accessible" ], "properties": { - "enabled": { - "type": "boolean" - }, - "expire_date": { - "type": "object", - "required": [ - "enabled" - ], - "properties": { - "enabled": { + "richObjectType": { + "type": "string" + }, + "richObject": { + "type": "object", + "additionalProperties": { + "type": "object" + } + }, + "openGraphObject": { + "$ref": "#/components/schemas/OpenGraphObject" + }, + "accessible": { "type": "boolean" - } } - } } - }, - "default_permissions": { - "type": "integer", - "format": "int64" - }, - "federation": { + }, + "Status": { "type": "object", "required": [ - "outgoing", - "incoming", - "expire_date", - "expire_date_supported" + "installed", + "maintenance", + "needsDbUpgrade", + "version", + "versionstring", + "edition", + "productname", + "extendedSupport" ], "properties": { - "outgoing": { - "type": "boolean" - }, - "incoming": { - "type": "boolean" - }, - "expire_date": { - "type": "object", - "required": [ - "enabled" - ], - "properties": { - "enabled": { + "installed": { + "type": "boolean" + }, + "maintenance": { + "type": "boolean" + }, + "needsDbUpgrade": { "type": "boolean" - } - } - }, - "expire_date_supported": { - "type": "object", - "required": [ - "enabled" - ], - "properties": { - "enabled": { + }, + "version": { + "type": "string" + }, + "versionstring": { + "type": "string" + }, + "edition": { + "type": "string" + }, + "productname": { + "type": "string" + }, + "extendedSupport": { "type": "boolean" - } } - } } - }, - "sharee": { + }, + "TextProcessingTask": { "type": "object", "required": [ - "query_lookup_default", - "always_show_unique" + "id", + "type", + "status", + "userId", + "appId", + "input", + "output", + "identifier", + "completionExpectedAt" ], "properties": { - "query_lookup_default": { - "type": "boolean" - }, - "always_show_unique": { - "type": "boolean" - } - } - } - } - } - } - }, - "FilesTrashbinCapabilities": { - "type": "object", - "required": [ - "files" - ], - "properties": { - "files": { - "type": "object", - "required": [ - "undelete" - ], - "properties": { - "undelete": { - "type": "boolean" - } - } - } - } - }, - "FilesVersionsCapabilities": { - "type": "object", - "required": [ - "files" - ], - "properties": { - "files": { - "type": "object", - "required": [ - "versioning", - "version_labeling", - "version_deletion" - ], - "properties": { - "versioning": { - "type": "boolean" - }, - "version_labeling": { - "type": "boolean" - }, - "version_deletion": { - "type": "boolean" - } - } - } - } - }, - "NotificationsCapabilities": { - "type": "object", - "required": [ - "notifications" - ], - "properties": { - "notifications": { - "type": "object", - "required": [ - "ocs-endpoints", - "push", - "admin-notifications" - ], - "properties": { - "ocs-endpoints": { - "type": "array", - "items": { - "type": "string" - } - }, - "push": { - "type": "array", - "items": { - "type": "string" + "id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "type": { + "type": "string" + }, + "status": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1, + 2, + 3, + 4 + ] + }, + "userId": { + "type": "string", + "nullable": true + }, + "appId": { + "type": "string" + }, + "input": { + "type": "string" + }, + "output": { + "type": "string", + "nullable": true + }, + "identifier": { + "type": "string" + }, + "completionExpectedAt": { + "type": "integer", + "format": "int64", + "nullable": true + } } - }, - "admin-notifications": { - "type": "array", - "items": { - "type": "string" + }, + "TextToImageTask": { + "type": "object", + "required": [ + "id", + "status", + "userId", + "appId", + "input", + "identifier", + "numberOfImages", + "completionExpectedAt" + ], + "properties": { + "id": { + "type": "integer", + "format": "int64", + "nullable": true + }, + "status": { + "type": "integer", + "format": "int64", + "enum": [ + 0, + 1, + 2, + 3, + 4 + ] + }, + "userId": { + "type": "string", + "nullable": true + }, + "appId": { + "type": "string" + }, + "input": { + "type": "string" + }, + "identifier": { + "type": "string", + "nullable": true + }, + "numberOfImages": { + "type": "integer", + "format": "int64" + }, + "completionExpectedAt": { + "type": "integer", + "format": "int64", + "nullable": true + } } - } - } - } - } - }, - "ProvisioningApiCapabilities": { - "type": "object", - "required": [ - "provisioning_api" - ], - "properties": { - "provisioning_api": { - "type": "object", - "required": [ - "version", - "AccountPropertyScopesVersion", - "AccountPropertyScopesFederatedEnabled", - "AccountPropertyScopesPublishedEnabled" - ], - "properties": { - "version": { - "type": "string" - }, - "AccountPropertyScopesVersion": { - "type": "integer", - "format": "int64" - }, - "AccountPropertyScopesFederatedEnabled": { - "type": "boolean" - }, - "AccountPropertyScopesPublishedEnabled": { - "type": "boolean" - } - } - } - } - }, - "SharebymailCapabilities": { - "oneOf": [ - { - "type": "object", - "required": [ - "files_sharing" - ], - "properties": { - "files_sharing": { + }, + "UnifiedSearchProvider": { "type": "object", "required": [ - "sharebymail" + "id", + "name", + "order" ], "properties": { - "sharebymail": { - "type": "object", - "required": [ - "enabled", - "send_password_by_mail", - "upload_files_drop", - "password", - "expire_date" - ], - "properties": { - "enabled": { - "type": "boolean" - }, - "send_password_by_mail": { - "type": "boolean" - }, - "upload_files_drop": { - "type": "object", - "required": [ - "enabled" - ], - "properties": { - "enabled": { - "type": "boolean" - } + "id": { + "type": "string" + }, + "appId": { + "type": "string" + }, + "name": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "order": { + "type": "integer", + "format": "int64" + }, + "triggers": { + "type": "array", + "items": { + "type": "string" } - }, - "password": { - "type": "object", - "required": [ - "enabled", - "enforced" - ], - "properties": { - "enabled": { - "type": "boolean" - }, - "enforced": { - "type": "boolean" - } - } - }, - "expire_date": { + }, + "filters": { "type": "object", - "required": [ - "enabled", - "enforced" - ], - "properties": { - "enabled": { - "type": "boolean" - }, - "enforced": { - "type": "boolean" - } + "additionalProperties": { + "type": "string" } - } + }, + "inAppSearch": { + "type": "boolean" } - } } - } - } - }, - { - "type": "array", - "maxLength": 0 - } - ] - }, - "SpreedPublicCapabilities": { - "oneOf": [ - { - "type": "object", - "required": [ - "spreed" - ], - "properties": { - "spreed": { + }, + "UnifiedSearchResult": { "type": "object", "required": [ - "features", - "config", - "version" + "name", + "isPaginated", + "entries", + "cursor" ], "properties": { - "features": { - "type": "array", - "items": { - "type": "string" - } - }, - "config": { - "type": "object", - "required": [ - "attachments", - "call", - "chat", - "conversations", - "previews", - "signaling" - ], - "properties": { - "attachments": { - "type": "object", - "required": [ - "allowed" - ], - "properties": { - "allowed": { - "type": "boolean" - }, - "folder": { - "type": "string" - } + "name": { + "type": "string" + }, + "isPaginated": { + "type": "boolean" + }, + "entries": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnifiedSearchResultEntry" } - }, - "call": { - "type": "object", + }, + "cursor": { + "nullable": true, + "oneOf": [ + { + "type": "integer", + "format": "int64" + }, + { + "type": "string" + } + ] + } + } + }, + "UnifiedSearchResultEntry": { + "type": "object", + "required": [ + "thumbnailUrl", + "title", + "subline", + "resourceUrl", + "icon", + "rounded", + "attributes" + ], + "properties": { + "thumbnailUrl": { + "type": "string" + }, + "title": { + "type": "string" + }, + "subline": { + "type": "string" + }, + "resourceUrl": { + "type": "string" + }, + "icon": { + "type": "string" + }, + "rounded": { + "type": "boolean" + }, + "attributes": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "CommentsCapabilities": { + "type": "object", + "required": [ + "files" + ], + "properties": { + "files": { + "type": "object", "required": [ - "enabled", - "breakout-rooms", - "recording" + "comments" ], "properties": { - "enabled": { - "type": "boolean" - }, - "breakout-rooms": { - "type": "boolean" - }, - "recording": { - "type": "boolean" - }, - "recording-consent": { - "type": "integer", - "format": "int64" - }, - "supported-reactions": { - "type": "array", - "items": { - "type": "string" + "comments": { + "type": "boolean" } - }, - "predefined-backgrounds": { - "type": "array", - "items": { - "type": "string" - } - }, - "can-upload-background": { - "type": "boolean" - }, - "sip-enabled": { - "type": "boolean" - }, - "sip-dialout-enabled": { - "type": "boolean" - }, - "can-enable-sip": { - "type": "boolean" - } - } - }, - "chat": { + } + } + } + }, + "DavCapabilities": { + "type": "object", + "required": [ + "dav" + ], + "properties": { + "dav": { "type": "object", "required": [ - "max-length", - "read-privacy" + "chunking" ], "properties": { - "max-length": { - "type": "integer", - "format": "int64" - }, - "read-privacy": { - "type": "integer", - "format": "int64" - }, - "has-translation-providers": { - "type": "boolean" - }, - "typing-privacy": { - "type": "integer", - "format": "int64" - }, - "translations": { - "type": "array", - "items": { - "type": "string" + "chunking": { + "type": "string" + }, + "bulkupload": { + "type": "string" } - } } - }, - "conversations": { + } + } + }, + "FilesCapabilities": { + "type": "object", + "required": [ + "files" + ], + "properties": { + "files": { "type": "object", "required": [ - "can-create" + "bigfilechunking", + "blacklisted_files", + "directEditing" ], "properties": { - "can-create": { - "type": "boolean" - } + "bigfilechunking": { + "type": "boolean" + }, + "blacklisted_files": { + "type": "array", + "items": { + "type": "object" + } + }, + "directEditing": { + "type": "object", + "required": [ + "url", + "etag", + "supportsFileId" + ], + "properties": { + "url": { + "type": "string" + }, + "etag": { + "type": "string" + }, + "supportsFileId": { + "type": "boolean" + } + } + } } - }, - "previews": { + } + } + }, + "FilesSharingCapabilities": { + "type": "object", + "required": [ + "files_sharing" + ], + "properties": { + "files_sharing": { "type": "object", "required": [ - "max-gif-size" + "api_enabled", + "public", + "user", + "resharing", + "federation", + "sharee" ], "properties": { - "max-gif-size": { - "type": "integer", - "format": "int64" - } + "api_enabled": { + "type": "boolean" + }, + "public": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "password": { + "type": "object", + "required": [ + "enforced", + "askForOptionalPassword" + ], + "properties": { + "enforced": { + "type": "boolean" + }, + "askForOptionalPassword": { + "type": "boolean" + } + } + }, + "multiple_links": { + "type": "boolean" + }, + "expire_date": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "days": { + "type": "integer", + "format": "int64" + }, + "enforced": { + "type": "boolean" + } + } + }, + "expire_date_internal": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "days": { + "type": "integer", + "format": "int64" + }, + "enforced": { + "type": "boolean" + } + } + }, + "expire_date_remote": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "days": { + "type": "integer", + "format": "int64" + }, + "enforced": { + "type": "boolean" + } + } + }, + "send_mail": { + "type": "boolean" + }, + "upload": { + "type": "boolean" + }, + "upload_files_drop": { + "type": "boolean" + } + } + }, + "user": { + "type": "object", + "required": [ + "send_mail" + ], + "properties": { + "send_mail": { + "type": "boolean" + }, + "expire_date": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + } + } + }, + "resharing": { + "type": "boolean" + }, + "group_sharing": { + "type": "boolean" + }, + "group": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "expire_date": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + } + } + }, + "default_permissions": { + "type": "integer", + "format": "int64" + }, + "federation": { + "type": "object", + "required": [ + "outgoing", + "incoming", + "expire_date", + "expire_date_supported" + ], + "properties": { + "outgoing": { + "type": "boolean" + }, + "incoming": { + "type": "boolean" + }, + "expire_date": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "expire_date_supported": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + } + } + }, + "sharee": { + "type": "object", + "required": [ + "query_lookup_default", + "always_show_unique" + ], + "properties": { + "query_lookup_default": { + "type": "boolean" + }, + "always_show_unique": { + "type": "boolean" + } + } + } } - }, - "signaling": { + } + } + }, + "FilesTrashbinCapabilities": { + "type": "object", + "required": [ + "files" + ], + "properties": { + "files": { "type": "object", "required": [ - "session-ping-limit" + "undelete" ], "properties": { - "session-ping-limit": { - "type": "integer", - "format": "int64" - }, - "hello-v2-token-key": { - "type": "string" - } + "undelete": { + "type": "boolean" + } } - } } - }, - "version": { - "type": "string" - } - } - } - } - }, - { - "type": "array", - "maxLength": 0 - } - ] - }, - "ThemingPublicCapabilities": { - "type": "object", - "required": [ - "theming" - ], - "properties": { - "theming": { - "type": "object", - "required": [ - "name", - "url", - "slogan", - "color", - "color-text", - "color-element", - "color-element-bright", - "color-element-dark", - "logo", - "background", - "background-plain", - "background-default", - "logoheader", - "favicon" - ], - "properties": { - "name": { - "type": "string" - }, - "url": { - "type": "string" - }, - "slogan": { - "type": "string" - }, - "color": { - "type": "string" - }, - "color-text": { - "type": "string" - }, - "color-element": { - "type": "string" - }, - "color-element-bright": { - "type": "string" - }, - "color-element-dark": { - "type": "string" - }, - "logo": { - "type": "string" - }, - "background": { - "type": "string" - }, - "background-plain": { - "type": "boolean" - }, - "background-default": { - "type": "boolean" - }, - "logoheader": { - "type": "string" - }, - "favicon": { - "type": "string" - } - } - } - } - }, - "UserStatusCapabilities": { - "type": "object", - "required": [ - "user_status" - ], - "properties": { - "user_status": { - "type": "object", - "required": [ - "enabled", - "supports_emoji" - ], - "properties": { - "enabled": { - "type": "boolean" - }, - "restore": { - "type": "boolean" - }, - "supports_emoji": { - "type": "boolean" - } - } - } - } - }, - "WeatherStatusCapabilities": { - "type": "object", - "required": [ - "weather_status" - ], - "properties": { - "weather_status": { - "type": "object", - "required": [ - "enabled" - ], - "properties": { - "enabled": { - "type": "boolean" - } - } - } - } - }, - "NotesCapabilities": { - "type": "object", - "required": [ - "notes" - ], - "properties": { - "notes": { - "type": "object", - "properties": { - "api_version": { - "type": "array", - "items": { - "type": "string" - } - }, - "version": { - "type": "string" - } - } - } - } - } - } - }, - "paths": { - "/index.php/avatar/{userId}/{size}/dark": { - "get": { - "operationId": "avatar-get-avatar-dark", - "summary": "Get the dark avatar", - "tags": [ - "avatar" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "userId", - "in": "path", - "description": "ID of the user", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "path", - "description": "Size of the avatar", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "200": { - "description": "Avatar returned", - "headers": { - "X-NC-IsCustomAvatar": { - "schema": { - "type": "integer", - "format": "int64" - } - } - }, - "content": { - "*/*": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "404": { - "description": "Avatar not found", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/index.php/avatar/{userId}/{size}": { - "get": { - "operationId": "avatar-get-avatar", - "summary": "Get the avatar", - "tags": [ - "avatar" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "userId", - "in": "path", - "description": "ID of the user", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "path", - "description": "Size of the avatar", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - } - ], - "responses": { - "200": { - "description": "Avatar returned", - "headers": { - "X-NC-IsCustomAvatar": { - "schema": { - "type": "integer", - "format": "int64" } - } }, - "content": { - "*/*": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "404": { - "description": "Avatar not found", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/index.php/avatar/guest/{guestName}/{size}/dark": { - "get": { - "operationId": "guest_avatar-get-avatar-dark", - "summary": "Returns a dark guest avatar image response", - "tags": [ - "guest_avatar" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "guestName", - "in": "path", - "description": "The guest name, e.g. \"Albert\"", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "path", - "description": "The desired avatar size, e.g. 64 for 64x64px", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Custom avatar returned", - "content": { - "*/*": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "201": { - "description": "Avatar returned", - "content": { - "*/*": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "500": { - "description": "" - } - } - } - }, - "/index.php/avatar/guest/{guestName}/{size}": { - "get": { - "operationId": "guest_avatar-get-avatar", - "summary": "Returns a guest avatar image response", - "tags": [ - "guest_avatar" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "darkTheme", - "in": "query", - "description": "Return dark avatar", - "schema": { - "type": "integer", - "nullable": true, - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "guestName", - "in": "path", - "description": "The guest name, e.g. \"Albert\"", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "size", - "in": "path", - "description": "The desired avatar size, e.g. 64 for 64x64px", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Custom avatar returned", - "content": { - "*/*": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "201": { - "description": "Avatar returned", - "content": { - "*/*": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "500": { - "description": "" - } - } - } - }, - "/index.php/login/v2/poll": { - "post": { - "operationId": "client_flow_login_v2-poll", - "summary": "Poll the login flow credentials", - "tags": [ - "client_flow_login_v2" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "token", - "in": "query", - "description": "Token of the flow", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Login flow credentials returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginFlowV2Credentials" - } - } - } - }, - "404": { - "description": "Login flow not found or completed", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/index.php/login/v2": { - "post": { - "operationId": "client_flow_login_v2-init", - "summary": "Init a login flow", - "tags": [ - "client_flow_login_v2" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "responses": { - "200": { - "description": "Login flow init returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/LoginFlowV2" - } - } - } - } - } - } - }, - "/index.php/core/preview": { - "get": { - "operationId": "preview-get-preview-by-file-id", - "summary": "Get a preview by file ID", - "tags": [ - "preview" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "fileId", - "in": "query", - "description": "ID of the file", - "schema": { - "type": "integer", - "format": "int64", - "default": -1 - } - }, - { - "name": "x", - "in": "query", - "description": "Width of the preview", - "schema": { - "type": "integer", - "format": "int64", - "default": 32 - } - }, - { - "name": "y", - "in": "query", - "description": "Height of the preview", - "schema": { - "type": "integer", - "format": "int64", - "default": 32 - } - }, - { - "name": "a", - "in": "query", - "description": "Whether to not crop the preview", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "forceIcon", - "in": "query", - "description": "Force returning an icon", - "schema": { - "type": "integer", - "default": 1, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "mode", - "in": "query", - "description": "How to crop the image", - "schema": { - "type": "string", - "default": "fill" - } - }, - { - "name": "mimeFallback", - "in": "query", - "description": "Whether to fallback to the mime icon if no preview is available", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - } - ], - "responses": { - "200": { - "description": "Preview returned", - "content": { - "*/*": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "400": { - "description": "Getting preview is not possible", - "content": { - "application/json": { - "schema": {} - } - } - }, - "403": { - "description": "Getting preview is not allowed", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "Preview not found", - "content": { - "application/json": { - "schema": {} - } - } - }, - "303": { - "description": "Redirect to the mime icon url if mimeFallback is true", - "headers": { - "Location": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/index.php/core/preview.png": { - "get": { - "operationId": "preview-get-preview", - "summary": "Get a preview by file path", - "tags": [ - "preview" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "file", - "in": "query", - "description": "Path of the file", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "x", - "in": "query", - "description": "Width of the preview", - "schema": { - "type": "integer", - "format": "int64", - "default": 32 - } - }, - { - "name": "y", - "in": "query", - "description": "Height of the preview", - "schema": { - "type": "integer", - "format": "int64", - "default": 32 - } - }, - { - "name": "a", - "in": "query", - "description": "Whether to not crop the preview", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "forceIcon", - "in": "query", - "description": "Force returning an icon", - "schema": { - "type": "integer", - "default": 1, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "mode", - "in": "query", - "description": "How to crop the image", - "schema": { - "type": "string", - "default": "fill" - } - }, - { - "name": "mimeFallback", - "in": "query", - "description": "Whether to fallback to the mime icon if no preview is available", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - } - ], - "responses": { - "200": { - "description": "Preview returned", - "content": { - "*/*": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "400": { - "description": "Getting preview is not possible", - "content": { - "application/json": { - "schema": {} - } - } - }, - "403": { - "description": "Getting preview is not allowed", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "Preview not found", - "content": { - "application/json": { - "schema": {} - } - } - }, - "303": { - "description": "Redirect to the mime icon url if mimeFallback is true", - "headers": { - "Location": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/index.php/core/references/preview/{referenceId}": { - "get": { - "operationId": "reference-preview", - "summary": "Get a preview for a reference", - "tags": [ - "reference" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "referenceId", - "in": "path", - "description": "the reference cache key", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Preview returned", - "content": { - "*/*": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "404": { - "description": "Reference not found", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/index.php/core/wipe/check": { - "post": { - "operationId": "wipe-check-wipe", - "summary": "Check if the device should be wiped", - "tags": [ - "wipe" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "token", - "in": "query", - "description": "App password", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Device should be wiped", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "wipe" - ], - "properties": { - "wipe": { - "type": "boolean" + "FilesVersionsCapabilities": { + "type": "object", + "required": [ + "files" + ], + "properties": { + "files": { + "type": "object", + "required": [ + "versioning", + "version_labeling", + "version_deletion" + ], + "properties": { + "versioning": { + "type": "boolean" + }, + "version_labeling": { + "type": "boolean" + }, + "version_deletion": { + "type": "boolean" + } + } } - } - } - } - } - }, - "404": { - "description": "Device should not be wiped", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/index.php/core/wipe/success": { - "post": { - "operationId": "wipe-wipe-done", - "summary": "Finish the wipe", - "tags": [ - "wipe" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "token", - "in": "query", - "description": "App password", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Wipe finished successfully", - "content": { - "application/json": { - "schema": {} - } - } - }, - "404": { - "description": "Device should not be wiped", - "content": { - "application/json": { - "schema": {} - } - } - } - } - } - }, - "/index.php/ocm-provider": { - "get": { - "operationId": "ocm-discovery", - "summary": "generate a OCMProvider with local data and send it as DataResponse. This replaces the old PHP file ocm-provider/index.php", - "tags": [ - "ocm" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "responses": { - "200": { - "description": "OCM Provider details returned", - "headers": { - "X-NEXTCLOUD-OCM-PROVIDERS": { - "schema": { - "type": "boolean", - "enum": [ - true - ] } - } }, - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "enabled", - "apiVersion", - "endPoint", - "resourceTypes" - ], - "properties": { - "enabled": { - "type": "boolean" - }, - "apiVersion": { - "type": "string" - }, - "endPoint": { - "type": "string" - }, - "resourceTypes": { - "type": "array", - "items": { + "NotificationsCapabilities": { + "type": "object", + "required": [ + "notifications" + ], + "properties": { + "notifications": { "type": "object", "required": [ - "name", - "shareTypes", - "protocols" + "ocs-endpoints", + "push", + "admin-notifications" ], "properties": { - "name": { - "type": "string" - }, - "shareTypes": { - "type": "array", - "items": { - "type": "string" - } - }, - "protocols": { - "type": "object", - "required": [ - "webdav" - ], - "properties": { - "webdav": { - "type": "string" - } + "ocs-endpoints": { + "type": "array", + "items": { + "type": "string" + } + }, + "push": { + "type": "array", + "items": { + "type": "string" + } + }, + "admin-notifications": { + "type": "array", + "items": { + "type": "string" + } } - } } - } } - } } - } - } - }, - "500": { - "description": "OCM not supported", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + }, + "ProvisioningApiCapabilities": { + "type": "object", + "required": [ + "provisioning_api" + ], + "properties": { + "provisioning_api": { + "type": "object", + "required": [ + "version", + "AccountPropertyScopesVersion", + "AccountPropertyScopesFederatedEnabled", + "AccountPropertyScopesPublishedEnabled" + ], + "properties": { + "version": { + "type": "string" + }, + "AccountPropertyScopesVersion": { + "type": "integer", + "format": "int64" + }, + "AccountPropertyScopesFederatedEnabled": { + "type": "boolean" + }, + "AccountPropertyScopesPublishedEnabled": { + "type": "boolean" + } + } + } + } + }, + "SharebymailCapabilities": { + "oneOf": [ + { + "type": "object", + "required": [ + "files_sharing" + ], + "properties": { + "files_sharing": { + "type": "object", + "required": [ + "sharebymail" + ], + "properties": { + "sharebymail": { + "type": "object", + "required": [ + "enabled", + "send_password_by_mail", + "upload_files_drop", + "password", + "expire_date" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "send_password_by_mail": { + "type": "boolean" + }, + "upload_files_drop": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + }, + "password": { + "type": "object", + "required": [ + "enabled", + "enforced" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "enforced": { + "type": "boolean" + } + } + }, + "expire_date": { + "type": "object", + "required": [ + "enabled", + "enforced" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "enforced": { + "type": "boolean" + } + } + } + } + } + } + } + } + }, + { + "type": "array", + "maxLength": 0 + } + ] + }, + "SpreedPublicCapabilities": { + "oneOf": [ + { + "type": "object", + "required": [ + "spreed" + ], + "properties": { + "spreed": { + "type": "object", + "required": [ + "features", + "config", + "version" + ], + "properties": { + "features": { + "type": "array", + "items": { + "type": "string" + } + }, + "config": { + "type": "object", + "required": [ + "attachments", + "call", + "chat", + "conversations", + "previews", + "signaling" + ], + "properties": { + "attachments": { + "type": "object", + "required": [ + "allowed" + ], + "properties": { + "allowed": { + "type": "boolean" + }, + "folder": { + "type": "string" + } + } + }, + "call": { + "type": "object", + "required": [ + "enabled", + "breakout-rooms", + "recording" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "breakout-rooms": { + "type": "boolean" + }, + "recording": { + "type": "boolean" + }, + "recording-consent": { + "type": "integer", + "format": "int64" + }, + "supported-reactions": { + "type": "array", + "items": { + "type": "string" + } + }, + "predefined-backgrounds": { + "type": "array", + "items": { + "type": "string" + } + }, + "can-upload-background": { + "type": "boolean" + }, + "sip-enabled": { + "type": "boolean" + }, + "sip-dialout-enabled": { + "type": "boolean" + }, + "can-enable-sip": { + "type": "boolean" + } + } + }, + "chat": { + "type": "object", + "required": [ + "max-length", + "read-privacy" + ], + "properties": { + "max-length": { + "type": "integer", + "format": "int64" + }, + "read-privacy": { + "type": "integer", + "format": "int64" + }, + "has-translation-providers": { + "type": "boolean" + }, + "typing-privacy": { + "type": "integer", + "format": "int64" + }, + "translations": { + "type": "array", + "items": { + "type": "string" + } + } + } + }, + "conversations": { + "type": "object", + "required": [ + "can-create" + ], + "properties": { + "can-create": { + "type": "boolean" + } + } + }, + "previews": { + "type": "object", + "required": [ + "max-gif-size" + ], + "properties": { + "max-gif-size": { + "type": "integer", + "format": "int64" + } + } + }, + "signaling": { + "type": "object", + "required": [ + "session-ping-limit" + ], + "properties": { + "session-ping-limit": { + "type": "integer", + "format": "int64" + }, + "hello-v2-token-key": { + "type": "string" + } + } + } + } + }, + "version": { + "type": "string" + } + } + } + } + }, + { + "type": "array", + "maxLength": 0 + } + ] + }, + "ThemingPublicCapabilities": { + "type": "object", + "required": [ + "theming" + ], + "properties": { + "theming": { + "type": "object", + "required": [ + "name", + "url", + "slogan", + "color", + "color-text", + "color-element", + "color-element-bright", + "color-element-dark", + "logo", + "background", + "background-plain", + "background-default", + "logoheader", + "favicon" + ], + "properties": { + "name": { + "type": "string" + }, + "url": { + "type": "string" + }, + "slogan": { + "type": "string" + }, + "color": { + "type": "string" + }, + "color-text": { + "type": "string" + }, + "color-element": { + "type": "string" + }, + "color-element-bright": { + "type": "string" + }, + "color-element-dark": { + "type": "string" + }, + "logo": { + "type": "string" + }, + "background": { + "type": "string" + }, + "background-plain": { + "type": "boolean" + }, + "background-default": { + "type": "boolean" + }, + "logoheader": { + "type": "string" + }, + "favicon": { + "type": "string" + } + } + } + } + }, + "UserStatusCapabilities": { + "type": "object", + "required": [ + "user_status" + ], + "properties": { + "user_status": { + "type": "object", + "required": [ + "enabled", + "supports_emoji" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "restore": { + "type": "boolean" + }, + "supports_emoji": { + "type": "boolean" + } + } + } + } + }, + "WeatherStatusCapabilities": { + "type": "object", + "required": [ + "weather_status" + ], + "properties": { + "weather_status": { + "type": "object", + "required": [ + "enabled" + ], + "properties": { + "enabled": { + "type": "boolean" + } + } + } + } + }, + "NotesCapabilities": { + "type": "object", + "required": [ + "notes" + ], + "properties": { + "notes": { + "type": "object", + "properties": { + "api_version": { + "type": "array", + "items": { + "type": "string" + } + }, + "version": { + "type": "string" + } + } } - } } - } } - } } - } }, - "/ocs/v2.php/cloud/capabilities": { - "get": { - "operationId": "ocs-get-capabilities", - "summary": "Get the capabilities", - "tags": [ - "ocs" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true + "paths": { + "/index.php/avatar/{userId}/{size}/dark": { + "get": { + "operationId": "avatar-get-avatar-dark", + "summary": "Get the dark avatar", + "tags": [ + "avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "path", + "description": "Size of the avatar", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "Avatar returned", + "headers": { + "X-NC-IsCustomAvatar": { + "schema": { + "type": "integer", + "format": "int64" + } + } + }, + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Avatar not found", + "content": { + "application/json": { + "schema": {} + } + } + } + } } - } - ], - "responses": { - "200": { - "description": "Capabilities returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" + }, + "/index.php/avatar/{userId}/{size}": { + "get": { + "operationId": "avatar-get-avatar", + "summary": "Get the avatar", + "tags": [ + "avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "path", + "description": "Size of the avatar", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + } + ], + "responses": { + "200": { + "description": "Avatar returned", + "headers": { + "X-NC-IsCustomAvatar": { + "schema": { + "type": "integer", + "format": "int64" + } + } }, - "data": { - "type": "object", - "required": [ - "version", - "capabilities" - ], - "properties": { - "version": { - "type": "object", - "required": [ - "major", - "minor", - "micro", - "string", - "edition", - "extendedSupport" - ], - "properties": { - "major": { - "type": "integer", - "format": "int64" - }, - "minor": { - "type": "integer", - "format": "int64" - }, - "micro": { - "type": "integer", - "format": "int64" - }, - "string": { - "type": "string" - }, - "edition": { - "type": "string" - }, - "extendedSupport": { - "type": "boolean" + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" } - } - }, - "capabilities": { - "type": "object", - "additionalProperties": { - "type": "object" - }, - "anyOf": [ - { - "$ref": "#/components/schemas/CommentsCapabilities" - }, - { - "$ref": "#/components/schemas/DavCapabilities" - }, - { - "$ref": "#/components/schemas/FilesCapabilities" - }, - { - "$ref": "#/components/schemas/FilesSharingCapabilities" - }, - { - "$ref": "#/components/schemas/FilesTrashbinCapabilities" - }, - { - "$ref": "#/components/schemas/FilesVersionsCapabilities" - }, - { - "$ref": "#/components/schemas/NotificationsCapabilities" - }, - { - "$ref": "#/components/schemas/ProvisioningApiCapabilities" - }, - { - "$ref": "#/components/schemas/SharebymailCapabilities" - }, - { - "$ref": "#/components/schemas/SpreedPublicCapabilities" - }, - { - "$ref": "#/components/schemas/ThemingPublicCapabilities" - }, - { - "$ref": "#/components/schemas/UserStatusCapabilities" - }, - { - "$ref": "#/components/schemas/WeatherStatusCapabilities" - }, - { - "$ref": "#/components/schemas/NotesCapabilities" + } + } + }, + "404": { + "description": "Avatar not found", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/index.php/avatar/guest/{guestName}/{size}/dark": { + "get": { + "operationId": "guest_avatar-get-avatar-dark", + "summary": "Returns a dark guest avatar image response", + "tags": [ + "guest_avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "guestName", + "in": "path", + "description": "The guest name, e.g. \"Albert\"", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "path", + "description": "The desired avatar size, e.g. 64 for 64x64px", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Custom avatar returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "201": { + "description": "Avatar returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "500": { + "description": "" + } + } + } + }, + "/index.php/avatar/guest/{guestName}/{size}": { + "get": { + "operationId": "guest_avatar-get-avatar", + "summary": "Returns a guest avatar image response", + "tags": [ + "guest_avatar" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "darkTheme", + "in": "query", + "description": "Return dark avatar", + "schema": { + "type": "integer", + "nullable": true, + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "guestName", + "in": "path", + "description": "The guest name, e.g. \"Albert\"", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "size", + "in": "path", + "description": "The desired avatar size, e.g. 64 for 64x64px", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Custom avatar returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "201": { + "description": "Avatar returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "500": { + "description": "" + } + } + } + }, + "/index.php/login/v2/poll": { + "post": { + "operationId": "client_flow_login_v2-poll", + "summary": "Poll the login flow credentials", + "tags": [ + "client_flow_login_v2" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "token", + "in": "query", + "description": "Token of the flow", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Login flow credentials returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginFlowV2Credentials" + } + } + } + }, + "404": { + "description": "Login flow not found or completed", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/index.php/login/v2": { + "post": { + "operationId": "client_flow_login_v2-init", + "summary": "Init a login flow", + "tags": [ + "client_flow_login_v2" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "responses": { + "200": { + "description": "Login flow init returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/LoginFlowV2" + } + } + } + } + } + } + }, + "/index.php/core/preview": { + "get": { + "operationId": "preview-get-preview-by-file-id", + "summary": "Get a preview by file ID", + "tags": [ + "preview" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "fileId", + "in": "query", + "description": "ID of the file", + "schema": { + "type": "integer", + "format": "int64", + "default": -1 + } + }, + { + "name": "x", + "in": "query", + "description": "Width of the preview", + "schema": { + "type": "integer", + "format": "int64", + "default": 32 + } + }, + { + "name": "y", + "in": "query", + "description": "Height of the preview", + "schema": { + "type": "integer", + "format": "int64", + "default": 32 + } + }, + { + "name": "a", + "in": "query", + "description": "Whether to not crop the preview", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "forceIcon", + "in": "query", + "description": "Force returning an icon", + "schema": { + "type": "integer", + "default": 1, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "mode", + "in": "query", + "description": "How to crop the image", + "schema": { + "type": "string", + "default": "fill" + } + }, + { + "name": "mimeFallback", + "in": "query", + "description": "Whether to fallback to the mime icon if no preview is available", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + } + ], + "responses": { + "200": { + "description": "Preview returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Getting preview is not possible", + "content": { + "application/json": { + "schema": {} + } + } + }, + "403": { + "description": "Getting preview is not allowed", + "content": { + "application/json": { + "schema": {} + } + } + }, + "404": { + "description": "Preview not found", + "content": { + "application/json": { + "schema": {} + } + } + }, + "303": { + "description": "Redirect to the mime icon url if mimeFallback is true", + "headers": { + "Location": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/index.php/core/preview.png": { + "get": { + "operationId": "preview-get-preview", + "summary": "Get a preview by file path", + "tags": [ + "preview" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "file", + "in": "query", + "description": "Path of the file", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "x", + "in": "query", + "description": "Width of the preview", + "schema": { + "type": "integer", + "format": "int64", + "default": 32 + } + }, + { + "name": "y", + "in": "query", + "description": "Height of the preview", + "schema": { + "type": "integer", + "format": "int64", + "default": 32 + } + }, + { + "name": "a", + "in": "query", + "description": "Whether to not crop the preview", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "forceIcon", + "in": "query", + "description": "Force returning an icon", + "schema": { + "type": "integer", + "default": 1, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "mode", + "in": "query", + "description": "How to crop the image", + "schema": { + "type": "string", + "default": "fill" + } + }, + { + "name": "mimeFallback", + "in": "query", + "description": "Whether to fallback to the mime icon if no preview is available", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + } + ], + "responses": { + "200": { + "description": "Preview returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "400": { + "description": "Getting preview is not possible", + "content": { + "application/json": { + "schema": {} + } + } + }, + "403": { + "description": "Getting preview is not allowed", + "content": { + "application/json": { + "schema": {} + } + } + }, + "404": { + "description": "Preview not found", + "content": { + "application/json": { + "schema": {} + } + } + }, + "303": { + "description": "Redirect to the mime icon url if mimeFallback is true", + "headers": { + "Location": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/index.php/core/references/preview/{referenceId}": { + "get": { + "operationId": "reference-preview", + "summary": "Get a preview for a reference", + "tags": [ + "reference" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "referenceId", + "in": "path", + "description": "the reference cache key", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Preview returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } + } + } + }, + "404": { + "description": "Reference not found", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/index.php/core/wipe/check": { + "post": { + "operationId": "wipe-check-wipe", + "summary": "Check if the device should be wiped", + "tags": [ + "wipe" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "token", + "in": "query", + "description": "App password", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Device should be wiped", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "wipe" + ], + "properties": { + "wipe": { + "type": "boolean" + } + } + } + } + } + }, + "404": { + "description": "Device should not be wiped", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/index.php/core/wipe/success": { + "post": { + "operationId": "wipe-wipe-done", + "summary": "Finish the wipe", + "tags": [ + "wipe" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "token", + "in": "query", + "description": "App password", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Wipe finished successfully", + "content": { + "application/json": { + "schema": {} + } + } + }, + "404": { + "description": "Device should not be wiped", + "content": { + "application/json": { + "schema": {} + } + } + } + } + } + }, + "/index.php/ocm-provider": { + "get": { + "operationId": "ocm-discovery", + "summary": "generate a OCMProvider with local data and send it as DataResponse. This replaces the old PHP file ocm-provider/index.php", + "tags": [ + "ocm" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "responses": { + "200": { + "description": "OCM Provider details returned", + "headers": { + "X-NEXTCLOUD-OCM-PROVIDERS": { + "schema": { + "type": "boolean", + "enum": [ + true + ] + } + } + }, + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "enabled", + "apiVersion", + "endPoint", + "resourceTypes" + ], + "properties": { + "enabled": { + "type": "boolean" + }, + "apiVersion": { + "type": "string" + }, + "endPoint": { + "type": "string" + }, + "resourceTypes": { + "type": "array", + "items": { + "type": "object", + "required": [ + "name", + "shareTypes", + "protocols" + ], + "properties": { + "name": { + "type": "string" + }, + "shareTypes": { + "type": "array", + "items": { + "type": "string" + } + }, + "protocols": { + "type": "object", + "required": [ + "webdav" + ], + "properties": { + "webdav": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + }, + "500": { + "description": "OCM not supported", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/cloud/capabilities": { + "get": { + "operationId": "ocs-get-capabilities", + "summary": "Get the capabilities", + "tags": [ + "ocs" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Capabilities returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "version", + "capabilities" + ], + "properties": { + "version": { + "type": "object", + "required": [ + "major", + "minor", + "micro", + "string", + "edition", + "extendedSupport" + ], + "properties": { + "major": { + "type": "integer", + "format": "int64" + }, + "minor": { + "type": "integer", + "format": "int64" + }, + "micro": { + "type": "integer", + "format": "int64" + }, + "string": { + "type": "string" + }, + "edition": { + "type": "string" + }, + "extendedSupport": { + "type": "boolean" + } + } + }, + "capabilities": { + "type": "object", + "additionalProperties": { + "type": "object" + }, + "anyOf": [ + { + "$ref": "#/components/schemas/CommentsCapabilities" + }, + { + "$ref": "#/components/schemas/DavCapabilities" + }, + { + "$ref": "#/components/schemas/FilesCapabilities" + }, + { + "$ref": "#/components/schemas/FilesSharingCapabilities" + }, + { + "$ref": "#/components/schemas/FilesTrashbinCapabilities" + }, + { + "$ref": "#/components/schemas/FilesVersionsCapabilities" + }, + { + "$ref": "#/components/schemas/NotificationsCapabilities" + }, + { + "$ref": "#/components/schemas/ProvisioningApiCapabilities" + }, + { + "$ref": "#/components/schemas/SharebymailCapabilities" + }, + { + "$ref": "#/components/schemas/SpreedPublicCapabilities" + }, + { + "$ref": "#/components/schemas/ThemingPublicCapabilities" + }, + { + "$ref": "#/components/schemas/UserStatusCapabilities" + }, + { + "$ref": "#/components/schemas/WeatherStatusCapabilities" + }, + { + "$ref": "#/components/schemas/NotesCapabilities" + } + ] + } + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/navigation/apps": { + "get": { + "operationId": "navigation-get-apps-navigation", + "summary": "Get the apps navigation", + "tags": [ + "navigation" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "absolute", + "in": "query", + "description": "Rewrite URLs to absolute ones", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Apps navigation returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NavigationEntry" + } + } + } + } + } + } + } + } + }, + "304": { + "description": "No apps navigation changed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/navigation/settings": { + "get": { + "operationId": "navigation-get-settings-navigation", + "summary": "Get the settings navigation", + "tags": [ + "navigation" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "absolute", + "in": "query", + "description": "Rewrite URLs to absolute ones", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Apps navigation returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/NavigationEntry" + } + } + } + } + } + } + } + } + }, + "304": { + "description": "No apps navigation changed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/autocomplete/get": { + "get": { + "operationId": "auto_complete-get", + "summary": "Autocomplete a query", + "tags": [ + "auto_complete" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "search", + "in": "query", + "description": "Text to search for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "itemType", + "in": "query", + "description": "Type of the items to search for", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "itemId", + "in": "query", + "description": "ID of the items to search for", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "sorter", + "in": "query", + "description": "can be piped, top prio first, e.g.: \"commenters|share-recipients\"", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "shareTypes[]", + "in": "query", + "description": "Types of shares to search for", + "schema": { + "type": "array", + "items": { + "type": "integer", + "format": "int64" + } + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum number of results to return", + "schema": { + "type": "integer", + "format": "int64", + "default": 10 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Autocomplete results returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/AutocompleteResult" + } + } + } + } + } + } + } + } + } + } + } + }, + "/ocs/v2.php/core/whatsnew": { + "get": { + "operationId": "whats_new-get", + "summary": "Get the changes", + "tags": [ + "whats_new" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Changes returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "changelogURL", + "product", + "version" + ], + "properties": { + "changelogURL": { + "type": "string" + }, + "product": { + "type": "string" + }, + "version": { + "type": "string" + }, + "whatsNew": { + "type": "object", + "required": [ + "regular", + "admin" + ], + "properties": { + "regular": { + "type": "array", + "items": { + "type": "string" + } + }, + "admin": { + "type": "array", + "items": { + "type": "string" + } + } + } + } + } + } + } + } + } + } + } + } + }, + "204": { + "description": "No changes", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } + } + }, + "post": { + "operationId": "whats_new-dismiss", + "summary": "Dismiss the changes", + "tags": [ + "whats_new" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "version", + "in": "query", + "description": "Version to dismiss the changes for", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Changes dismissed", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + } + } + } + }, + "/ocs/v2.php/core/getapppassword": { + "get": { + "operationId": "app_password-get-app-password", + "summary": "Create app password", + "tags": [ + "app_password" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "App password returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "apppassword" + ], + "properties": { + "apppassword": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Creating app password is not allowed", + "content": { + "text/plain": { + "schema": { + "type": "string" } - ] } - } } - } } - } } - } } - } - } - } - }, - "/ocs/v2.php/core/navigation/apps": { - "get": { - "operationId": "navigation-get-apps-navigation", - "summary": "Get the apps navigation", - "tags": [ - "navigation" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "absolute", - "in": "query", - "description": "Rewrite URLs to absolute ones", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Apps navigation returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NavigationEntry" - } - } - } + }, + "/ocs/v2.php/core/apppassword/rotate": { + "post": { + "operationId": "app_password-rotate-app-password", + "summary": "Rotate app password", + "tags": [ + "app_password" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] } - } - } - } - } - }, - "304": { - "description": "No apps navigation changed", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/core/navigation/settings": { - "get": { - "operationId": "navigation-get-settings-navigation", - "summary": "Get the settings navigation", - "tags": [ - "navigation" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "absolute", - "in": "query", - "description": "Rewrite URLs to absolute ones", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Apps navigation returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/NavigationEntry" - } + ], + "responses": { + "200": { + "description": "App password returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "apppassword" + ], + "properties": { + "apppassword": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "403": { + "description": "Rotating app password is not allowed", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } } - } } - } } - } } - }, - "304": { - "description": "No apps navigation changed", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + }, + "/ocs/v2.php/core/apppassword": { + "delete": { + "operationId": "app_password-delete-app-password", + "summary": "Delete app password", + "tags": [ + "app_password" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/core/autocomplete/get": { - "get": { - "operationId": "auto_complete-get", - "summary": "Autocomplete a query", - "tags": [ - "auto_complete" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "search", - "in": "query", - "description": "Text to search for", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "itemType", - "in": "query", - "description": "Type of the items to search for", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "itemId", - "in": "query", - "description": "ID of the items to search for", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "sorter", - "in": "query", - "description": "can be piped, top prio first, e.g.: \"commenters|share-recipients\"", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "shareTypes[]", - "in": "query", - "description": "Types of shares to search for", - "schema": { - "type": "array", - "items": { - "type": "integer", - "format": "int64" - } - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum number of results to return", - "schema": { - "type": "integer", - "format": "int64", - "default": 10 - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Autocomplete results returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AutocompleteResult" - } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true } - } } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/core/whatsnew": { - "get": { - "operationId": "whats_new-get", - "summary": "Get the changes", - "tags": [ - "whats_new" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Changes returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "changelogURL", - "product", - "version" - ], - "properties": { - "changelogURL": { - "type": "string" - }, - "product": { - "type": "string" - }, - "version": { - "type": "string" - }, - "whatsNew": { - "type": "object", - "required": [ - "regular", - "admin" - ], - "properties": { - "regular": { - "type": "array", - "items": { - "type": "string" - } - }, - "admin": { - "type": "array", - "items": { + ], + "responses": { + "200": { + "description": "App password deleted successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "403": { + "description": "Deleting app password is not allowed", + "content": { + "text/plain": { + "schema": { "type": "string" - } } - } } - } } - } } - } } - } } - }, - "204": { - "description": "No changes", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + }, + "/ocs/v2.php/hovercard/v1/{userId}": { + "get": { + "operationId": "hover_card-get-user", + "summary": "Get the user details for a hovercard", + "tags": [ + "hover_card" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] } - } - } - } - } - } - } - }, - "post": { - "operationId": "whats_new-dismiss", - "summary": "Dismiss the changes", - "tags": [ - "whats_new" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "version", - "in": "query", - "description": "Version to dismiss the changes for", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Changes dismissed", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + ], + "parameters": [ + { + "name": "userId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/ocs/v2.php/core/getapppassword": { - "get": { - "operationId": "app_password-get-app-password", - "summary": "Create app password", - "tags": [ - "app_password" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "App password returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "apppassword" - ], - "properties": { - "apppassword": { - "type": "string" + ], + "responses": { + "200": { + "description": "User details returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "userId", + "displayName", + "actions" + ], + "properties": { + "userId": { + "type": "string" + }, + "displayName": { + "type": "string" + }, + "actions": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ContactsAction" + } + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "User not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } } - } } - } } - } } - } } - }, - "403": { - "description": "Creating app password is not allowed", - "content": { - "text/plain": { - "schema": { - "type": "string" + }, + "/ocs/v2.php/collaboration/resources/collections/search/{filter}": { + "get": { + "operationId": "collaboration_resources-search-collections", + "summary": "Search for collections", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "filter", + "in": "path", + "description": "Filter collections", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Collections returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Collection" + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Collection not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } } - } } - } - } - } - }, - "/ocs/v2.php/core/apppassword/rotate": { - "post": { - "operationId": "app_password-rotate-app-password", - "summary": "Rotate app password", - "tags": [ - "app_password" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "App password returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "apppassword" - ], - "properties": { - "apppassword": { - "type": "string" + }, + "/ocs/v2.php/collaboration/resources/collections/{collectionId}": { + "get": { + "operationId": "collaboration_resources-list-collection", + "summary": "Get a collection", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "collectionId", + "in": "path", + "description": "ID of the collection", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Collection returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Collection" + } + } + } + } + } + } + } + }, + "404": { + "description": "Collection not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } } - } } - } } - } } - } - } - }, - "403": { - "description": "Rotating app password is not allowed", - "content": { - "text/plain": { - "schema": { - "type": "string" + }, + "put": { + "operationId": "collaboration_resources-rename-collection", + "summary": "Rename a collection", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "collectionName", + "in": "query", + "description": "New name", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionId", + "in": "path", + "description": "ID of the collection", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Collection returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Collection" + } + } + } + } + } + } + } + }, + "404": { + "description": "Collection not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } } - } - } - } - } - } - }, - "/ocs/v2.php/core/apppassword": { - "delete": { - "operationId": "app_password-delete-app-password", - "summary": "Delete app password", - "tags": [ - "app_password" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "App password deleted successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + }, + "post": { + "operationId": "collaboration_resources-add-resource", + "summary": "Add a resource to a collection", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "resourceType", + "in": "query", + "description": "Name of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resourceId", + "in": "query", + "description": "ID of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionId", + "in": "path", + "description": "ID of the collection", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Collection returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Collection" + } + } + } + } + } + } + } + }, + "404": { + "description": "Collection not found or resource inaccessible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } } - } } - } - } - }, - "403": { - "description": "Deleting app password is not allowed", - "content": { - "text/plain": { - "schema": { - "type": "string" + }, + "delete": { + "operationId": "collaboration_resources-remove-resource", + "summary": "Remove a resource from a collection", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "resourceType", + "in": "query", + "description": "Name of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resourceId", + "in": "query", + "description": "ID of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "collectionId", + "in": "path", + "description": "ID of the collection", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Collection returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Collection" + } + } + } + } + } + } + } + }, + "404": { + "description": "Collection or resource not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + } } - } - } - } - } - } - }, - "/ocs/v2.php/hovercard/v1/{userId}": { - "get": { - "operationId": "hover_card-get-user", - "summary": "Get the user details for a hovercard", - "tags": [ - "hover_card" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "userId", - "in": "path", - "description": "ID of the user", - "required": true, - "schema": { - "type": "string" } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "User details returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "userId", - "displayName", - "actions" - ], - "properties": { - "userId": { - "type": "string" - }, - "displayName": { - "type": "string" - }, - "actions": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ContactsAction" - } + }, + "/ocs/v2.php/collaboration/resources/{resourceType}/{resourceId}": { + "get": { + "operationId": "collaboration_resources-get-collections-by-resource", + "summary": "Get collections by resource", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "resourceType", + "in": "path", + "description": "Type of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resourceId", + "in": "path", + "description": "ID of the resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Collections returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/Collection" + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Resource not accessible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } } - } } - } } - } } - } } - }, - "404": { - "description": "User not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + }, + "/ocs/v2.php/collaboration/resources/{baseResourceType}/{baseResourceId}": { + "post": { + "operationId": "collaboration_resources-create-collection-on-resource", + "summary": "Create a collection for a resource", + "tags": [ + "collaboration_resources" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/collaboration/resources/collections/search/{filter}": { - "get": { - "operationId": "collaboration_resources-search-collections", - "summary": "Search for collections", - "tags": [ - "collaboration_resources" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "filter", - "in": "path", - "description": "Filter collections", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Collections returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Collection" - } + ], + "parameters": [ + { + "name": "name", + "in": "query", + "description": "Name of the collection", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "baseResourceType", + "in": "path", + "description": "Type of the base resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "baseResourceId", + "in": "path", + "description": "ID of the base resource", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true } - } - } - } - } - } - } - }, - "404": { - "description": "Collection not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/collaboration/resources/collections/{collectionId}": { - "get": { - "operationId": "collaboration_resources-list-collection", - "summary": "Get a collection", - "tags": [ - "collaboration_resources" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "collectionId", - "in": "path", - "description": "ID of the collection", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Collection returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "$ref": "#/components/schemas/Collection" + ], + "responses": { + "200": { + "description": "Collection returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/Collection" + } + } + } + } + } + } + } + }, + "400": { + "description": "Creating collection is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "404": { + "description": "Resource inaccessible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } } - } } - } } - } } - }, - "404": { - "description": "Collection not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + }, + "/ocs/v2.php/references/resolve": { + "get": { + "operationId": "reference_api-resolve-one", + "summary": "Resolve a reference", + "tags": [ + "reference_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + ], + "parameters": [ + { + "name": "reference", + "in": "query", + "description": "Reference to resolve", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } } - } - } - } - } - } - } - }, - "put": { - "operationId": "collaboration_resources-rename-collection", - "summary": "Rename a collection", - "tags": [ - "collaboration_resources" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "collectionName", - "in": "query", - "description": "New name", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "collectionId", - "in": "path", - "description": "ID of the collection", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Collection returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "$ref": "#/components/schemas/Collection" + ], + "responses": { + "200": { + "description": "Reference returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "references" + ], + "properties": { + "references": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Reference", + "nullable": true + } + } + } + } + } + } + } + } + } } - } } - } } - } - } - }, - "404": { - "description": "Collection not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + }, + "post": { + "operationId": "reference_api-resolve", + "summary": "Resolve multiple references", + "tags": [ + "reference_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + ], + "parameters": [ + { + "name": "references[]", + "in": "query", + "description": "References to resolve", + "required": true, + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum amount of references to resolve", + "schema": { + "type": "integer", + "format": "int64", + "default": 1 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } } - } - } - } - } - } - } - }, - "post": { - "operationId": "collaboration_resources-add-resource", - "summary": "Add a resource to a collection", - "tags": [ - "collaboration_resources" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "resourceType", - "in": "query", - "description": "Name of the resource", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "resourceId", - "in": "query", - "description": "ID of the resource", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "collectionId", - "in": "path", - "description": "ID of the collection", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Collection returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "$ref": "#/components/schemas/Collection" + ], + "responses": { + "200": { + "description": "References returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "references" + ], + "properties": { + "references": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Reference", + "nullable": true + } + } + } + } + } + } + } + } + } } - } } - } } - } } - }, - "404": { - "description": "Collection not found or resource inaccessible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + }, + "/ocs/v2.php/references/extract": { + "post": { + "operationId": "reference_api-extract", + "summary": "Extract references from a text", + "tags": [ + "reference_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + ], + "parameters": [ + { + "name": "text", + "in": "query", + "description": "Text to extract from", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "resolve", + "in": "query", + "description": "Resolve the references", + "schema": { + "type": "integer", + "default": 0, + "enum": [ + 0, + 1 + ] + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum amount of references to extract", + "schema": { + "type": "integer", + "format": "int64", + "default": 1 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } } - } - } - } - } - } - } - }, - "delete": { - "operationId": "collaboration_resources-remove-resource", - "summary": "Remove a resource from a collection", - "tags": [ - "collaboration_resources" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "resourceType", - "in": "query", - "description": "Name of the resource", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "resourceId", - "in": "query", - "description": "ID of the resource", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "collectionId", - "in": "path", - "description": "ID of the collection", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Collection returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "$ref": "#/components/schemas/Collection" + ], + "responses": { + "200": { + "description": "References returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "references" + ], + "properties": { + "references": { + "type": "object", + "additionalProperties": { + "$ref": "#/components/schemas/Reference", + "nullable": true + } + } + } + } + } + } + } + } + } } - } } - } } - } } - }, - "404": { - "description": "Collection or resource not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + }, + "/ocs/v2.php/references/providers": { + "get": { + "operationId": "reference_api-get-providers-info", + "summary": "Get the providers", + "tags": [ + "reference_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/collaboration/resources/{resourceType}/{resourceId}": { - "get": { - "operationId": "collaboration_resources-get-collections-by-resource", - "summary": "Get collections by resource", - "tags": [ - "collaboration_resources" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "resourceType", - "in": "path", - "description": "Type of the resource", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "resourceId", - "in": "path", - "description": "ID of the resource", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Collections returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Collection" - } + ], + "responses": { + "200": { + "description": "Providers returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/ReferenceProvider" + } + } + } + } + } + } + } } - } } - } } - } } - }, - "404": { - "description": "Resource not accessible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + }, + "/ocs/v2.php/references/provider/{providerId}": { + "put": { + "operationId": "reference_api-touch-provider", + "summary": "Touch a provider", + "tags": [ + "reference_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/collaboration/resources/{baseResourceType}/{baseResourceId}": { - "post": { - "operationId": "collaboration_resources-create-collection-on-resource", - "summary": "Create a collection for a resource", - "tags": [ - "collaboration_resources" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "name", - "in": "query", - "description": "Name of the collection", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "baseResourceType", - "in": "path", - "description": "Type of the base resource", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "baseResourceId", - "in": "path", - "description": "ID of the base resource", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Collection returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "$ref": "#/components/schemas/Collection" + ], + "parameters": [ + { + "name": "timestamp", + "in": "query", + "description": "Timestamp of the last usage", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "providerId", + "in": "path", + "description": "ID of the provider", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true } - } } - } - } - } - } - }, - "400": { - "description": "Creating collection is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + ], + "responses": { + "200": { + "description": "Provider touched", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "success" + ], + "properties": { + "success": { + "type": "boolean" + } + } + } + } + } + } + } + } + } } - } } - } } - }, - "404": { - "description": "Resource inaccessible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + }, + "/ocs/v2.php/profile/{targetUserId}": { + "put": { + "operationId": "profile_api-set-visibility", + "summary": "Update the visibility of a parameter", + "tags": [ + "profile_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + ], + "parameters": [ + { + "name": "paramId", + "in": "query", + "description": "ID of the parameter", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "visibility", + "in": "query", + "description": "New visibility", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "targetUserId", + "in": "path", + "description": "ID of the user", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/references/resolve": { - "get": { - "operationId": "reference_api-resolve-one", - "summary": "Resolve a reference", - "tags": [ - "reference_api" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "reference", - "in": "query", - "description": "Reference to resolve", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Reference returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "references" - ], - "properties": { - "references": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true - } - } - } - } - } - } - } - } - } - } - } - } - }, - "post": { - "operationId": "reference_api-resolve", - "summary": "Resolve multiple references", - "tags": [ - "reference_api" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "references[]", - "in": "query", - "description": "References to resolve", - "required": true, - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum amount of references to resolve", - "schema": { - "type": "integer", - "format": "int64", - "default": 1 - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "References returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "references" - ], - "properties": { - "references": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true - } - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/references/extract": { - "post": { - "operationId": "reference_api-extract", - "summary": "Extract references from a text", - "tags": [ - "reference_api" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "text", - "in": "query", - "description": "Text to extract from", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "resolve", - "in": "query", - "description": "Resolve the references", - "schema": { - "type": "integer", - "default": 0, - "enum": [ - 0, - 1 - ] - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum amount of references to extract", - "schema": { - "type": "integer", - "format": "int64", - "default": 1 - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "References returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "references" - ], - "properties": { - "references": { - "type": "object", - "additionalProperties": { - "$ref": "#/components/schemas/Reference", - "nullable": true - } - } - } - } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/references/providers": { - "get": { - "operationId": "reference_api-get-providers-info", - "summary": "Get the providers", - "tags": [ - "reference_api" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Providers returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/ReferenceProvider" - } + ], + "responses": { + "200": { + "description": "Visibility updated successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": {} + } + } + } + } + } + } + }, + "400": { + "description": "Updating visibility is not possible", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } + } + }, + "403": { + "description": "Not allowed to edit other users visibility", + "content": { + "text/plain": { + "schema": { + "type": "string" + } + } } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/references/provider/{providerId}": { - "put": { - "operationId": "reference_api-touch-provider", - "summary": "Touch a provider", - "tags": [ - "reference_api" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "timestamp", - "in": "query", - "description": "Timestamp of the last usage", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "providerId", - "in": "path", - "description": "ID of the provider", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Provider touched", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "success" - ], - "properties": { - "success": { - "type": "boolean" + }, + "404": { + "description": "User not found", + "content": { + "text/plain": { + "schema": { + "type": "string" + } } - } } - } } - } } - } } - } - } - } - }, - "/ocs/v2.php/profile/{targetUserId}": { - "put": { - "operationId": "profile_api-set-visibility", - "summary": "Update the visibility of a parameter", - "tags": [ - "profile_api" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "paramId", - "in": "query", - "description": "ID of the parameter", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "visibility", - "in": "query", - "description": "New visibility", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "targetUserId", - "in": "path", - "description": "ID of the user", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Visibility updated successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": {} - } + }, + "/ocs/v2.php/search/providers": { + "get": { + "operationId": "unified_search-get-providers", + "summary": "Get the providers for unified search", + "tags": [ + "unified_search" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] } - } - } - } - } - }, - "400": { - "description": "Updating visibility is not possible", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "403": { - "description": "Not allowed to edit other users visibility", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - }, - "404": { - "description": "User not found", - "content": { - "text/plain": { - "schema": { - "type": "string" - } - } - } - } - } - } - }, - "/ocs/v2.php/search/providers": { - "get": { - "operationId": "unified_search-get-providers", - "summary": "Get the providers for unified search", - "tags": [ - "unified_search" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "from", - "in": "query", - "description": "the url the user is currently at", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Providers returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/UnifiedSearchProvider" - } + ], + "parameters": [ + { + "name": "from", + "in": "query", + "description": "the url the user is currently at", + "schema": { + "type": "string", + "default": "" } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/search/providers/{providerId}/search": { - "get": { - "operationId": "unified_search-search", - "summary": "Launch a search for a specific search provider.", - "description": "Additional filters are available for each provider. Send a request to /providers endpoint to list providers with their available filters.", - "tags": [ - "unified_search" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "term", - "in": "query", - "description": "Term to search", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "sortOrder", - "in": "query", - "description": "Order of entries", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "limit", - "in": "query", - "description": "Maximum amount of entries", - "schema": { - "type": "integer", - "format": "int64", - "nullable": true - } - }, - { - "name": "cursor", - "in": "query", - "description": "Offset for searching", - "schema": { - "nullable": true, - "oneOf": [ - { - "type": "integer", - "format": "int64" - }, - { - "type": "string" - } - ] - } - }, - { - "name": "from", - "in": "query", - "description": "The current user URL", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "providerId", - "in": "path", - "description": "ID of the provider", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Search entries returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "$ref": "#/components/schemas/UnifiedSearchResult" + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true } - } } - } - } - } - } - }, - "400": { - "description": "Searching is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "string" + ], + "responses": { + "200": { + "description": "Providers returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/UnifiedSearchProvider" + } + } + } + } + } + } + } } - } } - } } - } } - } - } - } - }, - "/ocs/v2.php/translation/languages": { - "get": { - "operationId": "translation_api-languages", - "summary": "Get the list of supported languages", - "tags": [ - "translation_api" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Supported languages returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "languages", - "languageDetection" - ], - "properties": { - "languages": { - "type": "array", - "items": { - "type": "object", - "required": [ - "from", - "fromLabel", - "to", - "toLabel" - ], - "properties": { - "from": { - "type": "string" - }, - "fromLabel": { - "type": "string" - }, - "to": { - "type": "string" - }, - "toLabel": { + }, + "/ocs/v2.php/search/providers/{providerId}/search": { + "get": { + "operationId": "unified_search-search", + "summary": "Launch a search for a specific search provider.", + "description": "Additional filters are available for each provider. Send a request to /providers endpoint to list providers with their available filters.", + "tags": [ + "unified_search" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "term", + "in": "query", + "description": "Term to search", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "sortOrder", + "in": "query", + "description": "Order of entries", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "limit", + "in": "query", + "description": "Maximum amount of entries", + "schema": { + "type": "integer", + "format": "int64", + "nullable": true + } + }, + { + "name": "cursor", + "in": "query", + "description": "Offset for searching", + "schema": { + "nullable": true, + "oneOf": [ + { + "type": "integer", + "format": "int64" + }, + { "type": "string" - } } - } - }, - "languageDetection": { - "type": "boolean" + ] + } + }, + { + "name": "from", + "in": "query", + "description": "The current user URL", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "providerId", + "in": "path", + "description": "ID of the provider", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Search entries returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "$ref": "#/components/schemas/UnifiedSearchResult" + } + } + } + } + } + } + } + }, + "400": { + "description": "Searching is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "string" + } + } + } + } + } } - } } - } } - } } - } - } - } - } - } - }, - "/ocs/v2.php/translation/translate": { - "post": { - "operationId": "translation_api-translate", - "summary": "Translate a text", - "tags": [ - "translation_api" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "text", - "in": "query", - "description": "Text to be translated", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "fromLanguage", - "in": "query", - "description": "Language to translate from", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "toLanguage", - "in": "query", - "description": "Language to translate to", - "required": true, - "schema": { - "type": "string" } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Translated text returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "text", - "from" - ], - "properties": { - "text": { - "type": "string" - }, - "from": { - "type": "string", - "nullable": true + }, + "/ocs/v2.php/translation/languages": { + "get": { + "operationId": "translation_api-languages", + "summary": "Get the list of supported languages", + "tags": [ + "translation_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Supported languages returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "languages", + "languageDetection" + ], + "properties": { + "languages": { + "type": "array", + "items": { + "type": "object", + "required": [ + "from", + "fromLabel", + "to", + "toLabel" + ], + "properties": { + "from": { + "type": "string" + }, + "fromLabel": { + "type": "string" + }, + "to": { + "type": "string" + }, + "toLabel": { + "type": "string" + } + } + } + }, + "languageDetection": { + "type": "boolean" + } + } + } + } + } + } + } } - } } - } } - } } - } } - }, - "400": { - "description": "Language not detected or unable to translate", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - }, - "from": { - "type": "string", - "nullable": true + }, + "/ocs/v2.php/translation/translate": { + "post": { + "operationId": "translation_api-translate", + "summary": "Translate a text", + "tags": [ + "translation_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "text", + "in": "query", + "description": "Text to be translated", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "fromLanguage", + "in": "query", + "description": "Language to translate from", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "toLanguage", + "in": "query", + "description": "Language to translate to", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Translated text returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "text", + "from" + ], + "properties": { + "text": { + "type": "string" + }, + "from": { + "type": "string", + "nullable": true + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Language not detected or unable to translate", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + }, + "from": { + "type": "string", + "nullable": true + } + } + } + } + } + } + } + } + } + }, + "412": { + "description": "Translating is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + }, + "from": { + "type": "string", + "nullable": true + } + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + }, + "from": { + "type": "string", + "nullable": true + } + } + } + } + } + } + } } - } } - } } - } } - } } - }, - "412": { - "description": "Translating is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - }, - "from": { - "type": "string", - "nullable": true + }, + "/ocs/v2.php/textprocessing/tasktypes": { + "get": { + "operationId": "text_processing_api-task-types", + "summary": "This endpoint returns all available LanguageModel task types", + "tags": [ + "text_processing_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Task types returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "types" + ], + "properties": { + "types": { + "type": "array", + "items": { + "type": "object", + "required": [ + "id", + "name", + "description" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + }, + "description": { + "type": "string" + } + } + } + } + } + } + } + } + } + } } - } } - } } - } } - } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - }, - "from": { - "type": "string", - "nullable": true + }, + "/ocs/v2.php/textprocessing/schedule": { + "post": { + "operationId": "text_processing_api-schedule", + "summary": "This endpoint allows scheduling a language model task", + "tags": [ + "text_processing_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "input", + "in": "query", + "description": "Input text", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "type", + "in": "query", + "description": "Type of the task", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "appId", + "in": "query", + "description": "ID of the app that will execute the task", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "identifier", + "in": "query", + "description": "An arbitrary identifier for the task", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Task scheduled successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "task" + ], + "properties": { + "task": { + "$ref": "#/components/schemas/TextProcessingTask" + } + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "400": { + "description": "Scheduling task is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "412": { + "description": "Scheduling task is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } } - } } - } } - } } - } } - } - } - } - }, - "/ocs/v2.php/textprocessing/tasktypes": { - "get": { - "operationId": "text_processing_api-task-types", - "summary": "This endpoint returns all available LanguageModel task types", - "tags": [ - "text_processing_api" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Task types returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "types" - ], - "properties": { - "types": { - "type": "array", - "items": { - "type": "object", - "required": [ - "id", - "name", - "description" - ], - "properties": { - "id": { - "type": "string" - }, - "name": { - "type": "string" - }, - "description": { - "type": "string" - } + }, + "/ocs/v2.php/textprocessing/task/{id}": { + "get": { + "operationId": "text_processing_api-get-task", + "summary": "This endpoint allows checking the status and results of a task. Tasks are removed 1 week after receiving their last update.", + "tags": [ + "text_processing_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The id of the task", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Task returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "task" + ], + "properties": { + "task": { + "$ref": "#/components/schemas/TextProcessingTask" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Task not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } } - } } - } } - } } - } } - } - } - } - } - } - }, - "/ocs/v2.php/textprocessing/schedule": { - "post": { - "operationId": "text_processing_api-schedule", - "summary": "This endpoint allows scheduling a language model task", - "tags": [ - "text_processing_api" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "input", - "in": "query", - "description": "Input text", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "type", - "in": "query", - "description": "Type of the task", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "appId", - "in": "query", - "description": "ID of the app that will execute the task", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "identifier", - "in": "query", - "description": "An arbitrary identifier for the task", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Task scheduled successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "task" - ], - "properties": { - "task": { - "$ref": "#/components/schemas/TextProcessingTask" + }, + "delete": { + "operationId": "text_processing_api-delete-task", + "summary": "This endpoint allows to delete a scheduled task for a user", + "tags": [ + "text_processing_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The id of the task", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Task returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "task" + ], + "properties": { + "task": { + "$ref": "#/components/schemas/TextProcessingTask" + } + } + } + } + } + } + } + } + } + }, + "404": { + "description": "Task not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } } - } } - } - } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } } - } } - } } - } } - } } - }, - "400": { - "description": "Scheduling task is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } + }, + "/ocs/v2.php/textprocessing/tasks/app/{appId}": { + "get": { + "operationId": "text_processing_api-list-tasks-by-app", + "summary": "This endpoint returns a list of tasks of a user that are related with a specific appId and optionally with an identifier", + "tags": [ + "text_processing_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "identifier", + "in": "query", + "description": "An arbitrary identifier for the task", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "appId", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true } - } } - } - } - } - } - }, - "412": { - "description": "Scheduling task is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + ], + "responses": { + "200": { + "description": "Task list returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "tasks" + ], + "properties": { + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TextProcessingTask" + } + } + } + } + } + } + } + } } - } } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/textprocessing/task/{id}": { - "get": { - "operationId": "text_processing_api-get-task", - "summary": "This endpoint allows checking the status and results of a task. Tasks are removed 1 week after receiving their last update.", - "tags": [ - "text_processing_api" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The id of the task", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Task returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "task" - ], - "properties": { - "task": { - "$ref": "#/components/schemas/TextProcessingTask" + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } } - } } - } } - } } - } } - }, - "404": { - "description": "Task not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } + }, + "/ocs/v2.php/text2image/is_available": { + "get": { + "operationId": "text_to_image_api-is-available", + "summary": "Check whether this feature is available", + "tags": [ + "text_to_image_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true } - } } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + ], + "responses": { + "200": { + "description": "Returns availability status", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "isAvailable" + ], + "properties": { + "isAvailable": { + "type": "boolean" + } + } + } + } + } + } + } } - } } - } } - } } - } - } - } - } - }, - "delete": { - "operationId": "text_processing_api-delete-task", - "summary": "This endpoint allows to delete a scheduled task for a user", - "tags": [ - "text_processing_api" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The id of the task", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true } - } - ], - "responses": { - "200": { - "description": "Task returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "task" - ], - "properties": { - "task": { - "$ref": "#/components/schemas/TextProcessingTask" - } - } + }, + "/ocs/v2.php/text2image/schedule": { + "post": { + "operationId": "text_to_image_api-schedule", + "summary": "This endpoint allows scheduling a text to image task", + "tags": [ + "text_to_image_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "input", + "in": "query", + "description": "Input text", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "appId", + "in": "query", + "description": "ID of the app that will execute the task", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "identifier", + "in": "query", + "description": "An arbitrary identifier for the task", + "schema": { + "type": "string", + "default": "" + } + }, + { + "name": "numberOfImages", + "in": "query", + "description": "The number of images to generate", + "schema": { + "type": "integer", + "format": "int64", + "default": 8 + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true } - } } - } - } - } - } - }, - "404": { - "description": "Task not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + ], + "responses": { + "200": { + "description": "Task scheduled successfully", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "task" + ], + "properties": { + "task": { + "$ref": "#/components/schemas/TextToImageTask" + } + } + } + } + } + } + } } - } } - } - } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + }, + "412": { + "description": "Scheduling task is not possible", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } } - } } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/textprocessing/tasks/app/{appId}": { - "get": { - "operationId": "text_processing_api-list-tasks-by-app", - "summary": "This endpoint returns a list of tasks of a user that are related with a specific appId and optionally with an identifier", - "tags": [ - "text_processing_api" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "identifier", - "in": "query", - "description": "An arbitrary identifier for the task", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "appId", - "in": "path", - "description": "ID of the app", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Task list returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "tasks" - ], - "properties": { - "tasks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TextProcessingTask" - } - } - } - } - } - } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } } - } } - } } - } } - } - } - } - } - } - }, - "/ocs/v2.php/text2image/is_available": { - "get": { - "operationId": "text_to_image_api-is-available", - "summary": "Check whether this feature is available", - "tags": [ - "text_to_image_api" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true } - } - ], - "responses": { - "200": { - "description": "Returns availability status", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "isAvailable" - ], - "properties": { - "isAvailable": { - "type": "boolean" - } - } + }, + "/ocs/v2.php/text2image/task/{id}": { + "get": { + "operationId": "text_to_image_api-get-task", + "summary": "This endpoint allows checking the status and results of a task. Tasks are removed 1 week after receiving their last update.", + "tags": [ + "text_to_image_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The id of the task", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true } - } } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/text2image/schedule": { - "post": { - "operationId": "text_to_image_api-schedule", - "summary": "This endpoint allows scheduling a text to image task", - "tags": [ - "text_to_image_api" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "input", - "in": "query", - "description": "Input text", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "appId", - "in": "query", - "description": "ID of the app that will execute the task", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "identifier", - "in": "query", - "description": "An arbitrary identifier for the task", - "schema": { - "type": "string", - "default": "" - } - }, - { - "name": "numberOfImages", - "in": "query", - "description": "The number of images to generate", - "schema": { - "type": "integer", - "format": "int64", - "default": 8 - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Task scheduled successfully", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "task" - ], - "properties": { - "task": { - "$ref": "#/components/schemas/TextToImageTask" + ], + "responses": { + "200": { + "description": "Task returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "task" + ], + "properties": { + "task": { + "$ref": "#/components/schemas/TextToImageTask" + } + } + } + } + } + } + } } - } } - } - } - } - } - } - } - }, - "412": { - "description": "Scheduling task is not possible", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + }, + "404": { + "description": "Task not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } } - } } - } - } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } } - } } - } } - } } - } - } - } - } - } - }, - "/ocs/v2.php/text2image/task/{id}": { - "get": { - "operationId": "text_to_image_api-get-task", - "summary": "This endpoint allows checking the status and results of a task. Tasks are removed 1 week after receiving their last update.", - "tags": [ - "text_to_image_api" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The id of the task", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Task returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "task" - ], - "properties": { - "task": { - "$ref": "#/components/schemas/TextToImageTask" - } - } + }, + "delete": { + "operationId": "text_to_image_api-delete-task", + "summary": "This endpoint allows to delete a scheduled task for a user", + "tags": [ + "text_to_image_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The id of the task", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true } - } } - } - } - } - } - }, - "404": { - "description": "Task not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + ], + "responses": { + "200": { + "description": "Task returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "task" + ], + "properties": { + "task": { + "$ref": "#/components/schemas/TextToImageTask" + } + } + } + } + } + } + } } - } } - } - } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + }, + "404": { + "description": "Task not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } } - } } - } - } - } - } - } - } - } - } - }, - "delete": { - "operationId": "text_to_image_api-delete-task", - "summary": "This endpoint allows to delete a scheduled task for a user", - "tags": [ - "text_to_image_api" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The id of the task", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Task returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "task" - ], - "properties": { - "task": { - "$ref": "#/components/schemas/TextToImageTask" + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } } - } } - } } - } } - } } - }, - "404": { - "description": "Task not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" - } - } + }, + "/ocs/v2.php/text2image/task/{id}/image/{index}": { + "get": { + "operationId": "text_to_image_api-get-image", + "summary": "This endpoint allows downloading the resulting image of a task", + "tags": [ + "text_to_image_api" + ], + "security": [ + {}, + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "id", + "in": "path", + "description": "The id of the task", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "index", + "in": "path", + "description": "The index of the image to retrieve", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true } - } } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + ], + "responses": { + "200": { + "description": "Image returned", + "content": { + "*/*": { + "schema": { + "type": "string", + "format": "binary" + } } - } } - } - } - } - } - } - } - } - } - } - }, - "/ocs/v2.php/text2image/task/{id}/image/{index}": { - "get": { - "operationId": "text_to_image_api-get-image", - "summary": "This endpoint allows downloading the resulting image of a task", - "tags": [ - "text_to_image_api" - ], - "security": [ - {}, - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "id", - "in": "path", - "description": "The id of the task", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "index", - "in": "path", - "description": "The index of the image to retrieve", - "required": true, - "schema": { - "type": "integer", - "format": "int64" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Image returned", - "content": { - "*/*": { - "schema": { - "type": "string", - "format": "binary" - } - } - } - }, - "404": { - "description": "Task or image not found", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + }, + "404": { + "description": "Task or image not found", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } } - } } - } } - } } - } } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + }, + "/ocs/v2.php/text2image/tasks/app/{appId}": { + "get": { + "operationId": "text_to_image_api-list-tasks-by-app", + "summary": "This endpoint returns a list of tasks of a user that are related with a specific appId and optionally with an identifier", + "tags": [ + "text_to_image_api" + ], + "security": [ + { + "bearer_auth": [] + }, + { + "basic_auth": [] + } + ], + "parameters": [ + { + "name": "identifier", + "in": "query", + "description": "An arbitrary identifier for the task", + "schema": { + "type": "string", + "nullable": true + } + }, + { + "name": "appId", + "in": "path", + "description": "ID of the app", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "OCS-APIRequest", + "in": "header", + "description": "Required to be true for the API request to pass", + "required": true, + "schema": { + "type": "boolean", + "default": true + } + } + ], + "responses": { + "200": { + "description": "Task list returned", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "tasks" + ], + "properties": { + "tasks": { + "type": "array", + "items": { + "$ref": "#/components/schemas/TextToImageTask" + } + } + } + } + } + } + } + } + } + } + }, + "500": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object", + "required": [ + "ocs" + ], + "properties": { + "ocs": { + "type": "object", + "required": [ + "meta", + "data" + ], + "properties": { + "meta": { + "$ref": "#/components/schemas/OCSMeta" + }, + "data": { + "type": "object", + "required": [ + "message" + ], + "properties": { + "message": { + "type": "string" + } + } + } + } + } + } + } } - } } - } } - } } - } } - } - } - } - }, - "/ocs/v2.php/text2image/tasks/app/{appId}": { - "get": { - "operationId": "text_to_image_api-list-tasks-by-app", - "summary": "This endpoint returns a list of tasks of a user that are related with a specific appId and optionally with an identifier", - "tags": [ - "text_to_image_api" - ], - "security": [ - { - "bearer_auth": [] - }, - { - "basic_auth": [] - } - ], - "parameters": [ - { - "name": "identifier", - "in": "query", - "description": "An arbitrary identifier for the task", - "schema": { - "type": "string", - "nullable": true - } - }, - { - "name": "appId", - "in": "path", - "description": "ID of the app", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "OCS-APIRequest", - "in": "header", - "description": "Required to be true for the API request to pass", - "required": true, - "schema": { - "type": "boolean", - "default": true - } - } - ], - "responses": { - "200": { - "description": "Task list returned", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "tasks" - ], - "properties": { - "tasks": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TextToImageTask" - } - } - } - } - } - } - } - } - } - } - }, - "500": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object", - "required": [ - "ocs" - ], - "properties": { - "ocs": { - "type": "object", - "required": [ - "meta", - "data" - ], - "properties": { - "meta": { - "$ref": "#/components/schemas/OCSMeta" - }, - "data": { - "type": "object", - "required": [ - "message" - ], - "properties": { - "message": { - "type": "string" + }, + "/status.php": { + "get": { + "operationId": "get-status", + "responses": { + "200": { + "description": "Status returned", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/Status" + } } - } } - } } - } } - } } - } } - } }, - "/status.php": { - "get": { - "operationId": "get-status", - "responses": { - "200": { - "description": "Status returned", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/Status" - } - } - } - } + "tags": [ + { + "name": "avatar", + "description": "Class AvatarController" + }, + { + "name": "guest_avatar", + "description": "This controller handles guest avatar requests." + }, + { + "name": "ocm", + "description": "Controller about the endpoint /ocm-provider/" } - } - } - }, - "tags": [ - { - "name": "avatar", - "description": "Class AvatarController" - }, - { - "name": "guest_avatar", - "description": "This controller handles guest avatar requests." - }, - { - "name": "ocm", - "description": "Controller about the endpoint /ocm-provider/" - } - ] + ] } diff --git a/tool/generate-specs.sh b/tool/generate-specs.sh index 0a58235e6e6..c3454b92d27 100755 --- a/tool/generate-specs.sh +++ b/tool/generate-specs.sh @@ -72,6 +72,7 @@ cp /tmp/nextcloud-neon/*.openapi.json packages/nextcloud/lib/src/api --openapi-version 3.1.0 jq \ + --indent 4 \ -s \ '.[0] * {components: {schemas: .[1].components.schemas | with_entries(select(.key | endswith("Capabilities")))}, paths: {"/ocs/v2.php/cloud/capabilities": {get: {responses: .[1].paths."/ocs/v2.php/cloud/capabilities".get.responses}}}}' \ /tmp/nextcloud-neon/core.openapi.json \ From 4473547e34079de3110e8835b5165078b50a0e19 Mon Sep 17 00:00:00 2001 From: provokateurin Date: Thu, 18 Jan 2024 21:56:19 +0100 Subject: [PATCH 3/3] chore(deps): Update openapi-extractor Signed-off-by: provokateurin --- external/nextcloud-openapi-extractor | 2 +- .../nextcloud/lib/src/api/files.openapi.dart | 46 +- .../lib/src/api/files.openapi.g.dart | 362 - .../nextcloud/lib/src/api/files.openapi.json | 59 - .../lib/src/api/files_sharing.openapi.dart | 80 +- .../lib/src/api/files_sharing.openapi.g.dart | 179 +- .../lib/src/api/files_sharing.openapi.json | 2 +- .../lib/src/api/notifications.openapi.json | 200 +- .../lib/src/api/provisioning_api.openapi.dart | 3531 ++-- .../src/api/provisioning_api.openapi.g.dart | 13482 +++++++--------- .../lib/src/api/provisioning_api.openapi.json | 2157 +-- .../nextcloud/lib/src/api/spreed.openapi.dart | 2676 +-- .../lib/src/api/spreed.openapi.g.dart | 3378 ++-- .../nextcloud/lib/src/api/spreed.openapi.json | 6138 +++---- .../lib/src/api/theming.openapi.dart | 35 - .../lib/src/api/theming.openapi.g.dart | 169 - .../lib/src/api/theming.openapi.json | 21 - tool/generate-specs.sh | 8 + 18 files changed, 14300 insertions(+), 18225 deletions(-) diff --git a/external/nextcloud-openapi-extractor b/external/nextcloud-openapi-extractor index 59b4d32993c..3b7b6ff9659 160000 --- a/external/nextcloud-openapi-extractor +++ b/external/nextcloud-openapi-extractor @@ -1 +1 @@ -Subproject commit 59b4d32993c94bd2f4200b84a9f1d1b52be25242 +Subproject commit 3b7b6ff9659a5f15612d4749e085bbcb83509049 diff --git a/packages/nextcloud/lib/src/api/files.openapi.dart b/packages/nextcloud/lib/src/api/files.openapi.dart index 069c8f493e7..66c4e3cd41d 100644 --- a/packages/nextcloud/lib/src/api/files.openapi.dart +++ b/packages/nextcloud/lib/src/api/files.openapi.dart @@ -3036,48 +3036,6 @@ abstract class Capabilities implements $CapabilitiesInterface, Built get serializer => _$capabilitiesSerializer; } -@BuiltValue(instantiable: false) -abstract interface class $TemplateInterface { - String get templateType; - String get templateId; - String get basename; - String get etag; - int get fileid; - String get filename; - int get lastmod; - String get mime; - int get size; - String get type; - bool get hasPreview; - String? get previewUrl; -} - -abstract class Template implements $TemplateInterface, Built { - /// Creates a new Template object using the builder pattern. - factory Template([void Function(TemplateBuilder)? b]) = _$Template; - - // coverage:ignore-start - const Template._(); - // coverage:ignore-end - - /// Creates a new object from the given [json] data. - /// - /// Use [toJson] to serialize it back into json. - // coverage:ignore-start - factory Template.fromJson(Map json) => _$jsonSerializers.deserializeWith(serializer, json)!; - // coverage:ignore-end - - /// Parses this object into a json like map. - /// - /// Use the fromJson factory to revive it again. - // coverage:ignore-start - Map toJson() => _$jsonSerializers.serializeWith(serializer, this)! as Map; - // coverage:ignore-end - - /// Serializer for Template. - static Serializer