Closed igarashitm closed 6 years ago
All attributes other than status
are free format text. Mainly message
, field
and value
are used to carry validation results, but the field
and value
are just another messages and their role is not really distinguished from message
attribute. name
and group
attributes are not even used at all. Surprisingly name
is a required attribute though.
<complexType name="Validation">
<sequence>
<element name="message" type="string" minOccurs="0" maxOccurs="1" />
</sequence>
<attribute name="id" type="string" use="optional"/>
<attribute name="scope" type="atlas:ValidationScope" use="required" />
<attribute name="status" type="atlas:ValidationStatus" use="required" />
</complexType>
<complexType name="ValidationScope">
<restriction base="string">
<enumeration value="All"/>
<enumeration value="DataSource"/>
<enumeration value="Mapping"/>
<enumeration value="LookupTable"/>
<enumeration value="Property"/>
</restriction>
</complexType>
Type
Instead of having a list of atlas:Field
might be a bit too verbose for validation result. But we can strip unneccessary attributes off when it's used for validation result. And eventually we'll get mapping entry level light weight validation by #238.atlas:Field
, we can simply add an id
attribute on the /AtlasMapping/Mappings/Mapping and let UI assign a unique ID for each mapping entries. What we really want to link is mapping entry and validation result, not the field. Plus UI already knows those field details. We'll also need to add id
to LookupTable
and Property
as well. DataSource
already has an id
attribute.
io.atlasmap.v2.Validation right now only has free style string literals and therefore impossible to identify the mapping entry corresponds to that result. It should have identifiers for the corresponding fields, docId+path is the candidate. If the validation errors are not entry level, they can be null so that UI can handle it as a global error.