rossvideo / Catena

Other
5 stars 1 forks source link

consolidate Param.template_oid and Param.type.param_ref #60

Closed mejohnnaylor closed 6 months ago

mejohnnaylor commented 7 months ago

we currently have 2 ways of referring to a param from which the one currently being processed can get its type info.

"there can be only one!" - Highlander

plan:

Update proto files, JSON schema, test files and code that implements param inheritance.

mejohnnaylor commented 6 months ago

ok. this one's problematic. substituting template_oid for type in the type property of param causes all the validation schemas for the value and constraint properties to fail because there's no longer at type property.

Proposed solution: let's lose the oneOf and require that whatever template_oid is referenced has the same type as the type property. this is a runtime validation, the schema validator can't do it.

adding JP as an assignee so he sees this comment.

james-peltzer commented 6 months ago

Not a huge fan of this (the schema should be forcing us to be valid not forcing us to have validation weaknesses... I'm okay with it for now but we should probably track how often we have to make compromises like this.