nodejs-storage icon indicating copy to clipboard operation
nodejs-storage copied to clipboard

fix: make CreateBucketRequest extend from BucketMetadata to allow all…

Open ddelgrosso1 opened this issue 1 year ago • 2 comments

… 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:

  • [ ] Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • [ ] Ensure the tests and linter pass
  • [ ] Code coverage does not decrease (if any source code was changed)
  • [ ] Appropriate docs were updated (if necessary)

Fixes #2454 🦕

ddelgrosso1 avatar Jun 14 '24 20:06 ddelgrosso1

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 avatar Jun 14 '24 20:06 ddelgrosso1

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

ddelgrosso1 avatar Jun 26 '24 13:06 ddelgrosso1