Step 1: Drive a decision on the ExtraData Approach/Solution
Step 2: Implement the solution (could create sub-tasks if needed)
This ticket does NOT include making every OpenLMIS entity extensible. It just includes building this tooling and demonstrating it with an extension onto one entity. We don't want it to be a contrived example, but instead a real-world example that an OpenLMIS implementation would be likely to use. One possibility is extending the Product entity to add a Barcode field.
A user can be saved with extraData (the PUT /api/users endpoint can be saved with a JSON request body with an "extraData" property; see example below)
A user can be searched for using extraData (the POST /api/users/search endpoint can be called with a JSON request body with an "extraData" property; see example below)
The JSON request body for the two endpoints above would have an "extraData" property that contains a JSON object with zero or more key-value pairs; both keys and values must be strings.
Example JSON with extraData property