How to get default values of fields in responses which are unset? #1067
bhavitsharma
started this conversation in
General
Replies: 0 comments
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.
Uh oh!
There was an error while loading. Please reload this page.
-
For example, I have this field called as
ssh_port
which is unset in the response. Now, I want to get the default value of it but there doesn't seem to be an easy/typesafe way to extract the default value? Apologies if this is already answered somewhere, I couldn't find the answer for it.The problem is that the generated code explicitly sets the value to
Unset
class if its unset in the API response, instead of letting it be a default value.Beta Was this translation helpful? Give feedback.
All reactions