From 6f1da7577a218544557cf975e813e9e1ec530988 Mon Sep 17 00:00:00 2001 From: donwilson-rezare <53927263+donwilson-rezare@users.noreply.github.com> Date: Wed, 24 Apr 2024 16:13:49 +1200 Subject: [PATCH] Added percent to ProductIngredientType Added percent to ProductIngredientType so that we can specify how much of an ingredient is in a product --- types/ProductIngredientType.json | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/types/ProductIngredientType.json b/types/ProductIngredientType.json index dfb7767..8770b64 100644 --- a/types/ProductIngredientType.json +++ b/types/ProductIngredientType.json @@ -1,15 +1,31 @@ { "description": "Describes an ingredient of a product (for example, an active ingredient).", "type": "object", - "required": [ "name" ], + "required": [ + "name" + ], "properties": { - "id" :{ - "$ref" : "../types/IdentifierType.json", + "id": { + "$ref": "../types/IdentifierType.json", "description": "Id of an ingredient of a product specified as a scheme and id." }, "name": { "type": "string", "description": "Human readable description of the ingredient" - } - } -} + }, + "percent": { + "type": "number", + "description": "Percentage of the ingredient in the product" + } + }, + "examples": [ + { + "id": { + "scheme": "com.fertco.product", + "id": 4000000 + }, + "name": "Granular Ammonium Sulphate", + "percent": 47.6 + } + ] +} \ No newline at end of file