Open tom-tan opened 1 year ago
Allowing duplicated types is not specifically intended behavior, but nothing in the current code specifically checks for uniqueness, so it isn't disallowed either. It has a minimal impact on correctness. If we want to explicitly disallow it, we can.
I'm happy to accept a PR to formally allow type duplicates in union types.
OK, I will send a request to clarify it.
The spec of Apache Avro says:
As described in the spec of SALAD, SALAD is based on Apache Avro.
Also, there are few descriptions of union types in the spec of SALAD.
Therefore, we expect that union types behave as same as Apache Avro. That is, SALAD does not allow type duplications in union types. However, schema-salad-tool allows type duplications.
For example:
Is it an intended behavior? If intended, it would be nice if it is clarified in the spec of SALAD.