invertase / dart_firebase_apis

🔥 Generated Firebase APIs for Dart. Additionally Includes private and unlisted APIs.
Apache License 2.0
29 stars 8 forks source link

Under `GoogleCloudIdentitytoolkitV1UserInfo.toJson()` should iterate over `providedUserInfo` and call `toJson()` #6

Open livtanong opened 1 year ago

livtanong commented 1 year ago

Currently calling instance.toJson() on an instance of GoogleCloudIdentitytoolkitV1UserInfo returns an almost-json data structure, with the exception of providedUserInfo, which is of type [GoogleCloudIdentitytoolkitV1ProviderUserInfo].

Instead, this this data structure's elements should be called with toJson().

e.g.

...
if (providerUserInfo != null) 'providerUserInfo': providerUserInfo!.map((provider) => provider.toJson()).toList(),
...

Context: https://github.com/invertase/dart_firebase_apis/blob/541a555ac378f7fadfdd404f5de04e6898da9523/generated/firebaseapis/lib/identitytoolkit/v1.dart#LL7081C59-L7081C75