Handle missing and unknown query parameter #87
Unanswered
alexanderwe
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey all,
I am struggling to find a way to encode the concept of a missing parameter value and and an unknown value into an enum. I have the following scenario and URL
I want to encode it into the following enum type, covering the cases where the value is not present at all represented as optional and when the value is present capturing it correctly with either the supported value or if the value is not known put it into the
.unknown
case.So far I got the following:
What I am struggling now is how to correctly emphasise that the "parameter" is optional as well as if available the parsing should follow the
ParameterValue
enum.Does anyone know what would be the best approach to accomplish this ?
Beta Was this translation helpful? Give feedback.
All reactions