Replies: 1 comment 1 reply
|
hello @Elhebert 😀 As the package is a wrapper to digital ocean' api, it should only: receive the input, send the request, return the output. If we restrict the input with a enum and when digital ocean change the enum on their side, we have to check the docs, update the types and launch a new patch version of this package. I think it's better to keep the source of truth of this values with the digital ocean api because:
what do you think? hard coding the enum in the package would be good? there's a alternative? if we a create a enum and expose it like a raw object without restricting the type can help? i think there still some hard coded enums here because when i wrote the first lines i thought it was a good idea in the beginning |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Hi,
Thanks for the great work on this.
When I was looking at the code I noticed that the App platform type were quite generic. I was going to start a PR to add enums where the DO API clearly defines the possible options.
However I discovered that in #230 the enums were added but then were removed in #232 (specific commit: 3ac3f7d).
I was wondering what was the reasoning behind that decision? Providing the enums improves the quality of the typings and reduce the potential errors.
Thanks,
Elhebert
All reactions