Currently icarConsignmentType has string fields for destinationAddress and `originAddress'.
Several systems store addresses in structured fields (e.g. Address 1, Address 2, City, Post Code, Country...). There is a standard for this.
It is relatively easy to convert a structured address to a string -- but much more effort to reconstitute a structured address from a string.
In Schema.Org they get around this by having:
address: { "anyOf": [ { "string" }, { "$ref": "../types/PostalAddress.json" }
(this is a simplified approximation)
At face value, this would be a non-breaking change (to validation), but I suspect it would break implementations.
An alternative would be to extend icarConsignmentType, adding destinationPostalAddress and originPostalAddress. Not as elegant, but maybe safer.
Currently
icarConsignmentType
has string fields fordestinationAddress
and `originAddress'. Several systems store addresses in structured fields (e.g. Address 1, Address 2, City, Post Code, Country...). There is a standard for this.It is relatively easy to convert a structured address to a string -- but much more effort to reconstitute a structured address from a string.
In Schema.Org they get around this by having:
address: { "anyOf": [ { "string" }, { "$ref": "../types/PostalAddress.json" }
(this is a simplified approximation)At face value, this would be a non-breaking change (to validation), but I suspect it would break implementations.
An alternative would be to extend
icarConsignmentType
, addingdestinationPostalAddress
andoriginPostalAddress
. Not as elegant, but maybe safer.