From 5324474d6e606e7e01777926324768770f5931a2 Mon Sep 17 00:00:00 2001 From: damare Date: Fri, 8 Nov 2024 13:51:41 +0100 Subject: [PATCH 1/4] fix nullable reference --- types/icarMetaDataType.json | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/types/icarMetaDataType.json b/types/icarMetaDataType.json index 2be379a..da608b7 100644 --- a/types/icarMetaDataType.json +++ b/types/icarMetaDataType.json @@ -26,11 +26,9 @@ }, "created": { "description": "RFC3339 UTC date/time of creation (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance).", - "type": ["string", "null"], - "allOf": [ - { - "$ref": "../types/icarDateTimeType.json" - } + "anyOf": [ + {"type": "null"}, + {"$ref": "../types/icarDateTimeType.json"} ] }, "creator": { @@ -39,21 +37,17 @@ }, "validFrom": { "description": "RFC3339 UTC start of period when the resource is valid (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance).", - "type": ["string", "null"], - "allOf": [ - { - "$ref": "../types/icarDateTimeType.json" - } + "anyOf": [ + {"type": "null"}, + {"$ref": "../types/icarDateTimeType.json"} ] }, "validTo": { "description": "RFC3339 UTC end of the period when the resoure is valid (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance).", - "type": ["string", "null"], - "allOf": [ - { - "$ref": "../types/icarDateTimeType.json" - } + "anyOf": [ + {"type": "null"}, + {"$ref": "../types/icarDateTimeType.json"} ] } } -} \ No newline at end of file +} From 05bb77e6f6d82c56084ca9364da362e79c4149f8 Mon Sep 17 00:00:00 2001 From: damare Date: Fri, 6 Dec 2024 13:23:54 +0100 Subject: [PATCH 2/4] Update icarAttentionEventResource.json - fixing nullable --- resources/icarAttentionEventResource.json | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/icarAttentionEventResource.json b/resources/icarAttentionEventResource.json index 477c32d..6ee55c7 100644 --- a/resources/icarAttentionEventResource.json +++ b/resources/icarAttentionEventResource.json @@ -12,8 +12,10 @@ "properties": { "alertEndDateTime": { - "type": ["string", "null"], - "$ref": "../types/icarDateTimeType.json", + "anyOf": [ + {"type": "null"}, + {"$ref": "../types/icarDateTimeType.json"} + ], "description": "RFC3339 date time that represents the end time of an alert (start time is the eventDateTime) if it has ended." }, "category": { @@ -47,4 +49,4 @@ } ] } - \ No newline at end of file + From 4bc8b81c3a3c8e83ad5dc6b042595e1bc83d0f08 Mon Sep 17 00:00:00 2001 From: damare Date: Fri, 6 Dec 2024 13:28:20 +0100 Subject: [PATCH 3/4] Update icarProgenyDetailsResource.json - fix nullable --- resources/icarProgenyDetailsResource.json | 55 ++++++++++------------- 1 file changed, 24 insertions(+), 31 deletions(-) diff --git a/resources/icarProgenyDetailsResource.json b/resources/icarProgenyDetailsResource.json index 966f828..565ff56 100644 --- a/resources/icarProgenyDetailsResource.json +++ b/resources/icarProgenyDetailsResource.json @@ -16,18 +16,16 @@ "properties": { "identifier": { "description": "Unique animal scheme and identifier combination.", - "type": ["object", "null"], - "allOf": [ - { - "$ref": "../types/icarAnimalIdentifierType.json" - } + "anyOf": [ + {"type": "null"}, + {"$ref": "../types/icarAnimalIdentifierType.json"} ] }, "alternativeIdentifiers": { - "type": ["array","null"], - "items": { - "$ref": "../types/icarAnimalIdentifierType.json" - }, + "anyOf": [ + {"type": "null"}, + {"$ref": "../types/icarAnimalIdentifierType.json"} + ], "description": "Alternative identifiers for the animal. Here, also temporary identifiers, e.g. transponders or animal numbers, can be listed." }, "specie": { @@ -39,7 +37,10 @@ "description": "Gender of the animal." }, "managementTag": { - "type": ["string", "null"], + "anyOf": [ + {"type": "null"}, + {"type": "string"} + ], "description": "The identifier used by the farmer in day to day operations. In many cases this could be the animal number." }, "name": { @@ -52,41 +53,33 @@ }, "taggingDate": { "description": "Progeny tagging date in RFC3339 UTC (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance).", - "type": ["string", "null"], - "allOf": [ - { - "$ref": "../types/icarDateTimeType.json" - } + "anyOf": [ + {"type": "null"}, + {"$ref": "../types/icarDateTimeType.json"} ] }, "birthStatus": { "description": "Birth status of the progeny.", - "type": ["string", "null"], - "allOf": [ - { - "$ref": "../enums/icarParturitionBirthStatusType.json" - } + "anyOf": [ + {"type": "null"}, + {"$ref": "../enums/icarParturitionBirthStatusType.json"} ] }, "birthSize": { "description": "Size of the progeny.", - "type": ["string", "null"], - "allOf": [ - { - "$ref": "../enums/icarParturitionBirthSizeType.json" - } + "anyOf": [ + {"type": "null"}, + {"$ref": "../enums/icarParturitionBirthSizeType.json"} ] }, "birthWeight": { "description": "Weight of the progeny.", - "type": ["object", "null"], - "allOf": [ - { - "$ref": "../types/icarMassMeasureType.json" - } + "anyOf": [ + {"type": "null"}, + {"$ref": "../types/icarMassMeasureType.json"} ] } } } ] -} \ No newline at end of file +} From 174e3e51cd8dfd4ea7ba579e691f7d3b8a579359 Mon Sep 17 00:00:00 2001 From: damare Date: Fri, 6 Dec 2024 13:31:16 +0100 Subject: [PATCH 4/4] Update icarProgenyDetailsResource.json - fix alternativeIdentifiers to array --- resources/icarProgenyDetailsResource.json | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/resources/icarProgenyDetailsResource.json b/resources/icarProgenyDetailsResource.json index 565ff56..f8c439d 100644 --- a/resources/icarProgenyDetailsResource.json +++ b/resources/icarProgenyDetailsResource.json @@ -24,7 +24,11 @@ "alternativeIdentifiers": { "anyOf": [ {"type": "null"}, - {"$ref": "../types/icarAnimalIdentifierType.json"} + {"type": "array", + "items": { + "$ref": "../types/icarAnimalIdentifierType.json" + } + } ], "description": "Alternative identifiers for the animal. Here, also temporary identifiers, e.g. transponders or animal numbers, can be listed." },