diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.dart b/packages/nextcloud/lib/src/nextcloud.openapi.dart index aaae4c24..183dc0d3 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.dart +++ b/packages/nextcloud/lib/src/nextcloud.openapi.dart @@ -3709,16 +3709,23 @@ class NextcloudCoreLoginFlowResult { class NextcloudCoreAutocompleteResult_Ocs_Data_Status { NextcloudCoreAutocompleteResult_Ocs_Data_Status( this._data, { + this.listDynamic, this.string, }); factory NextcloudCoreAutocompleteResult_Ocs_Data_Status.fromJson(dynamic data) { + List? listDynamic; String? string; + try { + listDynamic = (data as List).map((final e) => (e as dynamic)).toList(); + } catch (_) {} try { string = (data as String); } catch (_) {} + assert([listDynamic, string].where((final x) => x != null).length == 1, 'Need oneOf for $data'); return NextcloudCoreAutocompleteResult_Ocs_Data_Status( data, + listDynamic: listDynamic, string: string, ); } @@ -3730,6 +3737,8 @@ class NextcloudCoreAutocompleteResult_Ocs_Data_Status { final dynamic _data; + final List? listDynamic; + final String? string; // coverage:ignore-start @@ -4202,74 +4211,6 @@ class NextcloudNotesSettings { static String? toJsonString(NextcloudNotesSettings? data) => data == null ? null : json.encode(data.toJson()); } -class NextcloudNotificationsNotification_SubjectRichParameters { - NextcloudNotificationsNotification_SubjectRichParameters( - this._data, { - this.mapStringDynamic, - }); - - factory NextcloudNotificationsNotification_SubjectRichParameters.fromJson(dynamic data) { - Map? mapStringDynamic; - try { - mapStringDynamic = (data as Map); - } catch (_) {} - return NextcloudNotificationsNotification_SubjectRichParameters( - data, - mapStringDynamic: mapStringDynamic, - ); - } - - // coverage:ignore-start - factory NextcloudNotificationsNotification_SubjectRichParameters.fromJsonString(String data) => - NextcloudNotificationsNotification_SubjectRichParameters.fromJson(json.decode(data)); - // coverage:ignore-end - - final dynamic _data; - - final Map? mapStringDynamic; - - // coverage:ignore-start - dynamic toJson() => _data; - // coverage:ignore-end - // coverage:ignore-start - static String toJsonString(dynamic data) => json.encode(data); - // coverage:ignore-end -} - -class NextcloudNotificationsNotification_MessageRichParameters { - NextcloudNotificationsNotification_MessageRichParameters( - this._data, { - this.mapStringDynamic, - }); - - factory NextcloudNotificationsNotification_MessageRichParameters.fromJson(dynamic data) { - Map? mapStringDynamic; - try { - mapStringDynamic = (data as Map); - } catch (_) {} - return NextcloudNotificationsNotification_MessageRichParameters( - data, - mapStringDynamic: mapStringDynamic, - ); - } - - // coverage:ignore-start - factory NextcloudNotificationsNotification_MessageRichParameters.fromJsonString(String data) => - NextcloudNotificationsNotification_MessageRichParameters.fromJson(json.decode(data)); - // coverage:ignore-end - - final dynamic _data; - - final Map? mapStringDynamic; - - // coverage:ignore-start - dynamic toJson() => _data; - // coverage:ignore-end - // coverage:ignore-start - static String toJsonString(dynamic data) => json.encode(data); - // coverage:ignore-end -} - @JsonSerializable() class NextcloudNotificationsNotificationAction { NextcloudNotificationsNotificationAction({ @@ -4357,11 +4298,11 @@ class NextcloudNotificationsNotification { final String subjectRich; - final NextcloudNotificationsNotification_SubjectRichParameters subjectRichParameters; + final dynamic subjectRichParameters; final String messageRich; - final NextcloudNotificationsNotification_MessageRichParameters messageRichParameters; + final dynamic messageRichParameters; final String icon; @@ -5330,6 +5271,7 @@ class NextcloudUserStatusPublicStatus_ClearAt { try { $int = (data as int); } catch (_) {} + assert([userStatusClearAt, $int].where((final x) => x != null).length == 1, 'Need oneOf for $data'); return NextcloudUserStatusPublicStatus_ClearAt( data, userStatusClearAt: userStatusClearAt, @@ -5392,7 +5334,7 @@ class NextcloudUserStatusPublicStatus { required this.userId, this.message, this.icon, - required this.clearAt, + this.clearAt, required this.status, }); @@ -5412,7 +5354,7 @@ class NextcloudUserStatusPublicStatus { final String? icon; - final NextcloudUserStatusPublicStatus_ClearAt clearAt; + final NextcloudUserStatusPublicStatus_ClearAt? clearAt; final NextcloudUserStatusType status; @@ -5477,16 +5419,23 @@ class NextcloudUserStatusGetPublicStatuses { class NextcloudUserStatusGetPublicStatus_Ocs_Data { NextcloudUserStatusGetPublicStatus_Ocs_Data( this._data, { + this.listDynamic, this.userStatusPublicStatus, }); factory NextcloudUserStatusGetPublicStatus_Ocs_Data.fromJson(dynamic data) { + List? listDynamic; NextcloudUserStatusPublicStatus? userStatusPublicStatus; + try { + listDynamic = (data as List).map((final e) => (e as dynamic)).toList(); + } catch (_) {} try { userStatusPublicStatus = NextcloudUserStatusPublicStatus.fromJson(data as Map); } catch (_) {} + assert([listDynamic, userStatusPublicStatus].where((final x) => x != null).length == 1, 'Need oneOf for $data'); return NextcloudUserStatusGetPublicStatus_Ocs_Data( data, + listDynamic: listDynamic, userStatusPublicStatus: userStatusPublicStatus, ); } @@ -5498,6 +5447,8 @@ class NextcloudUserStatusGetPublicStatus_Ocs_Data { final dynamic _data; + final List? listDynamic; + final NextcloudUserStatusPublicStatus? userStatusPublicStatus; // coverage:ignore-start @@ -5575,6 +5526,7 @@ class NextcloudUserStatusStatus_ClearAt { try { $int = (data as int); } catch (_) {} + assert([userStatusClearAt, $int].where((final x) => x != null).length == 1, 'Need oneOf for $data'); return NextcloudUserStatusStatus_ClearAt( data, userStatusClearAt: userStatusClearAt, @@ -5610,7 +5562,7 @@ class NextcloudUserStatusStatus { this.messageId, required this.messageIsPredefined, this.icon, - required this.clearAt, + this.clearAt, required this.status, required this.statusIsUserDefined, }); @@ -5634,7 +5586,7 @@ class NextcloudUserStatusStatus { final String? icon; - final NextcloudUserStatusStatus_ClearAt clearAt; + final NextcloudUserStatusStatus_ClearAt? clearAt; final NextcloudUserStatusType status; @@ -5649,16 +5601,23 @@ class NextcloudUserStatusStatus { class NextcloudUserStatusGetStatus_Ocs_Data { NextcloudUserStatusGetStatus_Ocs_Data( this._data, { + this.listDynamic, this.userStatusStatus, }); factory NextcloudUserStatusGetStatus_Ocs_Data.fromJson(dynamic data) { + List? listDynamic; NextcloudUserStatusStatus? userStatusStatus; + try { + listDynamic = (data as List).map((final e) => (e as dynamic)).toList(); + } catch (_) {} try { userStatusStatus = NextcloudUserStatusStatus.fromJson(data as Map); } catch (_) {} + assert([listDynamic, userStatusStatus].where((final x) => x != null).length == 1, 'Need oneOf for $data'); return NextcloudUserStatusGetStatus_Ocs_Data( data, + listDynamic: listDynamic, userStatusStatus: userStatusStatus, ); } @@ -5670,6 +5629,8 @@ class NextcloudUserStatusGetStatus_Ocs_Data { final dynamic _data; + final List? listDynamic; + final NextcloudUserStatusStatus? userStatusStatus; // coverage:ignore-start @@ -5746,6 +5707,7 @@ class NextcloudUserStatusPredefinedStatus_ClearAt { try { $int = (data as int); } catch (_) {} + assert([userStatusClearAt, $int].where((final x) => x != null).length == 1, 'Need oneOf for $data'); return NextcloudUserStatusPredefinedStatus_ClearAt( data, userStatusClearAt: userStatusClearAt, @@ -5779,7 +5741,7 @@ class NextcloudUserStatusPredefinedStatus { required this.id, required this.icon, required this.message, - required this.clearAt, + this.clearAt, }); // coverage:ignore-start @@ -5798,7 +5760,7 @@ class NextcloudUserStatusPredefinedStatus { final String message; - final NextcloudUserStatusPredefinedStatus_ClearAt clearAt; + final NextcloudUserStatusPredefinedStatus_ClearAt? clearAt; // coverage:ignore-start Map toJson() => _$NextcloudUserStatusPredefinedStatusToJson(this); diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.g.dart b/packages/nextcloud/lib/src/nextcloud.openapi.g.dart index fa737453..68edaace 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.g.dart +++ b/packages/nextcloud/lib/src/nextcloud.openapi.g.dart @@ -1555,11 +1555,9 @@ NextcloudNotificationsNotification _$NextcloudNotificationsNotificationFromJson( message: json['message'] as String, link: json['link'] as String, subjectRich: json['subjectRich'] as String, - subjectRichParameters: - NextcloudNotificationsNotification_SubjectRichParameters.fromJson(json['subjectRichParameters']), + subjectRichParameters: json['subjectRichParameters'], messageRich: json['messageRich'] as String, - messageRichParameters: - NextcloudNotificationsNotification_MessageRichParameters.fromJson(json['messageRichParameters']), + messageRichParameters: json['messageRichParameters'], icon: json['icon'] as String, actions: (json['actions'] as List) .map((e) => NextcloudNotificationsNotificationAction.fromJson(e as Map)) @@ -1579,9 +1577,9 @@ Map _$NextcloudNotificationsNotificationToJson(NextcloudNotific 'message': instance.message, 'link': instance.link, 'subjectRich': instance.subjectRich, - 'subjectRichParameters': instance.subjectRichParameters.toJson(), + 'subjectRichParameters': instance.subjectRichParameters, 'messageRich': instance.messageRich, - 'messageRichParameters': instance.messageRichParameters.toJson(), + 'messageRichParameters': instance.messageRichParameters, 'icon': instance.icon, 'actions': instance.actions.map((e) => e.toJson()).toList(), }; @@ -2215,7 +2213,7 @@ NextcloudUserStatusPublicStatus _$NextcloudUserStatusPublicStatusFromJson(Map _$NextcloudUserStatusPublicStatusToJson(NextcloudUserStatus 'userId': instance.userId, 'message': instance.message, 'icon': instance.icon, - 'clearAt': instance.clearAt.toJson(), + 'clearAt': instance.clearAt?.toJson(), 'status': _$NextcloudUserStatusTypeEnumMap[instance.status]!, }; @@ -2324,7 +2322,7 @@ NextcloudUserStatusStatus _$NextcloudUserStatusStatusFromJson(Map _$NextcloudUserStatusStatusToJson(NextcloudUserStatusStatus 'messageId': instance.messageId, 'messageIsPredefined': instance.messageIsPredefined, 'icon': instance.icon, - 'clearAt': instance.clearAt.toJson(), + 'clearAt': instance.clearAt?.toJson(), 'status': _$NextcloudUserStatusTypeEnumMap[instance.status]!, 'statusIsUserDefined': instance.statusIsUserDefined, }; @@ -2381,7 +2379,7 @@ NextcloudUserStatusPredefinedStatus _$NextcloudUserStatusPredefinedStatusFromJso id: json['id'] as String, icon: json['icon'] as String, message: json['message'] as String, - clearAt: NextcloudUserStatusPredefinedStatus_ClearAt.fromJson(json['clearAt']), + clearAt: json['clearAt'] == null ? null : NextcloudUserStatusPredefinedStatus_ClearAt.fromJson(json['clearAt']), ); } @@ -2390,7 +2388,7 @@ Map _$NextcloudUserStatusPredefinedStatusToJson(NextcloudUserSt 'id': instance.id, 'icon': instance.icon, 'message': instance.message, - 'clearAt': instance.clearAt.toJson(), + 'clearAt': instance.clearAt?.toJson(), }; NextcloudUserStatusPredefinedStatuses_Ocs _$NextcloudUserStatusPredefinedStatuses_OcsFromJson( diff --git a/packages/nextcloud/lib/src/nextcloud.openapi.json b/packages/nextcloud/lib/src/nextcloud.openapi.json index 06c77abe..fd322a15 100644 --- a/packages/nextcloud/lib/src/nextcloud.openapi.json +++ b/packages/nextcloud/lib/src/nextcloud.openapi.json @@ -942,7 +942,13 @@ "type": "string" }, "status": { - "anyOf": [ + "oneOf": [ + { + "type": "array", + "items": { + "type": "object" + } + }, { "type": "string" } @@ -1307,23 +1313,13 @@ "type": "string" }, "subjectRichParameters": { - "anyOf": [ - { - "type": "object", - "properties": {} - } - ] + "type": "object" }, "messageRich": { "type": "string" }, "messageRichParameters": { - "anyOf": [ - { - "type": "object", - "properties": {} - } - ] + "type": "object" }, "icon": { "type": "string" @@ -1741,8 +1737,7 @@ "required": [ "id", "icon", - "message", - "clearAt" + "message" ], "properties": { "id": { @@ -1755,7 +1750,7 @@ "type": "string" }, "clearAt": { - "anyOf": [ + "oneOf": [ { "$ref": "#/components/schemas/UserStatusClearAt" }, @@ -1825,7 +1820,13 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "anyOf": [ + "oneOf": [ + { + "type": "array", + "items": { + "type": "object" + } + }, { "$ref": "#/components/schemas/UserStatusStatus" } @@ -1878,7 +1879,13 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "anyOf": [ + "oneOf": [ + { + "type": "array", + "items": { + "type": "object" + } + }, { "$ref": "#/components/schemas/UserStatusPublicStatus" } @@ -1893,7 +1900,6 @@ "required": [ "userId", "messageIsPredefined", - "clearAt", "status", "statusIsUserDefined" ], @@ -1914,7 +1920,7 @@ "type": "string" }, "clearAt": { - "anyOf": [ + "oneOf": [ { "$ref": "#/components/schemas/UserStatusClearAt" }, @@ -1936,7 +1942,6 @@ "type": "object", "required": [ "userId", - "clearAt", "status" ], "properties": { @@ -1950,7 +1955,7 @@ "type": "string" }, "clearAt": { - "anyOf": [ + "oneOf": [ { "$ref": "#/components/schemas/UserStatusClearAt" }, diff --git a/packages/nextcloud/test/notifications.dart b/packages/nextcloud/test/notifications.dart index 6edf4442..e3d3a9fa 100644 --- a/packages/nextcloud/test/notifications.dart +++ b/packages/nextcloud/test/notifications.dart @@ -51,9 +51,9 @@ Future run(final DockerImage image) async { expect(response.ocs.data[0].message, '456'); expect(response.ocs.data[0].link, ''); expect(response.ocs.data[0].subjectRich, ''); - expect(response.ocs.data[0].subjectRichParameters.mapStringDynamic, null); + expect(response.ocs.data[0].subjectRichParameters, isEmpty); expect(response.ocs.data[0].messageRich, ''); - expect(response.ocs.data[0].messageRichParameters.mapStringDynamic, null); + expect(response.ocs.data[0].messageRichParameters, isEmpty); expect(response.ocs.data[0].icon, isNotEmpty); expect(response.ocs.data[0].actions, hasLength(0)); }); @@ -73,9 +73,9 @@ Future run(final DockerImage image) async { expect(response.ocs.data.message, '456'); expect(response.ocs.data.link, ''); expect(response.ocs.data.subjectRich, ''); - expect(response.ocs.data.subjectRichParameters.mapStringDynamic, null); + expect(response.ocs.data.subjectRichParameters, isEmpty); expect(response.ocs.data.messageRich, ''); - expect(response.ocs.data.messageRichParameters.mapStringDynamic, null); + expect(response.ocs.data.messageRichParameters, isEmpty); expect(response.ocs.data.icon, isNotEmpty); expect(response.ocs.data.actions, hasLength(0)); }); diff --git a/packages/nextcloud/test/user_status.dart b/packages/nextcloud/test/user_status.dart index 5d5bc8ea..f432e2d3 100644 --- a/packages/nextcloud/test/user_status.dart +++ b/packages/nextcloud/test/user_status.dart @@ -28,25 +28,24 @@ Future run(final DockerImage image) async { expect(status.message, isNotNull); } - final meeting = response.ocs.data.singleWhere((final s) => s.id == 'meeting').clearAt.userStatusClearAt!; + final meeting = response.ocs.data.singleWhere((final s) => s.id == 'meeting').clearAt!.userStatusClearAt!; expect(meeting.type, NextcloudUserStatusClearAt_Type.period); expect(meeting.time.$int, 3600); - final commuting = response.ocs.data.singleWhere((final s) => s.id == 'commuting').clearAt.userStatusClearAt!; + final commuting = response.ocs.data.singleWhere((final s) => s.id == 'commuting').clearAt!.userStatusClearAt!; expect(commuting.type, NextcloudUserStatusClearAt_Type.period); expect(commuting.time.$int, 1800); - final remoteWork = response.ocs.data.singleWhere((final s) => s.id == 'remote-work').clearAt.userStatusClearAt!; + final remoteWork = response.ocs.data.singleWhere((final s) => s.id == 'remote-work').clearAt!.userStatusClearAt!; expect(remoteWork.type, NextcloudUserStatusClearAt_Type.endOf); expect(remoteWork.time.userStatusClearAtTime0, NextcloudUserStatusClearAt_Time0.day); - final sickLeave = response.ocs.data.singleWhere((final s) => s.id == 'sick-leave').clearAt.userStatusClearAt!; + final sickLeave = response.ocs.data.singleWhere((final s) => s.id == 'sick-leave').clearAt!.userStatusClearAt!; expect(sickLeave.type, NextcloudUserStatusClearAt_Type.endOf); expect(sickLeave.time.userStatusClearAtTime0, NextcloudUserStatusClearAt_Time0.day); final vacationing = response.ocs.data.singleWhere((final s) => s.id == 'vacationing').clearAt; - expect(vacationing.userStatusClearAt, null); - expect(vacationing.$int, null); + expect(vacationing, null); }); test('Set status', () async { @@ -57,8 +56,7 @@ Future run(final DockerImage image) async { expect(response.ocs.data.userStatusStatus!.messageId, null); expect(response.ocs.data.userStatusStatus!.messageIsPredefined, false); expect(response.ocs.data.userStatusStatus!.icon, null); - expect(response.ocs.data.userStatusStatus!.clearAt.userStatusClearAt, null); - expect(response.ocs.data.userStatusStatus!.clearAt.$int, null); + expect(response.ocs.data.userStatusStatus!.clearAt, null); expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.online); expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, true); }); @@ -74,8 +72,7 @@ Future run(final DockerImage image) async { expect(response.ocs.data.userStatusStatus!.messageId, null); expect(response.ocs.data.userStatusStatus!.messageIsPredefined, false); expect(response.ocs.data.userStatusStatus!.icon, null); - expect(response.ocs.data.userStatusStatus!.clearAt.userStatusClearAt, null); - expect(response.ocs.data.userStatusStatus!.clearAt.$int, null); + expect(response.ocs.data.userStatusStatus!.clearAt, null); expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.online); expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, true); }); @@ -91,8 +88,7 @@ Future run(final DockerImage image) async { expect(response.ocs.data[0].userId, 'user1'); expect(response.ocs.data[0].message, null); expect(response.ocs.data[0].icon, null); - expect(response.ocs.data[0].clearAt.userStatusClearAt, null); - expect(response.ocs.data[0].clearAt.$int, null); + expect(response.ocs.data[0].clearAt, null); expect(response.ocs.data[0].status, NextcloudUserStatusType.online); }); @@ -104,8 +100,7 @@ Future run(final DockerImage image) async { expect(response.ocs.data.userStatusPublicStatus!.userId, 'user1'); expect(response.ocs.data.userStatusPublicStatus!.message, null); expect(response.ocs.data.userStatusPublicStatus!.icon, null); - expect(response.ocs.data.userStatusPublicStatus!.clearAt.userStatusClearAt, null); - expect(response.ocs.data.userStatusPublicStatus!.clearAt.$int, null); + expect(response.ocs.data.userStatusPublicStatus!.clearAt, null); expect(response.ocs.data.userStatusPublicStatus!.status, NextcloudUserStatusType.online); }); @@ -120,7 +115,7 @@ Future run(final DockerImage image) async { expect(response.ocs.data.userStatusStatus!.messageId, 'meeting'); expect(response.ocs.data.userStatusStatus!.messageIsPredefined, true); expect(response.ocs.data.userStatusStatus!.icon, null); - expect(response.ocs.data.userStatusStatus!.clearAt.$int, clearAt); + expect(response.ocs.data.userStatusStatus!.clearAt!.$int, clearAt); expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.offline); expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, false); }); @@ -137,7 +132,7 @@ Future run(final DockerImage image) async { expect(response.ocs.data.userStatusStatus!.messageId, null); expect(response.ocs.data.userStatusStatus!.messageIsPredefined, false); expect(response.ocs.data.userStatusStatus!.icon, '😀'); - expect(response.ocs.data.userStatusStatus!.clearAt.$int, clearAt); + expect(response.ocs.data.userStatusStatus!.clearAt!.$int, clearAt); expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.offline); expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, false); }); @@ -157,8 +152,7 @@ Future run(final DockerImage image) async { expect(response.ocs.data.userStatusStatus!.messageId, null); expect(response.ocs.data.userStatusStatus!.messageIsPredefined, false); expect(response.ocs.data.userStatusStatus!.icon, null); - expect(response.ocs.data.userStatusStatus!.clearAt.userStatusClearAt, null); - expect(response.ocs.data.userStatusStatus!.clearAt.$int, null); + expect(response.ocs.data.userStatusStatus!.clearAt, null); expect(response.ocs.data.userStatusStatus!.status, NextcloudUserStatusType.offline); expect(response.ocs.data.userStatusStatus!.statusIsUserDefined, false); }); @@ -170,8 +164,7 @@ Future run(final DockerImage image) async { expect(response.ocs.data.messageId, null); expect(response.ocs.data.messageIsPredefined, false); expect(response.ocs.data.icon, null); - expect(response.ocs.data.clearAt.userStatusClearAt, null); - expect(response.ocs.data.clearAt.$int, null); + expect(response.ocs.data.clearAt, null); expect(response.ocs.data.status, NextcloudUserStatusType.online); expect(response.ocs.data.statusIsUserDefined, false); }); diff --git a/specs/core.json b/specs/core.json index 26a49645..2fbd36a4 100644 --- a/specs/core.json +++ b/specs/core.json @@ -942,7 +942,13 @@ "type": "string" }, "status": { - "anyOf": [ + "oneOf": [ + { + "type": "array", + "items": { + "type": "object" + } + }, { "type": "string" } diff --git a/specs/notifications.json b/specs/notifications.json index 6edaf15c..4da3f6f4 100644 --- a/specs/notifications.json +++ b/specs/notifications.json @@ -128,23 +128,13 @@ "type": "string" }, "subjectRichParameters": { - "anyOf": [ - { - "type": "object", - "properties": {} - } - ] + "type": "object" }, "messageRich": { "type": "string" }, "messageRichParameters": { - "anyOf": [ - { - "type": "object", - "properties": {} - } - ] + "type": "object" }, "icon": { "type": "string" diff --git a/specs/uppush.json b/specs/uppush.json index fca67a6d..96b4188b 100644 --- a/specs/uppush.json +++ b/specs/uppush.json @@ -442,4 +442,4 @@ } ], "tags": [] -} \ No newline at end of file +} diff --git a/specs/user_status.json b/specs/user_status.json index c2fb99a5..afa3595b 100644 --- a/specs/user_status.json +++ b/specs/user_status.json @@ -108,8 +108,7 @@ "required": [ "id", "icon", - "message", - "clearAt" + "message" ], "properties": { "id": { @@ -122,7 +121,7 @@ "type": "string" }, "clearAt": { - "anyOf": [ + "oneOf": [ { "$ref": "#/components/schemas/ClearAt" }, @@ -192,7 +191,13 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "anyOf": [ + "oneOf": [ + { + "type": "array", + "items": { + "type": "object" + } + }, { "$ref": "#/components/schemas/Status" } @@ -245,7 +250,13 @@ "$ref": "#/components/schemas/OCSMeta" }, "data": { - "anyOf": [ + "oneOf": [ + { + "type": "array", + "items": { + "type": "object" + } + }, { "$ref": "#/components/schemas/PublicStatus" } @@ -260,7 +271,6 @@ "required": [ "userId", "messageIsPredefined", - "clearAt", "status", "statusIsUserDefined" ], @@ -281,7 +291,7 @@ "type": "string" }, "clearAt": { - "anyOf": [ + "oneOf": [ { "$ref": "#/components/schemas/ClearAt" }, @@ -303,7 +313,6 @@ "type": "object", "required": [ "userId", - "clearAt", "status" ], "properties": { @@ -317,7 +326,7 @@ "type": "string" }, "clearAt": { - "anyOf": [ + "oneOf": [ { "$ref": "#/components/schemas/ClearAt" },