Skip to content

Commit

Permalink
Merge pull request #496 from damare/damare-patch-1
Browse files Browse the repository at this point in the history
fix nullable reference - resolves #497
  • Loading branch information
cookeac authored Dec 9, 2024
2 parents e55be23 + 174e3e5 commit 5700c76
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 50 deletions.
8 changes: 5 additions & 3 deletions resources/icarAttentionEventResource.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -47,4 +49,4 @@
}
]
}


59 changes: 28 additions & 31 deletions resources/icarProgenyDetailsResource.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,20 @@
"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"},
{"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."
},
"specie": {
Expand All @@ -39,7 +41,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": {
Expand All @@ -52,41 +57,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"}
]
}
}
}
]
}
}
26 changes: 10 additions & 16 deletions types/icarMetaDataType.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand All @@ -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"}
]
}
}
}
}

0 comments on commit 5700c76

Please sign in to comment.