palantir / conjure

Strongly typed HTTP/JSON APIs for browsers and microservices
https://palantir.github.io/conjure/
Apache License 2.0
421 stars 66 forks source link

Fill in "Round-trip of unknown variants" behaviour in wire spec #88

Open dansanduleac opened 6 years ago

dansanduleac commented 6 years ago

Right now, it just says TODO ask Mark. https://github.com/palantir/conjure/blob/develop/docs/spec/wire.md#behaviour

I think the whole point of supporting unknown variants was that they round trip so that an old "proxy" can pass on variants it doesn't understand without loss of information. @markelliot can you confirm the above so we can amend the wire spec?

markelliot commented 6 years ago

Yes, I think that if a language supports handling unknown values that it's required the actual value round-trip. There's a question of whether all languages should support unknown values, I'd contest we need that to be the case for the enum handling to be ergonomic.