googleapis / nodejs-storage

Node.js client for Google Cloud Storage: unified object storage for developers and enterprises, from live data serving to data analytics/ML to data archiving.
https://cloud.google.com/storage/
Apache License 2.0
888 stars 368 forks source link

fix: make CreateBucketRequest extend from BucketMetadata to allow all… #2489

Open ddelgrosso1 opened 3 weeks ago

ddelgrosso1 commented 3 weeks ago

… fields to be set

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

Fixes #2454 🦕

ddelgrosso1 commented 3 weeks ago

Making CreateBucketReqest extend BucketMetadata so that the missing fields that are accepted by https://cloud.google.com/storage/docs/json_api/v1/buckets/insert get carried over. I've left the custom fields alone as that would be a breaking change.

ddelgrosso1 commented 1 week ago

@danielduhh all tests are existing. Didn't make much sense to add unit tests to test each individual field is settable.