You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We can achieve this by modifying the generated code for the unknown wrapper to look something like this:
this is obviously not completely correct since if type is missing or there exists no sub-object, we'd be setting the raw invalid json as type, so we'd probably have to do a little more work (like making type optional or nullable for the unknown wrapper)
The text was updated successfully, but these errors were encountered:
I dunno - the whole 'unknown' thing is supposed to make conjure enums forward compatible, so that old code can be left running and it shouldn't break if a server starts sending new responses.
Your bad example has a random floating "some-string", which can't plausibly be emitted by anything complying with the current conjure spec.
I think changing this behaviour would be net negative, because it would make it harder to catch malformed inputs, without actually improving our forwards-comaptibility posture.
What happened?
Given:
the following fails:
What did you want to happen?
The test should pass.
We can achieve this by modifying the generated code for the unknown wrapper to look something like this:
this is obviously not completely correct since if
type
is missing or there exists no sub-object, we'd be setting the raw invalid json astype
, so we'd probably have to do a little more work (like makingtype
optional or nullable for the unknown wrapper)The text was updated successfully, but these errors were encountered: