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
The import fails on the following definition. At this point, we've decided to support "null" as an option in our data contracts on most data elements. The practice we've seen cited most often is to start a union with "null" as in the example.
Thanks for reporting this. From a short google search I think your avro format is fine. We should add the functionality to parse optional fields as well. Perhaps @ismailova-n can help as she did the avro import.
At the moment, a data contract has no concept of union types. For now, we would special-case the import of Avro unions with "null" to result in an optional field of the contained type. I believe this is the most common usecase for union types. To support arbitrary unions, we'd have to discuss how to extend the data contract specification.
I'm experimenting with the datacontract CLI. I'm on version 0.9.7. I started by executing the import command on an existing Avro schema.
The import fails on the following definition. At this point, we've decided to support "null" as an option in our data contracts on most data elements. The practice we've seen cited most often is to start a union with "null" as in the example.
This yields the below error.
Again, if I remove the NULL from the union, the parsing moves on successfully.
Is this an issue or are we using it incorrectly?
Thanks.
The text was updated successfully, but these errors were encountered: