Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider adding PostalAddress to icarConsignmentType #317

Closed
cookeac opened this issue Sep 8, 2022 · 1 comment · Fixed by #322
Closed

Consider adding PostalAddress to icarConsignmentType #317

cookeac opened this issue Sep 8, 2022 · 1 comment · Fixed by #322
Assignees

Comments

@cookeac
Copy link
Collaborator

cookeac commented Sep 8, 2022

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.

@cookeac
Copy link
Collaborator Author

cookeac commented Sep 8, 2022

Andrew to do a PR with anyOf and we will review.

@cookeac cookeac self-assigned this Sep 8, 2022
cookeac added a commit to cookeac/ICAR that referenced this issue Sep 12, 2022
Define PostalAddress from schema.org, and add it to icarConsignment's originAddress and destinationAddress.
This uses "anyOf" to support backward compatibility for the simple string type.
Resolves adewg#317
@cookeac cookeac linked a pull request Sep 13, 2022 that will close this issue
@cookeac cookeac closed this as completed Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant