feat: Add relevant attribute descriptions where available
Closes #4591
This is already really helpful for Walletobjects API, see the attached screenshot.
- [x] ~I'm still working on adding the Enums as class const, doing great progress.~
I finished my work on this PR, please have a look. I did not regenerate all the classes yet so it does not get huge for review, but I checked it locally with real walletobjects schema at least and all tests pass.
It looks like this now:
My only concern with adding description will be the size of the whole repo, the descriptions are not short and given the number of sub packages in this repo, this will really become problematic as I can see it jumping from 80Mb to 140Mb easily with this change, could you try to generate everything and see how much space it all takes on disk?
See: https://github.com/googleapis/google-api-php-client-services/issues/595
Yeah, I know the discussion, but the Resources have the full description already, I think that problem needs to be solved anyway, no matter if we add this or not.
@bshaffer can you please have a look at this? Really depend on it to develop our passbook lib further.
Thank you!
This looks great! thanks for your contribution!
Hmm, since I made changes, I can't merge unless I get another approver.
cc @Hectorhammett (or @razvanphp can make my changes and force-push to remove my commits)
Rebased on current main, fixed the tests and force pushed. Thank you for looking into this!
There is one aspect to discuss before we merge this, how to handle this?
Error: Typed property Google\Service\Walletobjects\LoyaltyObject::$classId must not be accessed before initialization
Before, we were using only doc-block for type-hint, now using native strict type hinting.
Should I make those attributes nullable like before? It should be backwards compatible, or do you have another suggestion?
LGTM!