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
If it is correct, it would be nice if there is a description of this behavior.
IMO, the current behavior causes extra complexity to the parsers (especially the case of combining with $import that is replaced in the array node) while it only provides a tiny syntax sugar :-(.
The text was updated successfully, but these errors were encountered:
This was implemented as a "do what I mean" behavior, optional types are turned into unions, if you nest a union within a union, the most convenient/intended behavior is to flatten it to a single list. Are you proposing that it should throw an error instead?
I can provide a specification of the flattening/deduplication behavior.
Here is a type definition of
SaladRecordField#jsonldPredicate
.schema_salad/schema_salad/metaschema/metaschema.yml
Lines 284 to 287 in 7662c7f
According to the spec of SALAD,
string?
andJsonldPredicate?
are expanded with the typeDSL rule.It says:
The definition of union types are in the spec of Apache Avro.
It says:
By naively interpreting the descriptions, the above type definition is processed to the following:
However, it violates the definition of
SaladRecordField#type
.schema-salad-tool
processes the above example to the following but this behavior is not documented in the spec of SALAD and Avro.If it is correct, it would be nice if there is a description of this behavior.
IMO, the current behavior causes extra complexity to the parsers (especially the case of combining with
$import
that is replaced in the array node) while it only provides a tiny syntax sugar :-(.The text was updated successfully, but these errors were encountered: