The current namespace implementation does not provide a way to indicate whether value or confidence are required fields. This is ultimately namespace-dependent, since beat and onset do not require values, but something like chord_harte certainly does. Without explicit required fields, it's impossible to properly unit-test the namespaces.
In general json-schema, you would indicate required fields in the type definition with the required = [ ... ] field. However, since the namespace schemas aren't complete definitions (only the specs for the value and confidence fields), this isn't directly possible by adding required to the ns schema. We can work around this by adding required to the namespace defs and re-routing it to the correct place from within jams.ns.ns_schema.
Disregard this issue. All observations should have all fields always.
[ref #13, #26]The current namespace implementation does not provide a way to indicate whethervalue
orconfidence
are required fields. This is ultimately namespace-dependent, sincebeat
andonset
do not require values, but something likechord_harte
certainly does. Without explicit required fields, it's impossible to properly unit-test the namespaces.In general json-schema, you would indicate required fields in the type definition with therequired = [ ... ]
field. However, since the namespace schemas aren't complete definitions (only the specs for the value and confidence fields), this isn't directly possible by addingrequired
to the ns schema. We can work around this by addingrequired
to the namespace defs and re-routing it to the correct place from withinjams.ns.ns_schema
.Disregard this issue. All observations should have all fields always.