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. 2
      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. 2
      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; 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) { 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": { "SharebymailCapabilities": {
"oneOf": [ "anyOf": [
{ {
"type": "object", "type": "object",
"required": [ "required": [

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

@ -250,9 +250,9 @@ abstract class Capabilities implements CapabilitiesInterface, Built<Capabilities
return; 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) { 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}");
} }
} }
} }

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

@ -22,7 +22,7 @@
}, },
"schemas": { "schemas": {
"Capabilities": { "Capabilities": {
"oneOf": [ "anyOf": [
{ {
"type": "object", "type": "object",
"required": [ "required": [

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

@ -20582,10 +20582,10 @@ abstract class RoomAddParticipantToRoomResponseApplicationJson_Ocs_Data
} }
final match = [b._roomAddParticipantToRoomResponseApplicationJsonOcsData0, b._builtListJsonObject] final match = [b._roomAddParticipantToRoomResponseApplicationJsonOcsData0, b._builtListJsonObject]
.singleWhereOrNull((final x) => x != null); .firstWhereOrNull((final x) => x != null);
if (match == null) { if (match == null) {
throw StateError( 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" "$ref": "#/components/schemas/OCSMeta"
}, },
"data": { "data": {
"oneOf": [ "anyOf": [
{ {
"type": "object", "type": "object",
"required": [ "required": [

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

@ -1827,9 +1827,9 @@ abstract class UserStatusRevertStatusResponseApplicationJson_Ocs_Data
return; 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) { 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}");
} }
} }
} }

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

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

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", "op": "move",
"from": "/components/schemas/Room/properties/lastMessage/oneOf", "from": "/components/schemas/Room/properties/lastMessage/oneOf",
"path": "/components/schemas/Room/properties/lastMessage/anyOf" "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