From 784f8853c265ff2e2c0fd3ee63bb01893bb4aee1 Mon Sep 17 00:00:00 2001 From: Anton Hokkonen Date: Wed, 11 Dec 2019 20:23:04 +0200 Subject: [PATCH 01/39] Performed some renaming and small refactoring - renamed some event observed files by adding "Event" into file names: icarMovementArrivalResource.json -> icarMovementArrivalEventResource.json icarMovementDepartureResource.json -> icarMovementDepartureEventEventResource.json icarMovementBirthRegistrationResource.json -> icarMovementBirthEventResource.json icarMovementDeathResource.json -> icarMovementDeathEventResource.json icarMilkingVisitResource->icarMilkingVisitEventResource - fixed references for renamed files in exampleUrlScheme and icarResource - some refactorin in icarIdentifierType.json - moved "description" field on top before "properties" (recommended by specs) --- .../exampleUrlScheme.json | 13 +++---- .../icarIdentifierType.json | 38 +++++++++---------- ...ataResource.json => icarMetaDataType.json} | 0 ...son => icarMilkingVisitEventResource.json} | 0 ... => icarMovementArrivalEventResource.json} | 0 ...on => icarMovementBirthEventResource.json} | 0 ...on => icarMovementDeathEventResource.json} | 0 ...> icarMovementDepartureEventResource.json} | 0 Release Candidate Messages/icarResource.json | 2 +- 9 files changed, 26 insertions(+), 27 deletions(-) rename Release Candidate Messages/{icarMetaDataResource.json => icarMetaDataType.json} (100%) rename Release Candidate Messages/{icarMilkingVisitResource.json => icarMilkingVisitEventResource.json} (100%) rename Release Candidate Messages/{icarMovementArrivalResource.json => icarMovementArrivalEventResource.json} (100%) rename Release Candidate Messages/{icarMovementBirthRegistrationResource.json => icarMovementBirthEventResource.json} (100%) rename Release Candidate Messages/{icarMovementDeathResource.json => icarMovementDeathEventResource.json} (100%) rename Release Candidate Messages/{icarMovementDepartureResource.json => icarMovementDepartureEventResource.json} (100%) diff --git a/Release Candidate Messages/exampleUrlScheme.json b/Release Candidate Messages/exampleUrlScheme.json index a7c1153..49792b0 100644 --- a/Release Candidate Messages/exampleUrlScheme.json +++ b/Release Candidate Messages/exampleUrlScheme.json @@ -93,7 +93,7 @@ "schema": { "type": "array", "items": { - "$ref": "icarMilkingVisitResource.json" + "$ref": "icarMilkingVisitEventResource.json" } }, "examples": { @@ -356,7 +356,7 @@ "schema": { "type": "array", "items": { - "$ref": "icarMovementBirthRegistrationResource.json" + "$ref": "icarMovementBirthEventResource.json" } } } @@ -443,7 +443,7 @@ "schema": { "type": "array", "items": { - "$ref": "icarMovementDeathResource.json" + "$ref": "icarMovementDeathEventResource.json" } } } @@ -530,7 +530,7 @@ "schema": { "type": "array", "items": { - "$ref": "icarMovementArrivalResource.json" + "$ref": "icarMovementArrivalEventResource.json" } }, "examples": { @@ -684,7 +684,7 @@ "schema": { "type": "array", "items": { - "$ref": "icarMovementDepartureResource.json" + "$ref": "icarMovementDepartureEventResource.json" } } } @@ -1134,11 +1134,10 @@ "description": "Error information", "properties": { "data": { - "description": "Error information", "$ref": "exampleErrorResource.json" } } } } } -} +} \ No newline at end of file diff --git a/Release Candidate Messages/icarIdentifierType.json b/Release Candidate Messages/icarIdentifierType.json index ec3c38a..c846643 100644 --- a/Release Candidate Messages/icarIdentifierType.json +++ b/Release Candidate Messages/icarIdentifierType.json @@ -1,20 +1,20 @@ { - "required": [ - "id", - "scheme" - ], - - "type": "object", - - "properties": { - "id": { - "type": "string", - "description": "A unique identification for the resource issued under the auspices of the scheme." - }, - "scheme": { - "type": "string", - "description": "The identifier (in reverse domain format) of an official scheme that manages unique identifiers." - } - }, - "description": "Identifies a resource." -} + "type": "object", + "description": "Identifies a resource.", + + "required": [ + "id", + "scheme" + ], + + "properties": { + "id": { + "type": "string", + "description": "A unique identification for the resource issued under the auspices of the scheme." + }, + "scheme": { + "type": "string", + "description": "The identifier (in reverse domain format) of an official scheme that manages unique identifiers." + } + } +} \ No newline at end of file diff --git a/Release Candidate Messages/icarMetaDataResource.json b/Release Candidate Messages/icarMetaDataType.json similarity index 100% rename from Release Candidate Messages/icarMetaDataResource.json rename to Release Candidate Messages/icarMetaDataType.json diff --git a/Release Candidate Messages/icarMilkingVisitResource.json b/Release Candidate Messages/icarMilkingVisitEventResource.json similarity index 100% rename from Release Candidate Messages/icarMilkingVisitResource.json rename to Release Candidate Messages/icarMilkingVisitEventResource.json diff --git a/Release Candidate Messages/icarMovementArrivalResource.json b/Release Candidate Messages/icarMovementArrivalEventResource.json similarity index 100% rename from Release Candidate Messages/icarMovementArrivalResource.json rename to Release Candidate Messages/icarMovementArrivalEventResource.json diff --git a/Release Candidate Messages/icarMovementBirthRegistrationResource.json b/Release Candidate Messages/icarMovementBirthEventResource.json similarity index 100% rename from Release Candidate Messages/icarMovementBirthRegistrationResource.json rename to Release Candidate Messages/icarMovementBirthEventResource.json diff --git a/Release Candidate Messages/icarMovementDeathResource.json b/Release Candidate Messages/icarMovementDeathEventResource.json similarity index 100% rename from Release Candidate Messages/icarMovementDeathResource.json rename to Release Candidate Messages/icarMovementDeathEventResource.json diff --git a/Release Candidate Messages/icarMovementDepartureResource.json b/Release Candidate Messages/icarMovementDepartureEventResource.json similarity index 100% rename from Release Candidate Messages/icarMovementDepartureResource.json rename to Release Candidate Messages/icarMovementDepartureEventResource.json diff --git a/Release Candidate Messages/icarResource.json b/Release Candidate Messages/icarResource.json index 2a82cc8..a92e719 100644 --- a/Release Candidate Messages/icarResource.json +++ b/Release Candidate Messages/icarResource.json @@ -8,7 +8,7 @@ "description": "Uniform resource identifier (URI) of the resource (rel=self)." }, "meta": { - "$ref": "icarMetaDataResource.json", + "$ref": "icarMetaDataType.json", "description": "Meta-data for the resource. Mandatory if you wish to support synchronisation." } From 49fe57a28f74f32a314eea415bebf41cd2bf65e4 Mon Sep 17 00:00:00 2001 From: Anton Hokkonen Date: Wed, 11 Dec 2019 20:23:04 +0200 Subject: [PATCH 02/39] Performed some renaming and small refactoring - renamed icarMetaDataResource.json into icarMetaDataType.json - renamed some event observed files by adding "Event" into file names: icarMovementArrivalResource.json -> icarMovementArrivalEventResource.json icarMovementDepartureResource.json -> icarMovementDepartureEventEventResource.json icarMovementBirthRegistrationResource.json -> icarMovementBirthEventResource.json icarMovementDeathResource.json -> icarMovementDeathEventResource.json icarMilkingVisitResource->icarMilkingVisitEventResource - fixed references for renamed files in exampleUrlScheme and icarResource - some refactorin in icarIdentifierType.json - moved "description" field on top before "properties" (recommended by specs) --- .../exampleUrlScheme.json | 13 +++---- .../icarIdentifierType.json | 38 +++++++++---------- ...ataResource.json => icarMetaDataType.json} | 0 ...son => icarMilkingVisitEventResource.json} | 0 ... => icarMovementArrivalEventResource.json} | 0 ...on => icarMovementBirthEventResource.json} | 0 ...on => icarMovementDeathEventResource.json} | 0 ...> icarMovementDepartureEventResource.json} | 0 Release Candidate Messages/icarResource.json | 2 +- 9 files changed, 26 insertions(+), 27 deletions(-) rename Release Candidate Messages/{icarMetaDataResource.json => icarMetaDataType.json} (100%) rename Release Candidate Messages/{icarMilkingVisitResource.json => icarMilkingVisitEventResource.json} (100%) rename Release Candidate Messages/{icarMovementArrivalResource.json => icarMovementArrivalEventResource.json} (100%) rename Release Candidate Messages/{icarMovementBirthRegistrationResource.json => icarMovementBirthEventResource.json} (100%) rename Release Candidate Messages/{icarMovementDeathResource.json => icarMovementDeathEventResource.json} (100%) rename Release Candidate Messages/{icarMovementDepartureResource.json => icarMovementDepartureEventResource.json} (100%) diff --git a/Release Candidate Messages/exampleUrlScheme.json b/Release Candidate Messages/exampleUrlScheme.json index a7c1153..49792b0 100644 --- a/Release Candidate Messages/exampleUrlScheme.json +++ b/Release Candidate Messages/exampleUrlScheme.json @@ -93,7 +93,7 @@ "schema": { "type": "array", "items": { - "$ref": "icarMilkingVisitResource.json" + "$ref": "icarMilkingVisitEventResource.json" } }, "examples": { @@ -356,7 +356,7 @@ "schema": { "type": "array", "items": { - "$ref": "icarMovementBirthRegistrationResource.json" + "$ref": "icarMovementBirthEventResource.json" } } } @@ -443,7 +443,7 @@ "schema": { "type": "array", "items": { - "$ref": "icarMovementDeathResource.json" + "$ref": "icarMovementDeathEventResource.json" } } } @@ -530,7 +530,7 @@ "schema": { "type": "array", "items": { - "$ref": "icarMovementArrivalResource.json" + "$ref": "icarMovementArrivalEventResource.json" } }, "examples": { @@ -684,7 +684,7 @@ "schema": { "type": "array", "items": { - "$ref": "icarMovementDepartureResource.json" + "$ref": "icarMovementDepartureEventResource.json" } } } @@ -1134,11 +1134,10 @@ "description": "Error information", "properties": { "data": { - "description": "Error information", "$ref": "exampleErrorResource.json" } } } } } -} +} \ No newline at end of file diff --git a/Release Candidate Messages/icarIdentifierType.json b/Release Candidate Messages/icarIdentifierType.json index ec3c38a..c846643 100644 --- a/Release Candidate Messages/icarIdentifierType.json +++ b/Release Candidate Messages/icarIdentifierType.json @@ -1,20 +1,20 @@ { - "required": [ - "id", - "scheme" - ], - - "type": "object", - - "properties": { - "id": { - "type": "string", - "description": "A unique identification for the resource issued under the auspices of the scheme." - }, - "scheme": { - "type": "string", - "description": "The identifier (in reverse domain format) of an official scheme that manages unique identifiers." - } - }, - "description": "Identifies a resource." -} + "type": "object", + "description": "Identifies a resource.", + + "required": [ + "id", + "scheme" + ], + + "properties": { + "id": { + "type": "string", + "description": "A unique identification for the resource issued under the auspices of the scheme." + }, + "scheme": { + "type": "string", + "description": "The identifier (in reverse domain format) of an official scheme that manages unique identifiers." + } + } +} \ No newline at end of file diff --git a/Release Candidate Messages/icarMetaDataResource.json b/Release Candidate Messages/icarMetaDataType.json similarity index 100% rename from Release Candidate Messages/icarMetaDataResource.json rename to Release Candidate Messages/icarMetaDataType.json diff --git a/Release Candidate Messages/icarMilkingVisitResource.json b/Release Candidate Messages/icarMilkingVisitEventResource.json similarity index 100% rename from Release Candidate Messages/icarMilkingVisitResource.json rename to Release Candidate Messages/icarMilkingVisitEventResource.json diff --git a/Release Candidate Messages/icarMovementArrivalResource.json b/Release Candidate Messages/icarMovementArrivalEventResource.json similarity index 100% rename from Release Candidate Messages/icarMovementArrivalResource.json rename to Release Candidate Messages/icarMovementArrivalEventResource.json diff --git a/Release Candidate Messages/icarMovementBirthRegistrationResource.json b/Release Candidate Messages/icarMovementBirthEventResource.json similarity index 100% rename from Release Candidate Messages/icarMovementBirthRegistrationResource.json rename to Release Candidate Messages/icarMovementBirthEventResource.json diff --git a/Release Candidate Messages/icarMovementDeathResource.json b/Release Candidate Messages/icarMovementDeathEventResource.json similarity index 100% rename from Release Candidate Messages/icarMovementDeathResource.json rename to Release Candidate Messages/icarMovementDeathEventResource.json diff --git a/Release Candidate Messages/icarMovementDepartureResource.json b/Release Candidate Messages/icarMovementDepartureEventResource.json similarity index 100% rename from Release Candidate Messages/icarMovementDepartureResource.json rename to Release Candidate Messages/icarMovementDepartureEventResource.json diff --git a/Release Candidate Messages/icarResource.json b/Release Candidate Messages/icarResource.json index 2a82cc8..a92e719 100644 --- a/Release Candidate Messages/icarResource.json +++ b/Release Candidate Messages/icarResource.json @@ -8,7 +8,7 @@ "description": "Uniform resource identifier (URI) of the resource (rel=self)." }, "meta": { - "$ref": "icarMetaDataResource.json", + "$ref": "icarMetaDataType.json", "description": "Meta-data for the resource. Mandatory if you wish to support synchronisation." } From 77c293fc623037f81969139f352b88a1e9234644 Mon Sep 17 00:00:00 2001 From: Anton Hokkonen Date: Wed, 11 Dec 2019 20:32:17 +0200 Subject: [PATCH 03/39] Small fix to previous commit - restored original text formatting for icarIdentifierType.json --- .../icarIdentifierType.json | 30 +++++++++---------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/Release Candidate Messages/icarIdentifierType.json b/Release Candidate Messages/icarIdentifierType.json index c846643..9f66609 100644 --- a/Release Candidate Messages/icarIdentifierType.json +++ b/Release Candidate Messages/icarIdentifierType.json @@ -1,20 +1,20 @@ { - "type": "object", - "description": "Identifies a resource.", + "type": "object", + "description": "Identifies a resource.", - "required": [ - "id", - "scheme" - ], + "required": [ + "id", + "scheme" + ], - "properties": { - "id": { - "type": "string", - "description": "A unique identification for the resource issued under the auspices of the scheme." - }, - "scheme": { - "type": "string", - "description": "The identifier (in reverse domain format) of an official scheme that manages unique identifiers." + "properties": { + "id": { + "type": "string", + "description": "A unique identification for the resource issued under the auspices of the scheme." + }, + "scheme": { + "type": "string", + "description": "The identifier (in reverse domain format) of an official scheme that manages unique identifiers." + } } - } } \ No newline at end of file From c4ee8843ff59e4924c0081b9dd123ead5540ee68 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 08:39:48 +0100 Subject: [PATCH 04/39] Update icarMilkCharacteristicsType.json --- Release Candidate Messages/icarMilkCharacteristicsType.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Release Candidate Messages/icarMilkCharacteristicsType.json b/Release Candidate Messages/icarMilkCharacteristicsType.json index 46619e4..6e09c38 100644 --- a/Release Candidate Messages/icarMilkCharacteristicsType.json +++ b/Release Candidate Messages/icarMilkCharacteristicsType.json @@ -18,7 +18,7 @@ "type": "string", "description": "the defaults are described above, only use this field when differed from the default. Use UN/CEFACT codes." }, - "icarMeasuringDevice": { + "measuringDevice": { "type": "string", "description": "a more readable device class ID that contains manufacturer, device, hardware and software versions in a way that is similar to the USB specification. This will need more investigation." } From e195b8c4198c770307c5479af5b545f9f5049658 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 08:40:22 +0100 Subject: [PATCH 05/39] Update icarMilkingVisitEventResource.json --- Release Candidate Messages/icarMilkingVisitEventResource.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Release Candidate Messages/icarMilkingVisitEventResource.json b/Release Candidate Messages/icarMilkingVisitEventResource.json index 8991fab..aad9cb2 100644 --- a/Release Candidate Messages/icarMilkingVisitEventResource.json +++ b/Release Candidate Messages/icarMilkingVisitEventResource.json @@ -61,7 +61,7 @@ "$ref": "icarAnimalMilkingSampleType.json" } }, - "icarMilkCharacteristics": { + "milkCharacteristics": { "type": "array", "items": { "$ref": "icarMilkCharacteristicsType.json" From 4ac8c99489d0fa45884e9f9140a41aea3aeae202 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 08:40:49 +0100 Subject: [PATCH 06/39] Update icarTestDayResource.json --- Release Candidate Messages/icarTestDayResource.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Release Candidate Messages/icarTestDayResource.json b/Release Candidate Messages/icarTestDayResource.json index c90d5b2..db27014 100644 --- a/Release Candidate Messages/icarTestDayResource.json +++ b/Release Candidate Messages/icarTestDayResource.json @@ -19,7 +19,7 @@ "TestDayCode": { "$ref": "icarTestDayCodeType.json" }, - "icarMilkCharacteristics": { + "milkCharacteristics": { "type": "array", "items": { "$ref": "icarMilkCharacteristicsType.json" From 983c30570ed188d99388448dfce1760db8f2f52e Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 08:42:23 +0100 Subject: [PATCH 07/39] Update icarReproInseminationEventResource.json --- .../icarReproInseminationEventResource.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Release Candidate Messages/icarReproInseminationEventResource.json b/Release Candidate Messages/icarReproInseminationEventResource.json index 679ad9e..da26b6d 100644 --- a/Release Candidate Messages/icarReproInseminationEventResource.json +++ b/Release Candidate Messages/icarReproInseminationEventResource.json @@ -38,6 +38,10 @@ "$ref": "icarReproSemenStrawResource.json", "description": "Details of the straw, which may also include sire details." }, + "eventEndDateTime": { + "$ref": "icarDateTimeType.json", + "description": "To be used in case of running with a bull to end the period. ISO8601 date and time. MUST contain time zone. UTC recommended." + }, "semenFromFarmStocks": { "type": "boolean", "description": "True if the semen is from the farmer's own stocks (false if supplied by technician)." From 9f949dc67ba538ed317c3fdfef8a49747768243d Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 08:51:39 +0100 Subject: [PATCH 08/39] Update exampleUrlScheme.json --- .../exampleUrlScheme.json | 89 ++++++++++++++++--- 1 file changed, 79 insertions(+), 10 deletions(-) diff --git a/Release Candidate Messages/exampleUrlScheme.json b/Release Candidate Messages/exampleUrlScheme.json index 49792b0..dc159df 100644 --- a/Release Candidate Messages/exampleUrlScheme.json +++ b/Release Candidate Messages/exampleUrlScheme.json @@ -781,11 +781,11 @@ } } }, - "/locations/{location-scheme}/{location-id}/Pregnancy-Diagnosis": { + "/locations/{location-scheme}/{location-id}/pregnancy-checks": { "get": { - "operationId": "get-pregnancy-diagnosis", - "summary": "Get the pregnancy diagnosis for a certain location", - "description": "# Purpose\nProvides the pregnancy diagnosis on a location\n", + "operationId": "get-pregnancy-checks", + "summary": "Get the pregnancy checks for a certain location", + "description": "# Purpose\nProvides the pregnancy checks on a location\n", "tags": [ "release-candidate-reproduction" ], @@ -822,7 +822,7 @@ "schema": { "type": "array", "items": { - "$ref": "icarReproPregnancyDiagnosisEventResource.json" + "$ref": "icarReproPregnancyCheckEventResource.json" } } } @@ -850,7 +850,7 @@ } } }, - "/locations/{location-scheme}/{location-id}/Inseminations": { + "/locations/{location-scheme}/{location-id}/inseminations": { "get": { "operationId": "get-Inseminations", "summary": "Get the inseminations for a certain location", @@ -919,7 +919,7 @@ } } }, - "/locations/{location-scheme}/{location-id}/Drying-Offs": { + "/locations/{location-scheme}/{location-id}/drying-offs": { "get": { "operationId": "get-Drying-Offs", "summary": "Get the drying off for a certain location", @@ -988,7 +988,7 @@ } } }, - "/locations/{location-scheme}/{location-id}/Abortions": { + "/locations/{location-scheme}/{location-id}/abortions": { "get": { "operationId": "get-Abortions", "summary": "Get the abortion events for a certain location", @@ -1057,7 +1057,7 @@ } } }, - "/locations/{location-scheme}/{location-id}/Parturitions": { + "/locations/{location-scheme}/{location-id}/parturitions": { "get": { "operationId": "get-Parturitions", "summary": "Get the Parturition events for a certain location", @@ -1119,11 +1119,80 @@ } }, "description": "A default response containing only a list of errors" + } } } } } } + }, + "/locations/{location-scheme}/{location-id}/mating-recommendations": { + "get": { + "operationId": "get-mating-recommendations", + "summary": "Get the mating recommendations for a certain location", + "description": "# Purpose\nProvides the mating recommendations on a location\n", + "tags": [ + "release-candidate-reproduction" + ], + "parameters": [ + { + "name": "location-scheme", + "in": "path", + "description": "The scheme id for the location identifier.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "nl.ubn", + "de.farmid", + "be.pen" + ] + } + }, + { + "name": "location-id", + "in": "path", + "description": "The unique identifier for the location.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the mating recommendations for the given location", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "icarReproMatingRecommendationResource.json" + } + } + } + } + }, + "default": { + "description": "An error has occured while handling the request. Check the content of the message for the error details.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "A default response containing only a list of errors" + } + } + } + } + } } } }, @@ -1140,4 +1209,4 @@ } } } -} \ No newline at end of file +} From 74fbf5d1bd85b9fcd00be8b6622887f5be0ba3a0 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 09:04:26 +0100 Subject: [PATCH 09/39] Create icarReproMatingRecommendationResource.json --- ...icarReproMatingRecommendationResource.json | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 Release Candidate Messages/icarReproMatingRecommendationResource.json diff --git a/Release Candidate Messages/icarReproMatingRecommendationResource.json b/Release Candidate Messages/icarReproMatingRecommendationResource.json new file mode 100644 index 0000000..75be1ef --- /dev/null +++ b/Release Candidate Messages/icarReproMatingRecommendationResource.json @@ -0,0 +1,27 @@ +{ + "type": "object", + + "description": "Mating recommendation for an animal", + + "required": [ + "id", + "animal", + "eventDateTime" + ], + + "allOf": [ + { + "$ref": "icarEventCoreResource.json" + }, + { + "properties": { + "bullRecommendations": { + "type": "array", + "items": { + "$ref": "icarBullRecommendationType.json" + } + } + } + } + ] + } From a74d92f0d0c6cd5663caf66da9d8837257dadda6 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 09:17:17 +0100 Subject: [PATCH 10/39] Create icarBullRecommendationType.json --- .../icarBullRecommendationType.json | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Release Candidate Messages/icarBullRecommendationType.json diff --git a/Release Candidate Messages/icarBullRecommendationType.json b/Release Candidate Messages/icarBullRecommendationType.json new file mode 100644 index 0000000..1df87af --- /dev/null +++ b/Release Candidate Messages/icarBullRecommendationType.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "description": "Gives one possible bull recommended to use on an animal.", + + "properties": { + "recommendationType": { + "$ref": "icarRecommendationType.json" + }, + "sireIdentifiers": { + "type": "array", + "items": { + "$ref": "icarAnimalIdentifierType.json" + }, + "description": "Unique scheme/identifier combinations for the sire, including official ID and Herdbook." + }, + "sireOfficialName": { + "type": "string", + "description": "Official herdbook name of the sire." + }, + "sireURI": { + "type": "string", + "description": "URI to an AnimalCoreResource for the sire." + }, + "isSexedSemen": { + "type": "boolean", + "description": "True if this is sexed semen." + }, + "sexedGender": { + "$ref": "icarAnimalGenderType.json", + "description": "Specify Male or Female for sexed semen only." + }, + "parity": { + "type": "number", + "format": "integer", + "description": "The parity of the cow for which the recommendation is valid." + }, + "bullRank": { + "type": "number", + "format": "integer", + "description": "The rank of the bull in the recommendation, 1 = first choice, 2 = second, ...." + } + +} From edc52826e8ba2302cbcf79c6850cabd94dfda31f Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 09:19:22 +0100 Subject: [PATCH 11/39] Create icarRecommendationType.json --- Release Candidate Messages/icarRecommendationType.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Release Candidate Messages/icarRecommendationType.json diff --git a/Release Candidate Messages/icarRecommendationType.json b/Release Candidate Messages/icarRecommendationType.json new file mode 100644 index 0000000..1dbfd16 --- /dev/null +++ b/Release Candidate Messages/icarRecommendationType.json @@ -0,0 +1,10 @@ +{ + "type": "string", + "description": "the type of recommendation (BullRecommended, RecommendationImpossible, BeefBull, NoBreedingBull", + "enum": [ + "BullRecommended", + "RecommendationImpossible", + "BeefBull", + "NoBreedingBull" + ] +} From 97fb408526f2432e9c866aa2fc224e233a18310f Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 10:15:13 +0100 Subject: [PATCH 12/39] Update icarBullRecommendationType.json --- Release Candidate Messages/icarBullRecommendationType.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Release Candidate Messages/icarBullRecommendationType.json b/Release Candidate Messages/icarBullRecommendationType.json index 1df87af..ea25318 100644 --- a/Release Candidate Messages/icarBullRecommendationType.json +++ b/Release Candidate Messages/icarBullRecommendationType.json @@ -39,5 +39,5 @@ "format": "integer", "description": "The rank of the bull in the recommendation, 1 = first choice, 2 = second, ...." } - + } } From ed226e0fc347ee0867c05dd8941a328b967abe51 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 10:46:50 +0100 Subject: [PATCH 13/39] Create icarReproPregnancyCheckEventResource.json --- .../icarReproPregnancyCheckEventResource.json | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 Release Candidate Messages/icarReproPregnancyCheckEventResource.json diff --git a/Release Candidate Messages/icarReproPregnancyCheckEventResource.json b/Release Candidate Messages/icarReproPregnancyCheckEventResource.json new file mode 100644 index 0000000..9c00aef --- /dev/null +++ b/Release Candidate Messages/icarReproPregnancyCheckEventResource.json @@ -0,0 +1,56 @@ +{ + "type": "object", + + "description": "Pregnancy diagnosis or check event.", + + "required": [ + "id", + "animal", + "eventDateTime" + ], + + "allOf": [ + { + "$ref": "icarEventCoreResource.json" + }, + { + "properties": { + "method": { + "$ref": "icarReproPregnancyMethodType.json", + "description": "Method by which diagnosis was carried out." + }, + "result": { + "$ref": "icarReproPregnancyResultType.json", + "description": "Result - uknown, empty, pregnant." + }, + "foetalAge": { + "type": "number", + "format": "integer", + "description": "Assessed age of the foetus or length of the pregnancy (in days)." + }, + "foetusCount": { + "type": "number", + "format": "integer", + "description": "If specified, contains the number of foetuses observed." + }, + "foetusCountMale": { + "type": "number", + "format": "integer", + "description": "If specified, contains number of foetuses observed as male." + }, + "foetusCountFemale": { + "type": "number", + "format": "integer", + "description": "If specified, contains number of foetuses observed as female." + }, + "exceptions": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Additional local observations - such as ABNORMAL CALF" + } + } + } + ] + } From b344e4f614e68f7d0087b84ea2dbe61ac4781dab Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 10:47:12 +0100 Subject: [PATCH 14/39] Delete icarReproPregnancyDiagnosisEventResource.json --- ...rReproPregnancyDiagnosisEventResource.json | 57 ------------------- 1 file changed, 57 deletions(-) delete mode 100644 Release Candidate Messages/icarReproPregnancyDiagnosisEventResource.json diff --git a/Release Candidate Messages/icarReproPregnancyDiagnosisEventResource.json b/Release Candidate Messages/icarReproPregnancyDiagnosisEventResource.json deleted file mode 100644 index f5feb11..0000000 --- a/Release Candidate Messages/icarReproPregnancyDiagnosisEventResource.json +++ /dev/null @@ -1,57 +0,0 @@ -{ - "type": "object", - - "description": "Pregnancy diagnosis or check event.", - - "required": [ - "id", - "animal", - "eventDateTime" - ], - - "allOf": [ - { - "$ref": "icarEventCoreResource.json" - }, - { - "properties": { - "method": { - "$ref": "icarReproPregnancyMethodType.json", - "description": "Method by which diagnosis was carried out." - }, - "result": { - "$ref": "icarReproPregnancyResultType.json", - "description": "Result - uknown, empty, pregnant." - }, - "foetalAge": { - "type": "number", - "format": "integer", - "description": "Assessed age of the foetus or length of the pregnancy (in days)." - }, - "foetusCount": { - "type": "number", - "format": "integer", - "description": "If specified, contains the number of foetuses observed." - }, - "foetusCountMale": { - "type": "number", - "format": "integer", - "description": "If specified, contains number of foetuses observed as male." - }, - "foetusCountFemale": { - "type": "number", - "format": "integer", - "description": "If specified, contains number of foetuses observed as female." - }, - "exceptions": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Additional local observations - such as ABNORMAL CALF" - } - } - } - ] - } - \ No newline at end of file From a8875afbd6a731f2340cbc72070de889d5e7573f Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 10:55:23 +0100 Subject: [PATCH 15/39] Update exampleUrlScheme.json --- .../exampleUrlScheme.json | 69 +++++++++++++++++++ 1 file changed, 69 insertions(+) diff --git a/Release Candidate Messages/exampleUrlScheme.json b/Release Candidate Messages/exampleUrlScheme.json index dc159df..c850e3e 100644 --- a/Release Candidate Messages/exampleUrlScheme.json +++ b/Release Candidate Messages/exampleUrlScheme.json @@ -850,6 +850,75 @@ } } }, + "/locations/{location-scheme}/{location-id}/heats": { + "get": { + "operationId": "get-Heats", + "summary": "Get the heats for a certain location", + "description": "# Purpose\nProvides the Heats on a location\n", + "tags": [ + "release-candidate-reproduction" + ], + "parameters": [ + { + "name": "location-scheme", + "in": "path", + "description": "The scheme id for the location identifier.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "nl.ubn", + "de.farmid", + "be.pen" + ] + } + }, + { + "name": "location-id", + "in": "path", + "description": "The unique identifier for the location.", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the heats for the given location", + "content": { + "application/json": { + "schema": { + "type": "array", + "items": { + "$ref": "icarReproHeatEventResource.json" + } + } + } + } + }, + "default": { + "description": "An error has occured while handling the request. Check the content of the message for the error details.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "A default response containing only a list of errors" + } + } + } + } + } + } + }, "/locations/{location-scheme}/{location-id}/inseminations": { "get": { "operationId": "get-Inseminations", From 1190cd5eb83ae09118ac31b2e18e9bfa6adcee48 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 11:38:51 +0100 Subject: [PATCH 16/39] Create icarReproHeatEventResource.json --- .../icarReproHeatEventResource.json | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 Release Candidate Messages/icarReproHeatEventResource.json diff --git a/Release Candidate Messages/icarReproHeatEventResource.json b/Release Candidate Messages/icarReproHeatEventResource.json new file mode 100644 index 0000000..900f6f9 --- /dev/null +++ b/Release Candidate Messages/icarReproHeatEventResource.json @@ -0,0 +1,61 @@ +{ + "type": "object", + + "description": "Event for recording heats.", + + "required": [ + "id", + "animal", + "eventDateTime" + ], + + "allOf": [{ + "$ref": "icarEventCoreResource.json" + }, + { + "properties": { + "HeatDetectionMethod": { + "$ref": "icarReproHeatDetectionMethodType.json" + }, + "Certainty": { + "$ref": "icarReproHeatCertaintyType.json" + }, + "expirationDateTime": { + "$ref": "icarDateTimeType.json", + "description": "Date Time when the heat will end. ISO8601 date and time. MUST contain time zone. UTC recommended." + }, + "visualDetection": { + "heatSign": { + "$ref": "icarReproHeatSignType.json" + }, + "heatIntensity": { + "$ref": "icarReproHeatIntensityType.json" + }, + "HeatReportScrSenseTime": { + "breedingWindow": { + "type": "number", + "format": "integer", + "description": "Number of hours to AI." + }, + "heatIndex": { + "type": "number", + "format": "integer", + "description": "Gives an indication of the certainty of the heat indication." + } + }, + "HeatReportNedapCowControl": { + "expirationDateTime": { + "$ref": "icarDateTimeType.json", + "description": "Date Time when the heat will end. ISO8601 date and time. MUST contain time zone. UTC recommended." + }, + "heatChance": { + "type": "number", + "format": "integer", + "description": "Gives an indication of the certainty of the heat indication." + } + } + } + } + } + ] +} From 6ef7a5c52153cdba43134937c80bdc513596d441 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 11:51:35 +0100 Subject: [PATCH 17/39] Create icarReproHeatDetectionMethodType.json --- .../icarReproHeatDetectionMethodType.json | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Release Candidate Messages/icarReproHeatDetectionMethodType.json diff --git a/Release Candidate Messages/icarReproHeatDetectionMethodType.json b/Release Candidate Messages/icarReproHeatDetectionMethodType.json new file mode 100644 index 0000000..764462a --- /dev/null +++ b/Release Candidate Messages/icarReproHeatDetectionMethodType.json @@ -0,0 +1,10 @@ +{ + "type": "string", + "description": "The method of detecting the heat of an animal", + "enum": [ + "Chemical", + "Visual", + "Pedometer", + "Other" + ] +} From 2a39d950f7e4a3439f050326654d09736859ce8c Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 11:53:09 +0100 Subject: [PATCH 18/39] Create icarReproHeatCertaintyType.json --- .../icarReproHeatCertaintyType.json | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 Release Candidate Messages/icarReproHeatCertaintyType.json diff --git a/Release Candidate Messages/icarReproHeatCertaintyType.json b/Release Candidate Messages/icarReproHeatCertaintyType.json new file mode 100644 index 0000000..962d81f --- /dev/null +++ b/Release Candidate Messages/icarReproHeatCertaintyType.json @@ -0,0 +1,8 @@ +{ + "type": "string", + "description": "The certainty of a specific heat", + "enum": [ + "InHeat", + "Suspect" + ] +} From 0121773fab422fb493f8a6e3c3ffe54cdeec292e Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 11:55:52 +0100 Subject: [PATCH 19/39] Create icarReproHeatSignType.json --- .../icarReproHeatSignType.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Release Candidate Messages/icarReproHeatSignType.json diff --git a/Release Candidate Messages/icarReproHeatSignType.json b/Release Candidate Messages/icarReproHeatSignType.json new file mode 100644 index 0000000..3427c8c --- /dev/null +++ b/Release Candidate Messages/icarReproHeatSignType.json @@ -0,0 +1,12 @@ +{ + "type": "string", + "description": "The signs of the heat (Slime,Clear slime,Interested in other animals,Stands under,Bawling,Blood)", + "enum": [ + "Slime", + "ClearSlime", + "InterestedInOtherAnimals", + "Bawling", + "Blood", + "StandsUnder" + ] +} From d13245e79395db8ed729a3dcecfee9d45d3f7e45 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 11:58:55 +0100 Subject: [PATCH 20/39] Create icarReproHeatIntensityType.json --- .../icarReproHeatIntensityType.json | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 Release Candidate Messages/icarReproHeatIntensityType.json diff --git a/Release Candidate Messages/icarReproHeatIntensityType.json b/Release Candidate Messages/icarReproHeatIntensityType.json new file mode 100644 index 0000000..f788c89 --- /dev/null +++ b/Release Candidate Messages/icarReproHeatIntensityType.json @@ -0,0 +1,11 @@ +{ + "type": "string", + "description": "The method of insemination (Very weak,Weak,Normal,Strong,Very strong)", + "enum": [ + "VeryWeak", + "Weak", + "Normal", + "Strong", + "VeryStrong" + ] +} From 17cd069f05e3273459ce060c2699cb98bfe6c52c Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 13:35:45 +0100 Subject: [PATCH 21/39] Update icarReproHeatEventResource.json --- .../icarReproHeatEventResource.json | 38 +++++++++++++------ 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/Release Candidate Messages/icarReproHeatEventResource.json b/Release Candidate Messages/icarReproHeatEventResource.json index 900f6f9..e2d26ac 100644 --- a/Release Candidate Messages/icarReproHeatEventResource.json +++ b/Release Candidate Messages/icarReproHeatEventResource.json @@ -14,10 +14,10 @@ }, { "properties": { - "HeatDetectionMethod": { + "heatDetectionMethod": { "$ref": "icarReproHeatDetectionMethodType.json" }, - "Certainty": { + "certainty": { "$ref": "icarReproHeatCertaintyType.json" }, "expirationDateTime": { @@ -25,13 +25,25 @@ "description": "Date Time when the heat will end. ISO8601 date and time. MUST contain time zone. UTC recommended." }, "visualDetection": { - "heatSign": { - "$ref": "icarReproHeatSignType.json" - }, - "heatIntensity": { - "$ref": "icarReproHeatIntensityType.json" - }, - "HeatReportScrSenseTime": { + "type": "object", + "description": "Specific info when the heat was visually detected.", + "properties": { + "heatSigns": { + "type": "array", + "items": { + "$ref": "icarReproHeatSignType.json", + "description": "Array of heat signs." + }, + "heatIntensity": { + "$ref": "icarReproHeatIntensityType.json" + } + } + } + }, + "heatReportScrSenseTime": { + "type": "object", + "description": "Specific info when the heat was detected by SenseTime from SCR", + "properties": { "breedingWindow": { "type": "number", "format": "integer", @@ -42,8 +54,12 @@ "format": "integer", "description": "Gives an indication of the certainty of the heat indication." } - }, - "HeatReportNedapCowControl": { + } + }, + "heatReportNedapCowControl": { + "type": "object", + "description": "Specific info when the heat was detected by CowControl from NEDAP", + "properties": { "expirationDateTime": { "$ref": "icarDateTimeType.json", "description": "Date Time when the heat will end. ISO8601 date and time. MUST contain time zone. UTC recommended." From 7ffd559b87ba89e211341df2c556d5af52176722 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 13:42:39 +0100 Subject: [PATCH 22/39] Update icarReproHeatEventResource.json --- Release Candidate Messages/icarReproHeatEventResource.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Release Candidate Messages/icarReproHeatEventResource.json b/Release Candidate Messages/icarReproHeatEventResource.json index e2d26ac..73c145a 100644 --- a/Release Candidate Messages/icarReproHeatEventResource.json +++ b/Release Candidate Messages/icarReproHeatEventResource.json @@ -33,10 +33,10 @@ "items": { "$ref": "icarReproHeatSignType.json", "description": "Array of heat signs." - }, - "heatIntensity": { - "$ref": "icarReproHeatIntensityType.json" } + }, + "heatIntensity": { + "$ref": "icarReproHeatIntensityType.json" } } }, From 1ec5e5ac9b4dee64c2f4eb2b752aec77cd119b0a Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 13:50:19 +0100 Subject: [PATCH 23/39] Update icarReproMatingRecommendationResource.json --- .../icarReproMatingRecommendationResource.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Release Candidate Messages/icarReproMatingRecommendationResource.json b/Release Candidate Messages/icarReproMatingRecommendationResource.json index 75be1ef..995e958 100644 --- a/Release Candidate Messages/icarReproMatingRecommendationResource.json +++ b/Release Candidate Messages/icarReproMatingRecommendationResource.json @@ -15,10 +15,10 @@ }, { "properties": { - "bullRecommendations": { + "sireRecommendations": { "type": "array", "items": { - "$ref": "icarBullRecommendationType.json" + "$ref": "icarSireRecommendationType.json" } } } From 94f437312cd7b1dda936781312c5e5524e34ab25 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 13:51:50 +0100 Subject: [PATCH 24/39] Create icarSireRecommendationType.json --- .../icarSireRecommendationType.json | 43 +++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Release Candidate Messages/icarSireRecommendationType.json diff --git a/Release Candidate Messages/icarSireRecommendationType.json b/Release Candidate Messages/icarSireRecommendationType.json new file mode 100644 index 0000000..ea25318 --- /dev/null +++ b/Release Candidate Messages/icarSireRecommendationType.json @@ -0,0 +1,43 @@ +{ + "type": "object", + "description": "Gives one possible bull recommended to use on an animal.", + + "properties": { + "recommendationType": { + "$ref": "icarRecommendationType.json" + }, + "sireIdentifiers": { + "type": "array", + "items": { + "$ref": "icarAnimalIdentifierType.json" + }, + "description": "Unique scheme/identifier combinations for the sire, including official ID and Herdbook." + }, + "sireOfficialName": { + "type": "string", + "description": "Official herdbook name of the sire." + }, + "sireURI": { + "type": "string", + "description": "URI to an AnimalCoreResource for the sire." + }, + "isSexedSemen": { + "type": "boolean", + "description": "True if this is sexed semen." + }, + "sexedGender": { + "$ref": "icarAnimalGenderType.json", + "description": "Specify Male or Female for sexed semen only." + }, + "parity": { + "type": "number", + "format": "integer", + "description": "The parity of the cow for which the recommendation is valid." + }, + "bullRank": { + "type": "number", + "format": "integer", + "description": "The rank of the bull in the recommendation, 1 = first choice, 2 = second, ...." + } + } +} From 8e2c658460a9a47eaf100a2cc964a5a1205cb367 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 13:52:27 +0100 Subject: [PATCH 25/39] Update icarBullRecommendationType.json --- Release Candidate Messages/icarBullRecommendationType.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Release Candidate Messages/icarBullRecommendationType.json b/Release Candidate Messages/icarBullRecommendationType.json index ea25318..4e59561 100644 --- a/Release Candidate Messages/icarBullRecommendationType.json +++ b/Release Candidate Messages/icarBullRecommendationType.json @@ -1,6 +1,6 @@ { "type": "object", - "description": "Gives one possible bull recommended to use on an animal.", + "description": "Gives one possible sire recommended to use on an animal.", "properties": { "recommendationType": { @@ -34,10 +34,10 @@ "format": "integer", "description": "The parity of the cow for which the recommendation is valid." }, - "bullRank": { + "sireRank": { "type": "number", "format": "integer", - "description": "The rank of the bull in the recommendation, 1 = first choice, 2 = second, ...." + "description": "The rank of the sire in the recommendation, 1 = first choice, 2 = second, ...." } } } From bf2f2c583a8e3ca7b1221513e293b3947607a296 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 13:53:26 +0100 Subject: [PATCH 26/39] Update icarSireRecommendationType.json --- Release Candidate Messages/icarSireRecommendationType.json | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Release Candidate Messages/icarSireRecommendationType.json b/Release Candidate Messages/icarSireRecommendationType.json index ea25318..4e59561 100644 --- a/Release Candidate Messages/icarSireRecommendationType.json +++ b/Release Candidate Messages/icarSireRecommendationType.json @@ -1,6 +1,6 @@ { "type": "object", - "description": "Gives one possible bull recommended to use on an animal.", + "description": "Gives one possible sire recommended to use on an animal.", "properties": { "recommendationType": { @@ -34,10 +34,10 @@ "format": "integer", "description": "The parity of the cow for which the recommendation is valid." }, - "bullRank": { + "sireRank": { "type": "number", "format": "integer", - "description": "The rank of the bull in the recommendation, 1 = first choice, 2 = second, ...." + "description": "The rank of the sire in the recommendation, 1 = first choice, 2 = second, ...." } } } From d70e312d795692a2a1cc2cd5093ff595b6ca0d76 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 13:53:44 +0100 Subject: [PATCH 27/39] Delete icarBullRecommendationType.json --- .../icarBullRecommendationType.json | 43 ------------------- 1 file changed, 43 deletions(-) delete mode 100644 Release Candidate Messages/icarBullRecommendationType.json diff --git a/Release Candidate Messages/icarBullRecommendationType.json b/Release Candidate Messages/icarBullRecommendationType.json deleted file mode 100644 index 4e59561..0000000 --- a/Release Candidate Messages/icarBullRecommendationType.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "type": "object", - "description": "Gives one possible sire recommended to use on an animal.", - - "properties": { - "recommendationType": { - "$ref": "icarRecommendationType.json" - }, - "sireIdentifiers": { - "type": "array", - "items": { - "$ref": "icarAnimalIdentifierType.json" - }, - "description": "Unique scheme/identifier combinations for the sire, including official ID and Herdbook." - }, - "sireOfficialName": { - "type": "string", - "description": "Official herdbook name of the sire." - }, - "sireURI": { - "type": "string", - "description": "URI to an AnimalCoreResource for the sire." - }, - "isSexedSemen": { - "type": "boolean", - "description": "True if this is sexed semen." - }, - "sexedGender": { - "$ref": "icarAnimalGenderType.json", - "description": "Specify Male or Female for sexed semen only." - }, - "parity": { - "type": "number", - "format": "integer", - "description": "The parity of the cow for which the recommendation is valid." - }, - "sireRank": { - "type": "number", - "format": "integer", - "description": "The rank of the sire in the recommendation, 1 = first choice, 2 = second, ...." - } - } -} From df125270b7a67b6c91cfad18a170745d4fb3fdb1 Mon Sep 17 00:00:00 2001 From: Erwin Speybroeck <47346780+erwinspeybroeck@users.noreply.github.com> Date: Thu, 12 Dec 2019 13:54:39 +0100 Subject: [PATCH 28/39] Update icarRecommendationType.json --- Release Candidate Messages/icarRecommendationType.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Release Candidate Messages/icarRecommendationType.json b/Release Candidate Messages/icarRecommendationType.json index 1dbfd16..4c15783 100644 --- a/Release Candidate Messages/icarRecommendationType.json +++ b/Release Candidate Messages/icarRecommendationType.json @@ -1,10 +1,10 @@ { "type": "string", - "description": "the type of recommendation (BullRecommended, RecommendationImpossible, BeefBull, NoBreedingBull", + "description": "the type of recommendation (SireRecommended, RecommendationImpossible, BeefSire, NoBreedingSire", "enum": [ - "BullRecommended", + "SireRecommended", "RecommendationImpossible", - "BeefBull", - "NoBreedingBull" + "BeefSire", + "NoBreedingSire" ] } From d65436b1cfd32f7cd11d1d94ab53f03dc3895db3 Mon Sep 17 00:00:00 2001 From: Anton Hokkonen Date: Thu, 12 Dec 2019 19:51:32 +0200 Subject: [PATCH 29/39] UrlScheme structure normalization/optimization - moved common request parameters under "components/parameter" -section for easier reusing, updated parameter references - moved event schemas definitions under "components/schemas" -section for easier maintenance - moved examples under "components/examples" -section for easier maintenance - moved default response under "components/responses" -section for easier maintenance - small refactoring for capital letters in endpint names --- .../exampleUrlScheme.json | 1173 ++++++----------- 1 file changed, 383 insertions(+), 790 deletions(-) diff --git a/Release Candidate Messages/exampleUrlScheme.json b/Release Candidate Messages/exampleUrlScheme.json index 49792b0..1715183 100644 --- a/Release Candidate Messages/exampleUrlScheme.json +++ b/Release Candidate Messages/exampleUrlScheme.json @@ -38,144 +38,37 @@ "get": { "operationId": "get-milking-visits", "summary": "Get the data for milking visits", - "description": "# Purpose\nProvides data from visits of animals to a milking parlour.\n \nThis comprises all posible data. Anybody can choose to define API's that return less information in the response.\n", + "description": "# Purpose\nProvides data from visits of animals to a milking parlour.\n \nThis comprises all possible data. Anybody can choose to define API's that return less information in the response.\n", "tags": [ "release-candidate-milk" ], "parameters": [ - { - "name": "location-scheme", - "in": "path", - "description": "The scheme id for the location identifier.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "nl.ubn", - "de.farmid", - "be.pen" - ] - } - }, - { - "name": "location-id", - "in": "path", - "description": "The unique identifier for the location.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "start-date-time", - "in": "query", - "description": "The start of the date-time range for the data to get in the request.", - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "end-date-time", - "in": "query", - "description": "The end of the date-time range for the data to get in the request.", - "schema": { - "type": "string", - "format": "date-time" - } - } + { "$ref": "#/components/parameters/location-scheme" }, + { "$ref": "#/components/parameters/location-id" }, + { "$ref": "#/components/parameters/start-date-time" }, + { "$ref": "#/components/parameters/end-date-time" } ], "responses": { "200": { "description": "Successful. The response contains the milking results for the given location", "content": { "application/json": { - "schema": { + "schema": { "type": "array", "items": { - "$ref": "icarMilkingVisitEventResource.json" + "$ref": "#/components/schemas/milking-visit" } }, - "examples": { - "response": { - "value": { - "id": "706250", - "animal": { - "id": "NL 877034232", - "scheme": "nl-v1" - }, - "milkingStartingDateTime": "2019-11-01T23:58:31", - "milkingVisitDuration": { - "value": 349.0, - "unitCode": "SEC" - }, - "milkingDuration": { - "value": "210", - "unitCode": "SEC" - }, - "milkingType": "Automated", - "milkingMilkWeight": { - "value": 3.5, - "unitCode": "KGM" - }, - "milkingComplete": true, - "milkingParlourUnit": "101", - "milkingBoxNumber": 0, - "milkingDeviceId": "101", - "measureDeviceId": "101", - "eventOffset": "2019-11-01T23:58:31", - "eventDeviceId": "101", - "quarterMilkings": [ { - "icarQuarterId": "LF", - "milkingDuration": { - "value": "210", - "unitCode": "SEC" - }, - "milkingMilkWeight": { - "value": 3.5, - "unitCode": "KGM" - } - } ], - "animalMilkingSample": [ { - "bottleIdentifierType": "BRC", - "rackNumber": "3", - "bottlePosition": "7" - } ], - "icarMilkCharacteristics": [ { - "characteristic": "FAT", - "value": "3.74", - "unit": "VP", - "icarMeasuringDevice": "to_be_defined_by_ICAR-sensor_group" - }, - { - "characteristic": "PROTEIN", - "value": "3.54", - "unit": "VP" - } ] - } + "examples": { + "objectExample": { + "$ref": "#/components/examples/milking-visit" } } } } }, "default": { - "description": "An error has occured while handling the request. Check the content of the message for the error details.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error" - } - } - }, - "description": "A default response containing only a list of errors" - } - } - } + "$ref": "#/components/responses/default" } } } @@ -183,116 +76,38 @@ "/locations/{location-scheme}/{location-id}/test-day-results": { "get": { "operationId": "get-test-day-results", - "summary": "Get the data for test days", + "summary": "Get the data for test day results", "description": "# Purpose\nProvides data from the test day for animals on a farm\n", "tags": [ "release-candidate-milk" ], "parameters": [ - { - "name": "location-scheme", - "in": "path", - "description": "The scheme id for the location identifier.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "nl.ubn", - "de.farmid", - "be.pen" - ] - } - }, - { - "name": "location-id", - "in": "path", - "description": "The unique identifier for the location.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "start-date-time", - "in": "query", - "description": "The start of the date-time range for the data to get in the request.", - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "end-date-time", - "in": "query", - "description": "The end of the date-time range for the data to get in the request.", - "schema": { - "type": "string", - "format": "date-time" - } - } + { "$ref": "#/components/parameters/location-scheme" }, + { "$ref": "#/components/parameters/location-id" }, + { "$ref": "#/components/parameters/start-date-time" }, + { "$ref": "#/components/parameters/end-date-time" } ], "responses": { "200": { "description": "Successful. The response contains the test day results for the given location", "content": { "application/json": { - "schema": { + "schema": { "type": "array", "items": { - "$ref": "icarTestDayResource.json" + "$ref": "#/components/schemas/test-day-result" } }, - "examples": { - "response": { - "value": { - "id": "706250", - "animal": { - "id": "NL 877034232", - "scheme": "nl-v1" - }, - "EventDateTime": "2019-11-01T23:58:31", - "milkWeight24Hours": { - "value": "21.7", - "unitCode": "KGM" - }, - "testDayCode": "0", - "icarMilkCharacteristics": [ - { - "characteristic": "FAT", - "value": "3.74", - "unit": "VP", - "icarMeasuringDevice": "to_be_defined_by_ICAR-sensor_group" - }, - { - "characteristic": "PROTEIN", - "value": "3.54", - "unit": "VP" - } - ] - } + "examples": { + "objectExample": { + "$ref": "#/components/examples/test-day-result" } } } } }, "default": { - "description": "An error has occured while handling the request. Check the content of the message for the error details.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error" - } - } - }, - "description": "A default response containing only a list of errors" - } - } - } + "$ref": "#/components/responses/default" } } } @@ -306,80 +121,27 @@ "release-candidate-registration" ], "parameters": [ - { - "name": "location-scheme", - "in": "path", - "description": "The scheme id for the location identifier.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "nl.ubn", - "de.farmid", - "be.pen" - ] - } - }, - { - "name": "location-id", - "in": "path", - "description": "The unique identifier for the location.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "start-date-time", - "in": "query", - "description": "The start of the date-time range for the data to get in the request.", - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "end-date-time", - "in": "query", - "description": "The end of the date-time range for the data to get in the request.", - "schema": { - "type": "string", - "format": "date-time" - } - } + { "$ref": "#/components/parameters/location-scheme" }, + { "$ref": "#/components/parameters/location-id" }, + { "$ref": "#/components/parameters/start-date-time" }, + { "$ref": "#/components/parameters/end-date-time" } ], "responses": { "200": { "description": "Successful. The response contains the births for the given location", "content": { "application/json": { - "schema": { + "schema": { "type": "array", "items": { - "$ref": "icarMovementBirthEventResource.json" + "$ref": "#/components/schemas/birth" } } } } }, "default": { - "description": "An error has occured while handling the request. Check the content of the message for the error details.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error" - } - } - }, - "description": "A default response containing only a list of errors" - } - } - } + "$ref": "#/components/responses/default" } } } @@ -393,80 +155,27 @@ "release-candidate-registration" ], "parameters": [ - { - "name": "location-scheme", - "in": "path", - "description": "The scheme id for the location identifier.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "nl.ubn", - "de.farmid", - "be.pen" - ] - } - }, - { - "name": "location-id", - "in": "path", - "description": "The unique identifier for the location.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "start-date-time", - "in": "query", - "description": "The start of the date-time range for the data to get in the request.", - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "end-date-time", - "in": "query", - "description": "The end of the date-time range for the data to get in the request.", - "schema": { - "type": "string", - "format": "date-time" - } - } + { "$ref": "#/components/parameters/location-scheme" }, + { "$ref": "#/components/parameters/location-id" }, + { "$ref": "#/components/parameters/start-date-time" }, + { "$ref": "#/components/parameters/end-date-time" } ], "responses": { "200": { "description": "Successful. The response contains the died animals for the given location", "content": { "application/json": { - "schema": { + "schema": { "type": "array", "items": { - "$ref": "icarMovementDeathEventResource.json" + "$ref": "#/components/schemas/death" } } } } }, "default": { - "description": "An error has occured while handling the request. Check the content of the message for the error details.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error" - } - } - }, - "description": "A default response containing only a list of errors" - } - } - } + "$ref": "#/components/responses/default" } } } @@ -480,147 +189,32 @@ "release-candidate-registration" ], "parameters": [ - { - "name": "location-scheme", - "in": "path", - "description": "The scheme id for the location identifier.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "nl.ubn", - "de.farmid", - "be.pen" - ] - } - }, - { - "name": "location-id", - "in": "path", - "description": "The unique identifier for the location.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "start-date-time", - "in": "query", - "description": "The start of the date-time range for the data to get in the request.", - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "end-date-time", - "in": "query", - "description": "The end of the date-time range for the data to get in the request.", - "schema": { - "type": "string", - "format": "date-time" - } - } + { "$ref": "#/components/parameters/location-scheme" }, + { "$ref": "#/components/parameters/location-id" }, + { "$ref": "#/components/parameters/start-date-time" }, + { "$ref": "#/components/parameters/end-date-time" } ], "responses": { "200": { "description": "Successful. The response contains the arrived animals for the given location", "content": { "application/json": { - "schema": { + "schema": { "type": "array", "items": { - "$ref": "icarMovementArrivalEventResource.json" + "$ref": "#/components/schemas/arrival" } }, - "examples": { - "response": { - "value": { - "id": "ac9bdd26-0e20-44e7-b311-7d3d988f9717", - "animal": { - "id": "NL 919713288", - "scheme": "nl.ubn" - }, - "eventDateTime": "2016-01-06", - "location": { - "id": "231817", - "scheme": "nl.ubn" - }, - "animalDetail": { - "alternativeIdentifiers": [], - "species": "Cattle", - "gender": "Female", - "birthDate": "2013-11-06", - "breedFractions": { - "denominator": "8", - "fractions": [ - { - "breed": { - "id": "HF", - "scheme": "icar.org" - }, - "fraction": "8" - } - ] - }, - "coatColor": "RB", - "managementTag": "88", - "name": "NELLY 258", - "productionPurpose": "Milk", - "status": "Alive", - "parentage": [ - { - "parentOf": { - "id": "NL 919713288", - "scheme": "nl.ubn" - }, - "gender": "Female", - "relation": "Genetic", - "identifier": { - "id": "NL 765410142", - "scheme": "nl.ubn" - }, - "officialName": "NELLY 211" - }, - { - "parentOf": { - "id": "NL 919713288", - "scheme": "nl.ubn" - }, - "gender": "Male", - "relation": "Genetic", - "identifier": { - "id": "NL 399745212", - "scheme": "nl.ubn" - }, - "officialName": "TOPSPEED KODAK" - } - ] - } - } + "examples": { + "objectExample": { + "$ref": "#/components/examples/arrival" } } } } }, "default": { - "description": "An error has occured while handling the request. Check the content of the message for the error details.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error" - } - } - }, - "description": "A default response containing only a list of errors" - } - } - } + "$ref": "#/components/responses/default" } } } @@ -634,80 +228,27 @@ "release-candidate-registration" ], "parameters": [ - { - "name": "location-scheme", - "in": "path", - "description": "The scheme id for the location identifier.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "nl.ubn", - "de.farmid", - "be.pen" - ] - } - }, - { - "name": "location-id", - "in": "path", - "description": "The unique identifier for the location.", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "start-date-time", - "in": "query", - "description": "The start of the date-time range for the data to get in the request.", - "schema": { - "type": "string", - "format": "date-time" - } - }, - { - "name": "end-date-time", - "in": "query", - "description": "The end of the date-time range for the data to get in the request.", - "schema": { - "type": "string", - "format": "date-time" - } - } + { "$ref": "#/components/parameters/location-scheme" }, + { "$ref": "#/components/parameters/location-id" }, + { "$ref": "#/components/parameters/start-date-time" }, + { "$ref": "#/components/parameters/end-date-time" } ], "responses": { "200": { "description": "Successful. The response contains the milking results for the given location", "content": { "application/json": { - "schema": { + "schema": { "type": "array", "items": { - "$ref": "icarMovementDepartureEventResource.json" + "$ref": "#/components/schemas/departure" } } } } }, "default": { - "description": "An error has occured while handling the request. Check the content of the message for the error details.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error" - } - } - }, - "description": "A default response containing only a list of errors" - } - } - } + "$ref": "#/components/responses/default" } } } @@ -721,67 +262,30 @@ "release-candidate-registration" ], "parameters": [ - { - "name": "location-scheme", - "in": "path", - "description": "The scheme id for the location identifier.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "nl.ubn", - "de.farmid", - "be.pen" - ] - } - }, - { - "name": "location-id", - "in": "path", - "description": "The unique identifier for the location.", - "required": true, - "schema": { - "type": "string" - } - } + { "$ref": "#/components/parameters/location-scheme" }, + { "$ref": "#/components/parameters/location-id" } ], "responses": { "200": { "description": "Successful. The response contains the animals for the given location", "content": { "application/json": { - "schema": { + "schema": { "type": "array", "items": { - "$ref": "icarAnimalCoreResource.json" + "$ref": "#/components/schemas/animal" } } } } }, "default": { - "description": "An error has occured while handling the request. Check the content of the message for the error details.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error" - } - } - }, - "description": "A default response containing only a list of errors" - } - } - } + "$ref": "#/components/responses/default" } } } }, - "/locations/{location-scheme}/{location-id}/Pregnancy-Diagnosis": { + "/locations/{location-scheme}/{location-id}/pregnancy-diagnosis": { "get": { "operationId": "get-pregnancy-diagnosis", "summary": "Get the pregnancy diagnosis for a certain location", @@ -790,344 +294,169 @@ "release-candidate-reproduction" ], "parameters": [ - { - "name": "location-scheme", - "in": "path", - "description": "The scheme id for the location identifier.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "nl.ubn", - "de.farmid", - "be.pen" - ] - } - }, - { - "name": "location-id", - "in": "path", - "description": "The unique identifier for the location.", - "required": true, - "schema": { - "type": "string" - } - } + { "$ref": "#/components/parameters/location-scheme" }, + { "$ref": "#/components/parameters/location-id" }, + { "$ref": "#/components/parameters/start-date-time" }, + { "$ref": "#/components/parameters/end-date-time" } ], "responses": { "200": { "description": "Successful. The response contains the pregnancy diagnosis for the given location", "content": { "application/json": { - "schema": { + "schema": { "type": "array", "items": { - "$ref": "icarReproPregnancyDiagnosisEventResource.json" + "$ref": "#/components/schemas/pregnancy-diagnosis" } } } } }, "default": { - "description": "An error has occured while handling the request. Check the content of the message for the error details.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error" - } - } - }, - "description": "A default response containing only a list of errors" - } - } - } + "$ref": "#/components/responses/default" } } } }, - "/locations/{location-scheme}/{location-id}/Inseminations": { + "/locations/{location-scheme}/{location-id}/inseminations": { "get": { - "operationId": "get-Inseminations", + "operationId": "get-inseminations", "summary": "Get the inseminations for a certain location", "description": "# Purpose\nProvides the Inseminations on a location\n", "tags": [ "release-candidate-reproduction" ], "parameters": [ - { - "name": "location-scheme", - "in": "path", - "description": "The scheme id for the location identifier.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "nl.ubn", - "de.farmid", - "be.pen" - ] - } - }, - { - "name": "location-id", - "in": "path", - "description": "The unique identifier for the location.", - "required": true, - "schema": { - "type": "string" - } - } + { "$ref": "#/components/parameters/location-scheme" }, + { "$ref": "#/components/parameters/location-id" }, + { "$ref": "#/components/parameters/start-date-time" }, + { "$ref": "#/components/parameters/end-date-time" } ], "responses": { "200": { "description": "Successful. The response contains the inseminations for the given location", "content": { "application/json": { - "schema": { + "schema": { "type": "array", "items": { - "$ref": "icarReproInseminationEventResource.json" + "$ref": "#/components/schemas/insemination" } } } } }, "default": { - "description": "An error has occured while handling the request. Check the content of the message for the error details.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error" - } - } - }, - "description": "A default response containing only a list of errors" - } - } - } + "$ref": "#/components/responses/default" } } } }, - "/locations/{location-scheme}/{location-id}/Drying-Offs": { + "/locations/{location-scheme}/{location-id}/drying-offs": { "get": { - "operationId": "get-Drying-Offs", + "operationId": "get-drying-offs", "summary": "Get the drying off for a certain location", "description": "# Purpose\nProvides the drying off on a location\n", "tags": [ "release-candidate-reproduction" ], "parameters": [ - { - "name": "location-scheme", - "in": "path", - "description": "The scheme id for the location identifier.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "nl.ubn", - "de.farmid", - "be.pen" - ] - } - }, - { - "name": "location-id", - "in": "path", - "description": "The unique identifier for the location.", - "required": true, - "schema": { - "type": "string" - } - } + { "$ref": "#/components/parameters/location-scheme" }, + { "$ref": "#/components/parameters/location-id" }, + { "$ref": "#/components/parameters/start-date-time" }, + { "$ref": "#/components/parameters/end-date-time" } ], "responses": { "200": { "description": "Successful. The response contains the drying off for the given location", "content": { "application/json": { - "schema": { + "schema": { "type": "array", "items": { - "$ref": "icarMilkingDryOffEventResource.json" + "$ref": "#/components/schemas/drying-off" } } } } }, "default": { - "description": "An error has occured while handling the request. Check the content of the message for the error details.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error" - } - } - }, - "description": "A default response containing only a list of errors" - } - } - } + "$ref": "#/components/responses/default" } } } }, - "/locations/{location-scheme}/{location-id}/Abortions": { + "/locations/{location-scheme}/{location-id}/abortions": { "get": { - "operationId": "get-Abortions", + "operationId": "get-abortions", "summary": "Get the abortion events for a certain location", "description": "# Purpose\nProvides the abortion events on a location\n", "tags": [ "release-candidate-reproduction" ], "parameters": [ - { - "name": "location-scheme", - "in": "path", - "description": "The scheme id for the location identifier.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "nl.ubn", - "de.farmid", - "be.pen" - ] - } - }, - { - "name": "location-id", - "in": "path", - "description": "The unique identifier for the location.", - "required": true, - "schema": { - "type": "string" - } - } + { "$ref": "#/components/parameters/location-scheme" }, + { "$ref": "#/components/parameters/location-id" }, + { "$ref": "#/components/parameters/start-date-time" }, + { "$ref": "#/components/parameters/end-date-time" } ], "responses": { "200": { "description": "Successful. The response contains the abortion events for the given location", "content": { "application/json": { - "schema": { + "schema": { "type": "array", "items": { - "$ref": "icarReproAbortionEventResource.json" + "$ref": "#/components/schemas/abortion" } } } } }, "default": { - "description": "An error has occured while handling the request. Check the content of the message for the error details.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error" - } - } - }, - "description": "A default response containing only a list of errors" - } - } - } + "$ref": "#/components/responses/default" } } } }, - "/locations/{location-scheme}/{location-id}/Parturitions": { - "get": { - "operationId": "get-Parturitions", - "summary": "Get the Parturition events for a certain location", - "description": "# Purpose\nProvides the Parturition events on a location\n", - "tags": [ - "release-candidate-reproduction" - ], - "parameters": [ - { - "name": "location-scheme", - "in": "path", - "description": "The scheme id for the location identifier.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "nl.ubn", - "de.farmid", - "be.pen" - ] - } - }, - { - "name": "location-id", - "in": "path", - "description": "The unique identifier for the location.", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Successful. The response contains the Parturition events for the given location", - "content": { - "application/json": { - "schema": { + "/locations/{location-scheme}/{location-id}/parturitions": { + "get": { + "operationId": "get-parturitions", + "summary": "Get the parturition events for a certain location", + "description": "# Purpose\nProvides the Parturition events on a location\n", + "tags": [ + "release-candidate-reproduction" + ], + "parameters": [ + { "$ref": "#/components/parameters/location-scheme" }, + { "$ref": "#/components/parameters/location-id" }, + { "$ref": "#/components/parameters/start-date-time" }, + { "$ref": "#/components/parameters/end-date-time" } + ], + "responses": { + "200": { + "description": "Successful. The response contains the Parturition events for the given location", + "content": { + "application/json": { + "schema": { "type": "array", "items": { - "$ref": "icarReproParturitionEventResource.json" + "$ref": "#/components/schemas/parturition" } } - } - } - }, - "default": { - "description": "An error has occured while handling the request. Check the content of the message for the error details.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "errors": { - "type": "array", - "items": { - "$ref": "#/components/schemas/error" - } - } - }, - "description": "A default response containing only a list of errors" } } + }, + "default": { + "$ref": "#/components/responses/default" } } } } - } -}, -"components": { + }, + "components": { "schemas": { "error": { "type": "object", @@ -1137,6 +466,270 @@ "$ref": "exampleErrorResource.json" } } + }, + "milking-visit": { + "$ref": "icarMilkingVisitEventResource.json" + }, + "test-day-result": { + "$ref": "icarTestDayResource.json" + }, + "birth": { + "$ref": "icarMovementBirthEventResource.json" + }, + "death": { + "$ref": "icarMovementDeathEventResource.json" + }, + "arrival": { + "$ref": "icarMovementArrivalEventResource.json" + }, + "departure": { + "$ref": "icarMovementDepartureEventResource.json" + }, + "animal": { + "$ref": "icarAnimalCoreResource.json" + }, + "pregnancy-diagnosis": { + "$ref": "icarReproPregnancyDiagnosisEventResource.json" + }, + "insemination": { + "$ref": "icarReproInseminationType.json" + }, + "drying-off": { + "$ref": "icarMilkingDryOffEventResource.json" + }, + "abortion": { + "$ref": "icarReproAbortionEventResource.json" + }, + "parturition": { + "$ref": "icarReproParturitionEventResource.json" + } + }, + "parameters": { + "location-scheme": { + "name": "location-scheme", + "in": "path", + "description": "The scheme id for the location identifier.", + "required": true, + "schema": { + "type": "string", + "enum": [ + "nl.ubn", + "de.farmid", + "be.pen" + ] + } + }, + "location-id": { + "name": "location-id", + "in": "path", + "description": "The unique identifier for the location.", + "required": true, + "schema": { + "type": "string" + } + }, + "start-date-time": { + "name": "start-date-time", + "in": "query", + "description": "The start of the date-time range for the data to get in the request.", + "schema": { + "type": "string", + "format": "date-time" + } + }, + "end-date-time": { + "name": "end-date-time", + "in": "query", + "description": "The end of the date-time range for the data to get in the request.", + "schema": { + "type": "string", + "format": "date-time" + } + } + }, + "responses": { + "default": { + "description": "An error has occured while handling the request. Check the content of the message for the error details.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "errors": { + "type": "array", + "items": { + "$ref": "#/components/schemas/error" + } + } + }, + "description": "A default response containing only a list of errors" + } + } + } + } + }, + "examples": { + "arrival": { + "value": [ + { + "id": "ac9bdd26-0e20-44e7-b311-7d3d988f9717", + "animal": { + "id": "NL 919713288", + "scheme": "nl.ubn" + }, + "eventDateTime": "2016-01-06", + "location": { + "id": "231817", + "scheme": "nl.ubn" + }, + "animalDetail": { + "alternativeIdentifiers": [], + "species": "Cattle", + "gender": "Female", + "birthDate": "2013-11-06", + "breedFractions": { + "denominator": "8", + "fractions": [ + { + "breed": { + "id": "HF", + "scheme": "icar.org" + }, + "fraction": "8" + } + ] + }, + "coatColor": "RB", + "managementTag": "88", + "name": "NELLY 258", + "productionPurpose": "Milk", + "status": "Alive", + "parentage": [ + { + "parentOf": { + "id": "NL 919713288", + "scheme": "nl.ubn" + }, + "gender": "Female", + "relation": "Genetic", + "identifier": { + "id": "NL 765410142", + "scheme": "nl.ubn" + }, + "officialName": "NELLY 211" + }, + { + "parentOf": { + "id": "NL 919713288", + "scheme": "nl.ubn" + }, + "gender": "Male", + "relation": "Genetic", + "identifier": { + "id": "NL 399745212", + "scheme": "nl.ubn" + }, + "officialName": "TOPSPEED KODAK" + } + ] + } + } + ] + }, + "milking-visit": { + "value": [ + { + "id": "706250", + "animal": { + "id": "NL 877034232", + "scheme": "nl-v1" + }, + "milkingStartingDateTime": "2019-11-01T23:58:31", + "milkingVisitDuration": { + "value": 349.0, + "unitCode": "SEC" + }, + "milkingDuration": { + "value": "210", + "unitCode": "SEC" + }, + "milkingType": "Automated", + "milkingMilkWeight": { + "value": 3.5, + "unitCode": "KGM" + }, + "milkingComplete": true, + "milkingParlourUnit": "101", + "milkingBoxNumber": 0, + "milkingDeviceId": "101", + "measureDeviceId": "101", + "eventOffset": "2019-11-01T23:58:31", + "eventDeviceId": "101", + "quarterMilkings": [ + { + "icarQuarterId": "LF", + "milkingDuration": { + "value": "210", + "unitCode": "SEC" + }, + "milkingMilkWeight": { + "value": 3.5, + "unitCode": "KGM" + } + } + ], + "animalMilkingSample": [ + { + "bottleIdentifierType": "BRC", + "rackNumber": "3", + "bottlePosition": "7" + } + ], + "icarMilkCharacteristics": [ + { + "characteristic": "FAT", + "value": "3.74", + "unit": "VP", + "icarMeasuringDevice": "to_be_defined_by_ICAR-sensor_group" + }, + { + "characteristic": "PROTEIN", + "value": "3.54", + "unit": "VP" + } + ] + } + ] + }, + "test-day-result": { + "value": [ + { + "id": "706250", + "animal": { + "id": "NL 877034232", + "scheme": "nl-v1" + }, + "EventDateTime": "2019-11-01T23:58:31", + "milkWeight24Hours": { + "value": "21.7", + "unitCode": "KGM" + }, + "testDayCode": "0", + "icarMilkCharacteristics": [ + { + "characteristic": "FAT", + "value": "3.74", + "unit": "VP", + "icarMeasuringDevice": "to_be_defined_by_ICAR-sensor_group" + }, + { + "characteristic": "PROTEIN", + "value": "3.54", + "unit": "VP" + } + ] + } + ] } } } From 5a5359cfdbdd8f90f4dbddae79ca78191797f49c Mon Sep 17 00:00:00 2001 From: Anton Hokkonen Date: Thu, 12 Dec 2019 20:05:13 +0200 Subject: [PATCH 30/39] Added missing descriptions in some resources --- Release Candidate Messages/icarAnimalCoreResource.json | 2 ++ .../icarMilkingVisitEventResource.json | 2 ++ .../icarMovementArrivalEventResource.json | 4 +++- .../icarMovementBirthEventResource.json | 2 ++ .../icarMovementDeathEventResource.json | 2 ++ .../icarMovementDepartureEventResource.json | 2 ++ Release Candidate Messages/icarTestDayResource.json | 8 +++++--- 7 files changed, 18 insertions(+), 4 deletions(-) diff --git a/Release Candidate Messages/icarAnimalCoreResource.json b/Release Candidate Messages/icarAnimalCoreResource.json index 3ff5999..4d9af85 100644 --- a/Release Candidate Messages/icarAnimalCoreResource.json +++ b/Release Candidate Messages/icarAnimalCoreResource.json @@ -6,6 +6,8 @@ ], "type": "object", + + "description": "Core schema for representing animal", "allOf": [ { diff --git a/Release Candidate Messages/icarMilkingVisitEventResource.json b/Release Candidate Messages/icarMilkingVisitEventResource.json index 8991fab..19a240d 100644 --- a/Release Candidate Messages/icarMilkingVisitEventResource.json +++ b/Release Candidate Messages/icarMilkingVisitEventResource.json @@ -7,6 +7,8 @@ ], "type": "object", + + "description": "Event for recording milking visit", "allOf": [ { diff --git a/Release Candidate Messages/icarMovementArrivalEventResource.json b/Release Candidate Messages/icarMovementArrivalEventResource.json index 435a5a7..4affefc 100644 --- a/Release Candidate Messages/icarMovementArrivalEventResource.json +++ b/Release Candidate Messages/icarMovementArrivalEventResource.json @@ -5,7 +5,9 @@ "eventDateTime", "originLocation" ], - + + "description": "Event for recording animal arrival", + "type": "object", "allOf": [ diff --git a/Release Candidate Messages/icarMovementBirthEventResource.json b/Release Candidate Messages/icarMovementBirthEventResource.json index 4f14527..99888d5 100644 --- a/Release Candidate Messages/icarMovementBirthEventResource.json +++ b/Release Candidate Messages/icarMovementBirthEventResource.json @@ -5,6 +5,8 @@ "eventDateTime", "location" ], + + "description": "Event for recording animal birth", "type": "object", diff --git a/Release Candidate Messages/icarMovementDeathEventResource.json b/Release Candidate Messages/icarMovementDeathEventResource.json index a8710e8..78de4a8 100644 --- a/Release Candidate Messages/icarMovementDeathEventResource.json +++ b/Release Candidate Messages/icarMovementDeathEventResource.json @@ -4,6 +4,8 @@ "animal", "eventDateTime" ], + + "description": "Event for recording animal death", "type": "object", diff --git a/Release Candidate Messages/icarMovementDepartureEventResource.json b/Release Candidate Messages/icarMovementDepartureEventResource.json index 8cbac98..eee4020 100644 --- a/Release Candidate Messages/icarMovementDepartureEventResource.json +++ b/Release Candidate Messages/icarMovementDepartureEventResource.json @@ -5,6 +5,8 @@ "eventDateTime", "destinationLocation" ], + + "description": "Event for recording animal departure", "type": "object", diff --git a/Release Candidate Messages/icarTestDayResource.json b/Release Candidate Messages/icarTestDayResource.json index c90d5b2..965b874 100644 --- a/Release Candidate Messages/icarTestDayResource.json +++ b/Release Candidate Messages/icarTestDayResource.json @@ -1,12 +1,14 @@ -{ +{ "required": [ "id", "animal", "EventDateTime" ], - + + "description": "Event for representing test day result", + "type": "object", - + "allOf": [ { "$ref": "icarEventCoreResource.json" From 0894f212c931e2e88dad07e869c163fdd59f15ec Mon Sep 17 00:00:00 2001 From: Anton Hokkonen Date: Fri, 13 Dec 2019 12:37:10 +0200 Subject: [PATCH 31/39] Merged changes from Erwin' commit, resolved conflicts with local changes. --- .../exampleUrlScheme.json | 48 +++++++------------ 1 file changed, 17 insertions(+), 31 deletions(-) diff --git a/Release Candidate Messages/exampleUrlScheme.json b/Release Candidate Messages/exampleUrlScheme.json index 41af9b9..17e777a 100644 --- a/Release Candidate Messages/exampleUrlScheme.json +++ b/Release Candidate Messages/exampleUrlScheme.json @@ -60,7 +60,7 @@ } }, "examples": { - "objectExample": { + "base": { "$ref": "#/components/examples/milking-visit" } } @@ -99,7 +99,7 @@ } }, "examples": { - "objectExample": { + "base": { "$ref": "#/components/examples/test-day-result" } } @@ -206,7 +206,7 @@ } }, "examples": { - "objectExample": { + "base": { "$ref": "#/components/examples/arrival" } } @@ -342,7 +342,7 @@ "schema": { "type": "array", "items": { - "$ref": "icarReproHeatEventResource.json" + "$ref": "#/components/schemas/heat" } } } @@ -476,7 +476,6 @@ "content": { "application/json": { "schema": { - ">>>>>>>" "pr/1", "type": "array", "items": { "$ref": "#/components/schemas/parturition" @@ -500,29 +499,10 @@ "release-candidate-reproduction" ], "parameters": [ - { - "name": "location-scheme", - "in": "path", - "description": "The scheme id for the location identifier.", - "required": true, - "schema": { - "type": "string", - "enum": [ - "nl.ubn", - "de.farmid", - "be.pen" - ] - } - }, - { - "name": "location-id", - "in": "path", - "description": "The unique identifier for the location.", - "required": true, - "schema": { - "type": "string" - } - } + { "$ref": "#/components/parameters/location-scheme" }, + { "$ref": "#/components/parameters/location-id" }, + { "$ref": "#/components/parameters/start-date-time" }, + { "$ref": "#/components/parameters/end-date-time" } ], "responses": { "200": { @@ -532,7 +512,7 @@ "schema": { "type": "array", "items": { - "$ref": "icarReproMatingRecommendationResource.json" + "$ref": "#/components/schemas/mating-recommendation" } } } @@ -559,6 +539,9 @@ "milking-visit": { "$ref": "icarMilkingVisitEventResource.json" }, + "mating-recommendation": { + "$ref": "icarReproMatingRecommendationResource.json" + }, "test-day-result": { "$ref": "icarTestDayResource.json" }, @@ -577,11 +560,14 @@ "animal": { "$ref": "icarAnimalCoreResource.json" }, - "pregnancy-checks": { + "pregnancy-check": { "$ref": "icarReproPregnancyCheckEventResource.json" }, + "heat": { + "$ref": "icarReproHeatEventResource.json" + }, "insemination": { - "$ref": "icarReproInseminationType.json" + "$ref": "icarReproInseminationEventResource.json" }, "drying-off": { "$ref": "icarMilkingDryOffEventResource.json" From 11dee961de2c598155f77bdc6040ddde237ac0ea Mon Sep 17 00:00:00 2001 From: Anton Hokkonen Date: Wed, 29 Jan 2020 12:46:39 +0200 Subject: [PATCH 32/39] Added file with drying off examples from finnish national milk recording organizations --- .../Examples/exampleDryOffEvent_Finland.json | 62 +++++++++++++++++++ .../exampleUrlScheme.json | 13 +++- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 Release Candidate Messages/Examples/exampleDryOffEvent_Finland.json diff --git a/Release Candidate Messages/Examples/exampleDryOffEvent_Finland.json b/Release Candidate Messages/Examples/exampleDryOffEvent_Finland.json new file mode 100644 index 0000000..63ba698 --- /dev/null +++ b/Release Candidate Messages/Examples/exampleDryOffEvent_Finland.json @@ -0,0 +1,62 @@ +[ + { + "id": "4bd700b2-4f8b-4ab8-8cbf-7bb62d4e2bc3", + "animal": { + "id": "FI000010065148-2", + "scheme": "fi.animal-id" + }, + "eventDateTime": "2000-03-19T00:00:00", + "location": { + "id": "990000001", + "scheme": "fi.farm-id" + }, + "meta": { + "source": "fi.mro", + "creator": "administrator", + "modified": null, + "created": "2020-01-29T08:49:06.0421042+00:00", + "validFrom": null, + "validTo": null + } + }, + { + "id": "85ec425d-f079-437e-801b-88756c912102", + "animal": { + "id": "FI000010065150-1", + "scheme": "fi.animal-id" + }, + "eventDateTime": "2000-04-03T00:00:00", + "location": { + "id": "990000001", + "scheme": "fi.farm-id" + }, + "meta": { + "source": "fi.mro", + "creator": "administrator", + "modified": null, + "created": "2020-01-29T08:49:06.1314223+00:00", + "validFrom": null, + "validTo": null + } + }, + { + "id": "5fc45dfd-a347-4d5b-9d8d-dd5c0ef94fca", + "animal": { + "id": "FI000010214759-3", + "scheme": "fi.animal-id" + }, + "eventDateTime": "2000-05-22T00:00:00", + "location": { + "id": "990000001", + "scheme": "fi.farm-id" + }, + "meta": { + "source": "fi.mro", + "creator": "administrator", + "modified": null, + "created": "2020-01-29T08:49:06.4306292+00:00", + "validFrom": null, + "validTo": null + } + } +] \ No newline at end of file diff --git a/Release Candidate Messages/exampleUrlScheme.json b/Release Candidate Messages/exampleUrlScheme.json index 17e777a..187eff7 100644 --- a/Release Candidate Messages/exampleUrlScheme.json +++ b/Release Candidate Messages/exampleUrlScheme.json @@ -412,6 +412,11 @@ "items": { "$ref": "#/components/schemas/drying-off" } + }, + "examples": { + "finland": { + "$ref": "#/components/examples/dryOffFinland" + } } } } @@ -805,7 +810,13 @@ ] } ] - } + }, + "dryOffFinland": { + "value": { + "summary": "Dry off event examples from finnish milk recording organization", + "externalValue": "examples/exampleDryOffEvent_Finland.json" + } + } } } } From 69412df9630c75e9c8ddc0f0c436612e26f52747 Mon Sep 17 00:00:00 2001 From: Anton Hokkonen Date: Wed, 29 Jan 2020 13:42:20 +0200 Subject: [PATCH 33/39] SOme small tweaks to previous change --- Release Candidate Messages/exampleUrlScheme.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Release Candidate Messages/exampleUrlScheme.json b/Release Candidate Messages/exampleUrlScheme.json index 187eff7..197f8c4 100644 --- a/Release Candidate Messages/exampleUrlScheme.json +++ b/Release Candidate Messages/exampleUrlScheme.json @@ -12,7 +12,7 @@ }, "servers": [ { - "url": "https://icar-ade.standard.com" + "url": "https://raw.githubusercontent.com/ahokkonen/ICAR/master/Release%20Candidate%20Messages" } ], "tags": [ @@ -814,7 +814,7 @@ "dryOffFinland": { "value": { "summary": "Dry off event examples from finnish milk recording organization", - "externalValue": "examples/exampleDryOffEvent_Finland.json" + "externalValue": "/Examples/exampleDryOffEvent_Finland.json" } } } From 0f8c1057ee95bbba41fbb70d4b7b1b4241a4a3bb Mon Sep 17 00:00:00 2001 From: Anton Hokkonen Date: Wed, 29 Jan 2020 15:59:37 +0200 Subject: [PATCH 34/39] Added drying off examples for finnish and swedish milk recording organizations --- .../Examples/exampleDryOffEvent_Finland.json | 62 ---- .../exampleUrlScheme.json | 320 ++++++++++++++---- 2 files changed, 256 insertions(+), 126 deletions(-) delete mode 100644 Release Candidate Messages/Examples/exampleDryOffEvent_Finland.json diff --git a/Release Candidate Messages/Examples/exampleDryOffEvent_Finland.json b/Release Candidate Messages/Examples/exampleDryOffEvent_Finland.json deleted file mode 100644 index 63ba698..0000000 --- a/Release Candidate Messages/Examples/exampleDryOffEvent_Finland.json +++ /dev/null @@ -1,62 +0,0 @@ -[ - { - "id": "4bd700b2-4f8b-4ab8-8cbf-7bb62d4e2bc3", - "animal": { - "id": "FI000010065148-2", - "scheme": "fi.animal-id" - }, - "eventDateTime": "2000-03-19T00:00:00", - "location": { - "id": "990000001", - "scheme": "fi.farm-id" - }, - "meta": { - "source": "fi.mro", - "creator": "administrator", - "modified": null, - "created": "2020-01-29T08:49:06.0421042+00:00", - "validFrom": null, - "validTo": null - } - }, - { - "id": "85ec425d-f079-437e-801b-88756c912102", - "animal": { - "id": "FI000010065150-1", - "scheme": "fi.animal-id" - }, - "eventDateTime": "2000-04-03T00:00:00", - "location": { - "id": "990000001", - "scheme": "fi.farm-id" - }, - "meta": { - "source": "fi.mro", - "creator": "administrator", - "modified": null, - "created": "2020-01-29T08:49:06.1314223+00:00", - "validFrom": null, - "validTo": null - } - }, - { - "id": "5fc45dfd-a347-4d5b-9d8d-dd5c0ef94fca", - "animal": { - "id": "FI000010214759-3", - "scheme": "fi.animal-id" - }, - "eventDateTime": "2000-05-22T00:00:00", - "location": { - "id": "990000001", - "scheme": "fi.farm-id" - }, - "meta": { - "source": "fi.mro", - "creator": "administrator", - "modified": null, - "created": "2020-01-29T08:49:06.4306292+00:00", - "validFrom": null, - "validTo": null - } - } -] \ No newline at end of file diff --git a/Release Candidate Messages/exampleUrlScheme.json b/Release Candidate Messages/exampleUrlScheme.json index 197f8c4..838f0ad 100644 --- a/Release Candidate Messages/exampleUrlScheme.json +++ b/Release Candidate Messages/exampleUrlScheme.json @@ -12,7 +12,7 @@ }, "servers": [ { - "url": "https://raw.githubusercontent.com/ahokkonen/ICAR/master/Release%20Candidate%20Messages" + "url": "https://icar-ade.standard.com" } ], "tags": [ @@ -43,10 +43,18 @@ "release-candidate-milk" ], "parameters": [ - { "$ref": "#/components/parameters/location-scheme" }, - { "$ref": "#/components/parameters/location-id" }, - { "$ref": "#/components/parameters/start-date-time" }, - { "$ref": "#/components/parameters/end-date-time" } + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/start-date-time" + }, + { + "$ref": "#/components/parameters/end-date-time" + } ], "responses": { "200": { @@ -82,10 +90,18 @@ "release-candidate-milk" ], "parameters": [ - { "$ref": "#/components/parameters/location-scheme" }, - { "$ref": "#/components/parameters/location-id" }, - { "$ref": "#/components/parameters/start-date-time" }, - { "$ref": "#/components/parameters/end-date-time" } + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/start-date-time" + }, + { + "$ref": "#/components/parameters/end-date-time" + } ], "responses": { "200": { @@ -121,10 +137,18 @@ "release-candidate-registration" ], "parameters": [ - { "$ref": "#/components/parameters/location-scheme" }, - { "$ref": "#/components/parameters/location-id" }, - { "$ref": "#/components/parameters/start-date-time" }, - { "$ref": "#/components/parameters/end-date-time" } + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/start-date-time" + }, + { + "$ref": "#/components/parameters/end-date-time" + } ], "responses": { "200": { @@ -155,10 +179,18 @@ "release-candidate-registration" ], "parameters": [ - { "$ref": "#/components/parameters/location-scheme" }, - { "$ref": "#/components/parameters/location-id" }, - { "$ref": "#/components/parameters/start-date-time" }, - { "$ref": "#/components/parameters/end-date-time" } + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/start-date-time" + }, + { + "$ref": "#/components/parameters/end-date-time" + } ], "responses": { "200": { @@ -189,10 +221,18 @@ "release-candidate-registration" ], "parameters": [ - { "$ref": "#/components/parameters/location-scheme" }, - { "$ref": "#/components/parameters/location-id" }, - { "$ref": "#/components/parameters/start-date-time" }, - { "$ref": "#/components/parameters/end-date-time" } + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/start-date-time" + }, + { + "$ref": "#/components/parameters/end-date-time" + } ], "responses": { "200": { @@ -228,10 +268,18 @@ "release-candidate-registration" ], "parameters": [ - { "$ref": "#/components/parameters/location-scheme" }, - { "$ref": "#/components/parameters/location-id" }, - { "$ref": "#/components/parameters/start-date-time" }, - { "$ref": "#/components/parameters/end-date-time" } + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/start-date-time" + }, + { + "$ref": "#/components/parameters/end-date-time" + } ], "responses": { "200": { @@ -262,8 +310,12 @@ "release-candidate-registration" ], "parameters": [ - { "$ref": "#/components/parameters/location-scheme" }, - { "$ref": "#/components/parameters/location-id" } + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } ], "responses": { "200": { @@ -285,7 +337,6 @@ } } }, - "/locations/{location-scheme}/{location-id}/pregnancy-checks": { "get": { "operationId": "get-pregnancy-checks", @@ -295,10 +346,18 @@ "release-candidate-reproduction" ], "parameters": [ - { "$ref": "#/components/parameters/location-scheme" }, - { "$ref": "#/components/parameters/location-id" }, - { "$ref": "#/components/parameters/start-date-time" }, - { "$ref": "#/components/parameters/end-date-time" } + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/start-date-time" + }, + { + "$ref": "#/components/parameters/end-date-time" + } ], "responses": { "200": { @@ -329,10 +388,18 @@ "release-candidate-reproduction" ], "parameters": [ - { "$ref": "#/components/parameters/location-scheme" }, - { "$ref": "#/components/parameters/location-id" }, - { "$ref": "#/components/parameters/start-date-time" }, - { "$ref": "#/components/parameters/end-date-time" } + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/start-date-time" + }, + { + "$ref": "#/components/parameters/end-date-time" + } ], "responses": { "200": { @@ -363,10 +430,18 @@ "release-candidate-reproduction" ], "parameters": [ - { "$ref": "#/components/parameters/location-scheme" }, - { "$ref": "#/components/parameters/location-id" }, - { "$ref": "#/components/parameters/start-date-time" }, - { "$ref": "#/components/parameters/end-date-time" } + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/start-date-time" + }, + { + "$ref": "#/components/parameters/end-date-time" + } ], "responses": { "200": { @@ -397,10 +472,18 @@ "release-candidate-reproduction" ], "parameters": [ - { "$ref": "#/components/parameters/location-scheme" }, - { "$ref": "#/components/parameters/location-id" }, - { "$ref": "#/components/parameters/start-date-time" }, - { "$ref": "#/components/parameters/end-date-time" } + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/start-date-time" + }, + { + "$ref": "#/components/parameters/end-date-time" + } ], "responses": { "200": { @@ -415,7 +498,10 @@ }, "examples": { "finland": { - "$ref": "#/components/examples/dryOffFinland" + "$ref": "#/components/examples/drying-off-finland" + }, + "sweden": { + "$ref": "#/components/examples/drying-off-sweden" } } } @@ -436,10 +522,18 @@ "release-candidate-reproduction" ], "parameters": [ - { "$ref": "#/components/parameters/location-scheme" }, - { "$ref": "#/components/parameters/location-id" }, - { "$ref": "#/components/parameters/start-date-time" }, - { "$ref": "#/components/parameters/end-date-time" } + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/start-date-time" + }, + { + "$ref": "#/components/parameters/end-date-time" + } ], "responses": { "200": { @@ -470,10 +564,18 @@ "release-candidate-reproduction" ], "parameters": [ - { "$ref": "#/components/parameters/location-scheme" }, - { "$ref": "#/components/parameters/location-id" }, - { "$ref": "#/components/parameters/start-date-time" }, - { "$ref": "#/components/parameters/end-date-time" } + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/start-date-time" + }, + { + "$ref": "#/components/parameters/end-date-time" + } ], "responses": { "200": { @@ -504,10 +606,18 @@ "release-candidate-reproduction" ], "parameters": [ - { "$ref": "#/components/parameters/location-scheme" }, - { "$ref": "#/components/parameters/location-id" }, - { "$ref": "#/components/parameters/start-date-time" }, - { "$ref": "#/components/parameters/end-date-time" } + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/start-date-time" + }, + { + "$ref": "#/components/parameters/end-date-time" + } ], "responses": { "200": { @@ -811,12 +921,94 @@ } ] }, - "dryOffFinland": { - "value": { - "summary": "Dry off event examples from finnish milk recording organization", - "externalValue": "/Examples/exampleDryOffEvent_Finland.json" - } - } + "drying-off-finland": { + "value": [ + { + "id": "4bd700b2-4f8b-4ab8-8cbf-7bb62d4e2bc3", + "animal": { + "id": "FI000010065148-2", + "scheme": "fi.animal-id" + }, + "eventDateTime": "2000-03-19T00:00:00", + "location": { + "id": "990000001", + "scheme": "fi.herd-id" + }, + "meta": { + "source": "fi.mro", + "creator": "v990000001", + "modified": "2020-01-29T08:49:06.0421042+00:00", + "created": null, + "validFrom": null, + "validTo": null + } + }, + { + "id": "85ec425d-f079-437e-801b-88756c912102", + "animal": { + "id": "FI000010065150-1", + "scheme": "fi.animal-id" + }, + "eventDateTime": "2000-04-03T00:00:00", + "location": { + "id": "990000001", + "scheme": "fi.herd-id" + }, + "meta": { + "source": "fi.mro", + "creator": "v990000001", + "modified": "2020-01-29T08:49:06.1314223+00:00", + "created": null, + "validFrom": null, + "validTo": null + } + } + ] + }, + "drying-off-sweden": { + "value": [ + { + "id": "1", + "animal": { + "id": "SE-801-2137-4", + "scheme": "se.animal-id" + }, + "eventDateTime": "2000-03-19T00:00:00", + "location": { + "id": "801", + "scheme": "se.herd-id" + }, + "meta": { + "source": "vxa.mro", + "creator": "bza632", + "modified": "2020-01-29T08:49:06.0421042+00:00", + "created": null, + "validFrom": null, + "validTo": null + } + }, + { + "id": "2", + "animal": { + "id": "SE-801-4259-5", + "scheme": "se.animal-id" + }, + "eventDateTime": "2000-04-03T00:00:00", + "location": { + "id": "801", + "scheme": "se.herd-id" + }, + "meta": { + "source": "vxa.mro", + "creator": "bza632", + "modified": "2020-01-29T08:49:06.1314223+00:00", + "created": null, + "validFrom": null, + "validTo": null + } + } + ] + } } } -} +} \ No newline at end of file From 6cf6d693faa59831e0ac96c6690b5e497f692a08 Mon Sep 17 00:00:00 2001 From: Anton Hokkonen Date: Fri, 31 Jan 2020 12:33:27 +0200 Subject: [PATCH 35/39] Revorked finnish and swedish examples for dryin off and pregnancy check messages --- .../exampleUrlScheme.json | 97 +++---------------- .../exampleDryOffEventResources_Finland.json | 42 ++++++++ .../exampleDryOffEventResources_Sweden.json | 42 ++++++++ ...ePregnancyCheckEventResources_Finland.json | 56 +++++++++++ 4 files changed, 153 insertions(+), 84 deletions(-) create mode 100644 Release Candidate Messages/examples/exampleDryOffEventResources_Finland.json create mode 100644 Release Candidate Messages/examples/exampleDryOffEventResources_Sweden.json create mode 100644 Release Candidate Messages/examples/examplePregnancyCheckEventResources_Finland.json diff --git a/Release Candidate Messages/exampleUrlScheme.json b/Release Candidate Messages/exampleUrlScheme.json index 838f0ad..7830e64 100644 --- a/Release Candidate Messages/exampleUrlScheme.json +++ b/Release Candidate Messages/exampleUrlScheme.json @@ -369,6 +369,11 @@ "items": { "$ref": "#/components/schemas/pregnancy-check" } + }, + "examples": { + "finland": { + "$ref": "#/components/examples/pregnancy-check-finland" + } } } } @@ -921,93 +926,17 @@ } ] }, + "pregnancy-check-finland": { + "summary": "Example of pregnancy check event messages from finnish milk recording organization", + "externalValue": "./examples/examplePregnancyCheckEventResources_Finland.json" + }, "drying-off-finland": { - "value": [ - { - "id": "4bd700b2-4f8b-4ab8-8cbf-7bb62d4e2bc3", - "animal": { - "id": "FI000010065148-2", - "scheme": "fi.animal-id" - }, - "eventDateTime": "2000-03-19T00:00:00", - "location": { - "id": "990000001", - "scheme": "fi.herd-id" - }, - "meta": { - "source": "fi.mro", - "creator": "v990000001", - "modified": "2020-01-29T08:49:06.0421042+00:00", - "created": null, - "validFrom": null, - "validTo": null - } - }, - { - "id": "85ec425d-f079-437e-801b-88756c912102", - "animal": { - "id": "FI000010065150-1", - "scheme": "fi.animal-id" - }, - "eventDateTime": "2000-04-03T00:00:00", - "location": { - "id": "990000001", - "scheme": "fi.herd-id" - }, - "meta": { - "source": "fi.mro", - "creator": "v990000001", - "modified": "2020-01-29T08:49:06.1314223+00:00", - "created": null, - "validFrom": null, - "validTo": null - } - } - ] + "summary": "Example of drying off event messages from finnish milk recording organization", + "externalValue": "./examples/exampleDryOffEventResources_Finland.json" }, "drying-off-sweden": { - "value": [ - { - "id": "1", - "animal": { - "id": "SE-801-2137-4", - "scheme": "se.animal-id" - }, - "eventDateTime": "2000-03-19T00:00:00", - "location": { - "id": "801", - "scheme": "se.herd-id" - }, - "meta": { - "source": "vxa.mro", - "creator": "bza632", - "modified": "2020-01-29T08:49:06.0421042+00:00", - "created": null, - "validFrom": null, - "validTo": null - } - }, - { - "id": "2", - "animal": { - "id": "SE-801-4259-5", - "scheme": "se.animal-id" - }, - "eventDateTime": "2000-04-03T00:00:00", - "location": { - "id": "801", - "scheme": "se.herd-id" - }, - "meta": { - "source": "vxa.mro", - "creator": "bza632", - "modified": "2020-01-29T08:49:06.1314223+00:00", - "created": null, - "validFrom": null, - "validTo": null - } - } - ] + "summary": "Example of drying off event messages from swedish milk recording organization", + "externalValue": "./examples/exampleDryOffEventResources_Sweden.json" } } } diff --git a/Release Candidate Messages/examples/exampleDryOffEventResources_Finland.json b/Release Candidate Messages/examples/exampleDryOffEventResources_Finland.json new file mode 100644 index 0000000..b18ee26 --- /dev/null +++ b/Release Candidate Messages/examples/exampleDryOffEventResources_Finland.json @@ -0,0 +1,42 @@ +[ + { + "id": "4bd700b2-4f8b-4ab8-8cbf-7bb62d4e2bc3", + "animal": { + "id": "FI000010065148-2", + "scheme": "fi.animal-id" + }, + "eventDateTime": "2017-03-19T00:00:00", + "location": { + "id": "990000001", + "scheme": "fi.herd-id" + }, + "meta": { + "source": "fi.mro", + "creator": "v990000001", + "modified": "2017-03-29T08:49:06.0421042+00:00", + "created": "2017-03-29T08:49:06.0421042+00:00", + "validFrom": null, + "validTo": null + } + }, + { + "id": "85ec425d-f079-437e-801b-88756c912102", + "animal": { + "id": "FI000010065150-1", + "scheme": "fi.animal-id" + }, + "eventDateTime": "2017-01-29T08:00:00", + "location": { + "id": "990000001", + "scheme": "fi.herd-id" + }, + "meta": { + "source": "fi.mro", + "creator": "v990000001", + "modified": "2017-01-29T08:49:06.1314223+00:00", + "created": "2017-01-29T08:49:06.1314223+00:00", + "validFrom": null, + "validTo": null + } + } +] \ No newline at end of file diff --git a/Release Candidate Messages/examples/exampleDryOffEventResources_Sweden.json b/Release Candidate Messages/examples/exampleDryOffEventResources_Sweden.json new file mode 100644 index 0000000..b034deb --- /dev/null +++ b/Release Candidate Messages/examples/exampleDryOffEventResources_Sweden.json @@ -0,0 +1,42 @@ +[ + { + "id": "1", + "animal": { + "id": "SE-801-2137-4", + "scheme": "se.animal-id" + }, + "eventDateTime": "2020-03-19T00:00:00", + "location": { + "id": "801", + "scheme": "se.herd-id" + }, + "meta": { + "source": "vxa.mro", + "creator": "bza632", + "modified": "2020-01-29T08:49:06.0421042+00:00", + "created": "2020-01-19T10:20:00.0421042+00:00", + "validFrom": null, + "validTo": null + } + }, + { + "id": "2", + "animal": { + "id": "SE-801-4259-5", + "scheme": "se.animal-id" + }, + "eventDateTime": "2020-01-03T00:00:00", + "location": { + "id": "801", + "scheme": "se.herd-id" + }, + "meta": { + "source": "vxa.mro", + "creator": "bza632", + "modified": "2020-01-18T08:49:06.1314223+00:00", + "created": "2020-01-03T10:29:00.0421042+00:00", + "validFrom": null, + "validTo": null + } + } +] \ No newline at end of file diff --git a/Release Candidate Messages/examples/examplePregnancyCheckEventResources_Finland.json b/Release Candidate Messages/examples/examplePregnancyCheckEventResources_Finland.json new file mode 100644 index 0000000..fe96f25 --- /dev/null +++ b/Release Candidate Messages/examples/examplePregnancyCheckEventResources_Finland.json @@ -0,0 +1,56 @@ +[ + { + "id": "4bd700b2-4f8b-4ab8-8cbf-7bb62d4e2bc3", + "animal": { + "id": "FI000010773604-2", + "scheme": "fi.animal-id" + }, + "eventDateTime": "2018-03-19T00:00:00", + "location": { + "id": "9900001", + "scheme": "fi.herd-id" + }, + "method": "Palpation", + "result": "Unknown", + "foetalAge": null, + "foetusCount": null, + "foetusCountMale": null, + "foetusCountFemale": null, + "exceptions": null, + "meta": { + "source": "fi.mro", + "creator": "v9900001", + "modified": "2018-03-29T08:49:06.0421042+00:00", + "created": "2018-03-19T08:49:06.0421042+00:00", + "validFrom": null, + "validTo": null + } + }, + { + "id": "85ec425d-f079-437e-801b-88756c912102", + "animal": { + "id": "FI000010065148-1", + "scheme": "fi.animal-id" + }, + "eventDateTime": "2018-04-03T00:00:00", + "location": { + "id": "9900001", + "scheme": "fi.herd-id" + }, + "method": "Palpation", + "result": "Pregnant", + "foetalAge": null, + "foetusCount": null, + "foetusCountMale": null, + "foetusCountFemale": null, + "exceptions": null, + "meta": { + "source": "fi.mro", + "creator": "v9900001", + "modified": "2018-04-29T08:49:06.0421042+00:00", + "created": "2018-04-19T08:49:06.0421042+00:00", + "validFrom": null, + "validTo": null + } + } +] \ No newline at end of file From 868c973b219dbfcc82518ddc62a15baacf43caab Mon Sep 17 00:00:00 2001 From: Anton Hokkonen Date: Fri, 31 Jan 2020 12:38:36 +0200 Subject: [PATCH 36/39] some small fixes into previous examples implementation --- .../exampleUrlScheme.json | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Release Candidate Messages/exampleUrlScheme.json b/Release Candidate Messages/exampleUrlScheme.json index 7830e64..cf9c385 100644 --- a/Release Candidate Messages/exampleUrlScheme.json +++ b/Release Candidate Messages/exampleUrlScheme.json @@ -927,16 +927,22 @@ ] }, "pregnancy-check-finland": { - "summary": "Example of pregnancy check event messages from finnish milk recording organization", - "externalValue": "./examples/examplePregnancyCheckEventResources_Finland.json" + "value": { + "summary": "Example of pregnancy check event messages from finnish milk recording organization", + "externalValue": "./examples/examplePregnancyCheckEventResources_Finland.json" + } }, "drying-off-finland": { - "summary": "Example of drying off event messages from finnish milk recording organization", - "externalValue": "./examples/exampleDryOffEventResources_Finland.json" + "value": { + "summary": "Example of drying off event messages from finnish milk recording organization", + "externalValue": "./examples/exampleDryOffEventResources_Finland.json" + } }, "drying-off-sweden": { - "summary": "Example of drying off event messages from swedish milk recording organization", - "externalValue": "./examples/exampleDryOffEventResources_Sweden.json" + "value": { + "summary": "Example of drying off event messages from swedish milk recording organization", + "externalValue": "./examples/exampleDryOffEventResources_Sweden.json" + } } } } From 70bf4de39e0a5fb47f6e1907661caa4d89b5a161 Mon Sep 17 00:00:00 2001 From: Anton Hokkonen Date: Fri, 31 Jan 2020 13:18:23 +0200 Subject: [PATCH 37/39] Added example of insemination event message from finnish milk recording organization --- .../exampleUrlScheme.json | 11 ++++++ ...pleInseminationEventResources_Finland.json | 35 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 Release Candidate Messages/examples/exampleInseminationEventResources_Finland.json diff --git a/Release Candidate Messages/exampleUrlScheme.json b/Release Candidate Messages/exampleUrlScheme.json index cf9c385..806df24 100644 --- a/Release Candidate Messages/exampleUrlScheme.json +++ b/Release Candidate Messages/exampleUrlScheme.json @@ -458,6 +458,11 @@ "items": { "$ref": "#/components/schemas/insemination" } + }, + "examples": { + "finland": { + "$ref": "#/components/examples/insemination-finland" + } } } } @@ -926,6 +931,12 @@ } ] }, + "insemination-finland": { + "value": { + "summary": "Example of insemination event messages from finnish milk recording organization", + "externalValue": "./examples/exampleInseminationEventResources_Finland.json" + } + }, "pregnancy-check-finland": { "value": { "summary": "Example of pregnancy check event messages from finnish milk recording organization", diff --git a/Release Candidate Messages/examples/exampleInseminationEventResources_Finland.json b/Release Candidate Messages/examples/exampleInseminationEventResources_Finland.json new file mode 100644 index 0000000..a7418bc --- /dev/null +++ b/Release Candidate Messages/examples/exampleInseminationEventResources_Finland.json @@ -0,0 +1,35 @@ +[ + { + "id": "4bd700b2-4f8b-4ab8-8cbf-7bb62d4e2bc3", + "animal": { + "id": "FI000010065148-2", + "scheme": "fi.animal-id" + }, + "eventDateTime": "2017-03-19T00:00:00", + "location": { + "id": "990000001", + "scheme": "fi.herd-id" + }, + "inseminationType": "Insemination", + "sireIdentifiers": [ + { + "id": "FI000013718337-8", + "scheme": "fi.animal-id" + } + ], + "sireOfficialName": "3-95890", + "sireURI": null, + "semenFromFarmStocks": true, + "farmContainer": 6202, + "straw": null, + "embryo": null, + "meta": { + "source": "fi.mro", + "creator": "v990000001", + "modified": "2017-03-29T08:49:06.0421042+00:00", + "created": "2017-03-29T08:49:06.0421042+00:00", + "validFrom": null, + "validTo": null + } + } +] \ No newline at end of file From 5614a1ac791b410e8777828d0c15688f4e90a463 Mon Sep 17 00:00:00 2001 From: Andrew Cooke <45248509+cookeac@users.noreply.github.com> Date: Tue, 4 Feb 2020 08:50:23 +1300 Subject: [PATCH 38/39] Create LICENSE --- LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 201 insertions(+) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. From 5e88a9d9c33719c62e8f01a2f186794bd50b31ec Mon Sep 17 00:00:00 2001 From: Anton Hokkonen Date: Mon, 10 Feb 2020 16:38:08 +0200 Subject: [PATCH 39/39] Fixes adewg/ICAR#61: aligned enum values to follow common naming convention - combined CamelCase --- .../icarAnimalGenderType.json | 10 ++--- .../icarAnimalStatusType.json | 4 +- .../icarArrivalReasonType.json | 38 +++++++++---------- .../icarDeathDisposalMethodType.json | 20 +++++----- .../icarDepartureKindType.json | 12 +++--- .../icarDepartureReasonType.json | 6 +-- .../icarTestDayCodeType.json | 2 +- 7 files changed, 46 insertions(+), 46 deletions(-) diff --git a/Release Candidate Messages/icarAnimalGenderType.json b/Release Candidate Messages/icarAnimalGenderType.json index 5e4d493..b22c27f 100644 --- a/Release Candidate Messages/icarAnimalGenderType.json +++ b/Release Candidate Messages/icarAnimalGenderType.json @@ -1,11 +1,11 @@ -{ +{ "type": "string", "description": "Enumeration for sex of animal using species-independent English names. Includes neuter/cryptorchid variations.", "enum": [ "Female", - "Female.Neuter", + "FemaleNeuter", "Male", - "Male.Cryptorchid", - "Male.Neuter" + "MaleCryptorchid", + "MaleNeuter" ] -} +} \ No newline at end of file diff --git a/Release Candidate Messages/icarAnimalStatusType.json b/Release Candidate Messages/icarAnimalStatusType.json index 0f9425b..279ee79 100644 --- a/Release Candidate Messages/icarAnimalStatusType.json +++ b/Release Candidate Messages/icarAnimalStatusType.json @@ -4,7 +4,7 @@ "enum": [ "Alive", "Dead", - "Off-farm", + "OffFarm", "Unknown" ] -} +} \ No newline at end of file diff --git a/Release Candidate Messages/icarArrivalReasonType.json b/Release Candidate Messages/icarArrivalReasonType.json index 8e9d709..388df09 100644 --- a/Release Candidate Messages/icarArrivalReasonType.json +++ b/Release Candidate Messages/icarArrivalReasonType.json @@ -1,19 +1,19 @@ -{ - "type": "string", - "description": "Enumeration for arrival reason. Not specified in previous ADE data dictionary.", - "enum": [ - "Purchase", - "Internal Transfer", - "Imported", - "Stud Service", - "Stud Service Return", - "Slaughter", - "Agistment", - "Agistment Return", - "Show", - "Show Return", - "Sale", - "Sale Return", - "Other" - ] - } \ No newline at end of file +{ + "type": "string", + "description": "Enumeration for arrival reason. Not specified in previous ADE data dictionary.", + "enum": [ + "Purchase", + "InternalTransfer", + "Imported", + "StudService", + "StudServiceReturn", + "Slaughter", + "Agistment", + "AgistmentReturn", + "Show", + "ShowReturn", + "Sale", + "SaleReturn", + "Other" + ] +} \ No newline at end of file diff --git a/Release Candidate Messages/icarDeathDisposalMethodType.json b/Release Candidate Messages/icarDeathDisposalMethodType.json index 778292f..012798b 100644 --- a/Release Candidate Messages/icarDeathDisposalMethodType.json +++ b/Release Candidate Messages/icarDeathDisposalMethodType.json @@ -1,10 +1,10 @@ -{ - "type": "string", - "description": "Enumeration for disposal method. Not specified in previous ADE data dictionary, required by some schemes.", - "enum": [ - "Approved Service", - "Consumption", - "On-premise", - "Other" - ] - } \ No newline at end of file +{ + "type": "string", + "description": "Enumeration for disposal method. Not specified in previous ADE data dictionary, required by some schemes.", + "enum": [ + "ApprovedService", + "Consumption", + "OnPremise", + "Other" + ] +} \ No newline at end of file diff --git a/Release Candidate Messages/icarDepartureKindType.json b/Release Candidate Messages/icarDepartureKindType.json index 665ad4c..ad11fae 100644 --- a/Release Candidate Messages/icarDepartureKindType.json +++ b/Release Candidate Messages/icarDepartureKindType.json @@ -2,18 +2,18 @@ "type": "string", "description": "Enumeration for the kind of departure. Type of destination or transfer.", "enum": [ - "Internal Transfer", + "InternalTransfer", "Export", "Slaughter", "Newborn", - "Stud Service", - "Stud Service Return", + "StudService", + "StudServiceReturn", "Agistment", - "Agistment Return", + "AgistmentReturn", "Show", - "Show Return", + "ShowReturn", "Sale", - "Sale Return", + "SaleReturn", "Other" ] } \ No newline at end of file diff --git a/Release Candidate Messages/icarDepartureReasonType.json b/Release Candidate Messages/icarDepartureReasonType.json index f3729d7..7bdf6ee 100644 --- a/Release Candidate Messages/icarDepartureReasonType.json +++ b/Release Candidate Messages/icarDepartureReasonType.json @@ -7,15 +7,15 @@ "Slaughter", "Sale", "Newborn", - "Leg or Claw", + "LegOrClaw", "Nutrition", "Parturition", "Mastitis", "Fertility", "Health", "Production", - "Milking Ability", - "Bad Type", + "MilkingAbility", + "BadType", "Behaviour", "Other" ] diff --git a/Release Candidate Messages/icarTestDayCodeType.json b/Release Candidate Messages/icarTestDayCodeType.json index d58d020..845c305 100644 --- a/Release Candidate Messages/icarTestDayCodeType.json +++ b/Release Candidate Messages/icarTestDayCodeType.json @@ -3,7 +3,7 @@ "description": "The test day code, indicating a status of the cow on the test day.", "enum": [ "Dry", - "Sampling impossible", + "SamplingImpossible", "Sick" ] }