Browse Source

fix(nextcloud): Patch oneOf bugs

Signed-off-by: jld3103 <jld3103yt@gmail.com>
pull/1121/head
jld3103 1 year ago
parent
commit
6d90d4ba9c
No known key found for this signature in database
GPG Key ID: 9062417B9E8EB7B3
  1. 4
      packages/nextcloud/lib/src/api/core.openapi.dart
  2. 2
      packages/nextcloud/lib/src/api/core.openapi.json
  3. 4
      packages/nextcloud/lib/src/api/sharebymail.openapi.dart
  4. 4
      packages/nextcloud/lib/src/api/sharebymail.openapi.json
  5. 4
      packages/nextcloud/lib/src/api/spreed.openapi.dart
  6. 2
      packages/nextcloud/lib/src/api/spreed.openapi.json
  7. 4
      packages/nextcloud/lib/src/api/user_status.openapi.dart
  8. 4
      packages/nextcloud/lib/src/api/user_status.openapi.json
  9. 7
      packages/nextcloud/lib/src/patches/sharebymail/oneof-workaround.json
  10. 5
      packages/nextcloud/lib/src/patches/spreed/oneof-workaround.json
  11. 7
      packages/nextcloud/lib/src/patches/user_status/oneof-workaround.json

4
packages/nextcloud/lib/src/api/core.openapi.dart

@ -8023,9 +8023,9 @@ abstract class SharebymailCapabilities
return;
}
final match = [b._sharebymailCapabilities0, b._builtListJsonObject].singleWhereOrNull((final x) => x != null);
final match = [b._sharebymailCapabilities0, b._builtListJsonObject].firstWhereOrNull((final x) => x != null);
if (match == null) {
throw StateError("Need exactly one of 'sharebymailCapabilities0', 'builtListJsonObject' for ${b._data}");
throw StateError("Need at least one of 'sharebymailCapabilities0', 'builtListJsonObject' for ${b._data}");
}
}
}

2
packages/nextcloud/lib/src/api/core.openapi.json

@ -1039,7 +1039,7 @@
}
},
"SharebymailCapabilities": {
"oneOf": [
"anyOf": [
{
"type": "object",
"required": [

4
packages/nextcloud/lib/src/api/sharebymail.openapi.dart

@ -250,9 +250,9 @@ abstract class Capabilities implements CapabilitiesInterface, Built<Capabilities
return;
}
final match = [b._capabilities0, b._builtListJsonObject].singleWhereOrNull((final x) => x != null);
final match = [b._capabilities0, b._builtListJsonObject].firstWhereOrNull((final x) => x != null);
if (match == null) {
throw StateError("Need exactly one of 'capabilities0', 'builtListJsonObject' for ${b._data}");
throw StateError("Need at least one of 'capabilities0', 'builtListJsonObject' for ${b._data}");
}
}
}

4
packages/nextcloud/lib/src/api/sharebymail.openapi.json

@ -22,7 +22,7 @@
},
"schemas": {
"Capabilities": {
"oneOf": [
"anyOf": [
{
"type": "object",
"required": [
@ -108,4 +108,4 @@
},
"paths": {},
"tags": []
}
}

4
packages/nextcloud/lib/src/api/spreed.openapi.dart

@ -20582,10 +20582,10 @@ abstract class RoomAddParticipantToRoomResponseApplicationJson_Ocs_Data
}
final match = [b._roomAddParticipantToRoomResponseApplicationJsonOcsData0, b._builtListJsonObject]
.singleWhereOrNull((final x) => x != null);
.firstWhereOrNull((final x) => x != null);
if (match == null) {
throw StateError(
"Need exactly one of 'roomAddParticipantToRoomResponseApplicationJsonOcsData0', 'builtListJsonObject' for ${b._data}",
"Need at least one of 'roomAddParticipantToRoomResponseApplicationJsonOcsData0', 'builtListJsonObject' for ${b._data}",
);
}
}

2
packages/nextcloud/lib/src/api/spreed.openapi.json

@ -12896,7 +12896,7 @@
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"oneOf": [
"anyOf": [
{
"type": "object",
"required": [

4
packages/nextcloud/lib/src/api/user_status.openapi.dart

@ -1827,9 +1827,9 @@ abstract class UserStatusRevertStatusResponseApplicationJson_Ocs_Data
return;
}
final match = [b._private, b._builtListJsonObject].singleWhereOrNull((final x) => x != null);
final match = [b._private, b._builtListJsonObject].firstWhereOrNull((final x) => x != null);
if (match == null) {
throw StateError("Need exactly one of 'private', 'builtListJsonObject' for ${b._data}");
throw StateError("Need at least one of 'private', 'builtListJsonObject' for ${b._data}");
}
}
}

4
packages/nextcloud/lib/src/api/user_status.openapi.json

@ -817,7 +817,7 @@
"$ref": "#/components/schemas/OCSMeta"
},
"data": {
"oneOf": [
"anyOf": [
{
"$ref": "#/components/schemas/Private"
},
@ -1057,4 +1057,4 @@
}
},
"tags": []
}
}

7
packages/nextcloud/lib/src/patches/sharebymail/oneof-workaround.json

@ -0,0 +1,7 @@
[
{
"op": "move",
"from": "/components/schemas/Capabilities/oneOf",
"path": "/components/schemas/Capabilities/anyOf"
}
]

5
packages/nextcloud/lib/src/patches/spreed/oneof-workaround.json

@ -8,5 +8,10 @@
"op": "move",
"from": "/components/schemas/Room/properties/lastMessage/oneOf",
"path": "/components/schemas/Room/properties/lastMessage/anyOf"
},
{
"op": "move",
"from": "/paths/~1ocs~1v2.php~1apps~1spreed~1api~1{apiVersion}~1room~1{token}~1participants/post/responses/200/content/application~1json/schema/properties/ocs/properties/data/oneOf",
"path": "/paths/~1ocs~1v2.php~1apps~1spreed~1api~1{apiVersion}~1room~1{token}~1participants/post/responses/200/content/application~1json/schema/properties/ocs/properties/data/anyOf"
}
]

7
packages/nextcloud/lib/src/patches/user_status/oneof-workaround.json

@ -0,0 +1,7 @@
[
{
"op": "move",
"from": "/paths/~1ocs~1v2.php~1apps~1user_status~1api~1v1~1user_status~1revert~1{messageId}/delete/responses/200/content/application~1json/schema/properties/ocs/properties/data/oneOf",
"path": "/paths/~1ocs~1v2.php~1apps~1user_status~1api~1v1~1user_status~1revert~1{messageId}/delete/responses/200/content/application~1json/schema/properties/ocs/properties/data/anyOf"
}
]
Loading…
Cancel
Save