Ability to Extend Entities - "Extra Data"

Description

Step 1: Drive a decision on the ExtraData Approach/Solution

Please see https://openlmis.atlassian.net/wiki/display/OP/OpenLMIS+v3+Architecture+ExtraData+approaches

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.

Acceptance Criteria

  • 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

Assignee

Chongsun Ahn

Reporter

Jake Watson

Labels

Story Points

8

Time tracking

0m

Components

Sprint

None

Fix versions

Priority

Major
Configure