Open ahayes opened 3 years ago
Reverted with: https://github.com/GCRC/nunaliit/pull/1174
Versioning of schemas requires that all existing schemas to be updated as well in addition to every reference to affected schemas in the client side code. It would also require references to the old schemas that don't use the versioning be added everywhere as well.
This is because adding the new IDs for schemas with prefix + title needs the inReach processing servlet to also check for that instead of only checking title. The servlet could be changed to query for the existence of a particular schema then check the alternative (check if prefix+title exists, otherwise check if it's title only), but is not ideal to be querying the database for every inReach message processed. Caching them is also difficult because there is no indication if it was updated with the executable.
Currently the
nunaliit schemas-for-inreach
command outputs JSON containing all the definition objects for schemas related to ainreach_forms.xml
file found in theconfig
folder.In the XML document, forms have an id number, a title, and a prefix. By convention, a best practice for building forms would have the prefix include a version number to uniquely identify a form. The inreach form XML in the example below shows and example of the syntax. The form id which functions as more of an index in the file and cannot be assumed to be consistent over time. The title may well remain consistent despite changes to the form fields. The prefix contains a unique form identifier with an abreviation representing the atlas, the form title, and the version (in this case 1). The schema IDs for each form should be based on the entire prefix to permit versioning of forms and with new versions resulting in new matching schemas.
The schema IDs for each form should be based on the entire prefix to permit versioning of forms with matching schemas.