diff --git a/.github/workflows/ValidateWithSpeccy.yml b/.github/workflows/ValidateWithSpeccy.yml deleted file mode 100644 index 1b787f3..0000000 --- a/.github/workflows/ValidateWithSpeccy.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: Speccy JSON Validation CI - -on: [push] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - name: validate JSON URL scheme - run: | - docker run wework/speccy lint -v -j https://raw.githubusercontent.com/${{github.repository}}/${GITHUB_REF##*/}/url-schemes/exampleUrlScheme.json --skip openapi-tags-alphabetical - diff --git a/collections/icarAnimalSortingCommandCollection.json b/collections/icarAnimalSortingCommandCollection.json new file mode 100644 index 0000000..a33ee52 --- /dev/null +++ b/collections/icarAnimalSortingCommandCollection.json @@ -0,0 +1,20 @@ +{ + "description": "Represents a collection of animal-sorting-commands. Based on icarResourceCollection to provide paging etc.", + "allOf": [ + { + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarAnimalSortingCommandResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case animal sorting commands (icarAnimalSortingCommandResource)." + } + } + } + ] +} diff --git a/collections/icarAttentionEventCollection.json b/collections/icarAttentionEventCollection.json new file mode 100644 index 0000000..4cfa2fb --- /dev/null +++ b/collections/icarAttentionEventCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of attention events generated by devices. Based on icarResourceCollection to provide paging etc.", + + "allOf": [{ + "$ref": "icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarAttentionEventResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case attention events." + } + } + } + ] +} diff --git a/collections/icarGroupFeedingEventCollection.json b/collections/icarGroupFeedingEventCollection.json new file mode 100644 index 0000000..fc02330 --- /dev/null +++ b/collections/icarGroupFeedingEventCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of feed intakes. Based on icarResourceCollection to provide paging etc.", + + "allOf": [{ + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarGroupFeedingEventResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case group feeding events." + } + } + } + ] +} diff --git a/collections/icarGroupPositionObservationEventCollection.json b/collections/icarGroupPositionObservationEventCollection.json new file mode 100644 index 0000000..0850a9f --- /dev/null +++ b/collections/icarGroupPositionObservationEventCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of group position observation events.", + + "allOf": [{ + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarGroupPositionObservationEventResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case group position observation events." + } + } + } + ] +} \ No newline at end of file diff --git a/collections/icarPositionObservationEventCollection.json b/collections/icarPositionObservationEventCollection.json new file mode 100644 index 0000000..c5de060 --- /dev/null +++ b/collections/icarPositionObservationEventCollection.json @@ -0,0 +1,21 @@ +{ + "description": "Represents a collection of animal position observation events.", + + "allOf": [{ + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarPositionObservationEventResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case position observation events." + } + } + } + ] +} \ No newline at end of file diff --git a/collections/icarSortingSiteCollection.json b/collections/icarSortingSiteCollection.json new file mode 100644 index 0000000..1787aec --- /dev/null +++ b/collections/icarSortingSiteCollection.json @@ -0,0 +1,20 @@ +{ + "description": "Represents a collection of sites. Based on icarResourceCollection to provide paging etc.", + "allOf": [ + { + "$ref": "../collections/icarResourceCollection.json" + }, + { + "type": "object", + "properties": { + "member": { + "type": "array", + "items": { + "$ref": "../resources/icarSortingSiteResource.json" + }, + "description": "As per JSON-LD Hydra syntax, member provides the array of objects, in this case sorting-sites." + } + } + } + ] +} diff --git a/enums/icarAttentionCategoryType.json b/enums/icarAttentionCategoryType.json new file mode 100644 index 0000000..73bae78 --- /dev/null +++ b/enums/icarAttentionCategoryType.json @@ -0,0 +1,12 @@ +{ + "description": "Defines a category of device messages that may allow filtering of alerts.", + + "type": "string", + + "enum": [ + "Behaviour", + "Environment", + "Health", + "Other" + ] + } \ No newline at end of file diff --git a/enums/icarAttentionCauseType.json b/enums/icarAttentionCauseType.json new file mode 100644 index 0000000..e165947 --- /dev/null +++ b/enums/icarAttentionCauseType.json @@ -0,0 +1,35 @@ +{ + "description": "Defines causes of alerts from devices.", + + "type": "string", + + "enum": [ + "Activity", + "AnimalTemperature", + "BodyCondition", + "EatingLess", + "EnvironmentTemperature", + "Disturbance", + "Health", + "HeartRate", + "Inactivity", + "Ketosis", + "Lameness", + "Location", + "LowerRumination", + "LyingTooLong", + "LyingTooShort", + "Mastitis", + "MobilityScore", + "NoMovement", + "Parturition", + "PostParturitionRisk", + "ProlongedParturition", + "RespirationRate", + "Standing", + "StandingUp", + "Walking", + "Other", + "Undefined" + ] + } \ No newline at end of file diff --git a/enums/icarAttentionPriorityType.json b/enums/icarAttentionPriorityType.json new file mode 100644 index 0000000..2db5c30 --- /dev/null +++ b/enums/icarAttentionPriorityType.json @@ -0,0 +1,12 @@ +{ + "description": "Defines the relative priority of alerts.", + + "type": "string", + + "enum": [ + "Informational", + "Normal", + "Urgent", + "Critical" + ] + } \ No newline at end of file diff --git a/enums/icarInventoryTransactionKindType.json b/enums/icarInventoryTransactionKindType.json index fd94266..65525e0 100644 --- a/enums/icarInventoryTransactionKindType.json +++ b/enums/icarInventoryTransactionKindType.json @@ -5,6 +5,7 @@ "Receipt", "Disposal", "OnHand", + "Produce", "StockTake", "Use" ] diff --git a/enums/icarMilkCharacteristicCodeType.json b/enums/icarMilkCharacteristicCodeType.json new file mode 100644 index 0000000..32a2fbc --- /dev/null +++ b/enums/icarMilkCharacteristicCodeType.json @@ -0,0 +1,22 @@ +{ + "description": "ICAR Milk Characteristics Codes.\nThe following units have to be applied:\n\n|SCC|Somatic cell count|x1000 cells/ml|NCL\n|FAT|Fat|%|VP\n|PROTEIN|Protein|%|VP\n|LAC|Lactose|%|VP\n|UREA|Urea|mg/l|M1\n|BLOOD|Blood|true/false|A99\n|ACETONE|Acetone|mmol/l|M33\n|BHB|Beta hydroxybutyrate|mmol/l|M33\n|LDH|Lactate dehydrogenase|IU/l|\n|PRO|Progesteron|mmol/l|M33\n|AVGCOND|Average conductivity value of the milk at 25 ° C|mS/cm|H61\n|MAXCOND|Maximum conductivity value of the milk at 25 ° C|mS/cm|H61\n|AVGFLWR|Average flow rate|Kg/min|F31\n|MAXFLWR|Max flow rate|Kg/min|F31\n|WEIGHT|Weight of animal|Kg|KGM\n|PAG|Pregnancy associated glycoprotein|mmol/l|M33", + "type": "string", + "enum": [ + "SCC", + "FAT", + "PROTEIN", + "LAC", + "UREA", + "BLOOD", + "ACETONE", + "BHB", + "LDH", + "PRO", + "AVGCOND", + "MAXCOND", + "AVGFLWR", + "MAXFLWR", + "WEIGHT", + "TEMPERATURE" + ] +} \ No newline at end of file diff --git a/enums/icarPositionOnAnimalType.json b/enums/icarPositionOnAnimalType.json index f2f90ef..8359c8e 100644 --- a/enums/icarPositionOnAnimalType.json +++ b/enums/icarPositionOnAnimalType.json @@ -1,5 +1,5 @@ { - "description": "Enumeration for treatment or diagnosed positions.", + "description": "Enumeration for the position on the animal where the diagnosis or treatment occurred.", "type": "string", diff --git a/enums/icarProductFamilyType.json b/enums/icarProductFamilyType.json index 894bba6..f92fed7 100644 --- a/enums/icarProductFamilyType.json +++ b/enums/icarProductFamilyType.json @@ -11,6 +11,8 @@ "Other Animal Products", "Milking Supplies", "Fencing Supplies", - "Water System Supplies" + "Water System Supplies", + "Fuel", + "Other" ] -} \ No newline at end of file +} diff --git a/enums/icarSetPurposeType.json b/enums/icarSetPurposeType.json index 27faf53..6b9e0fe 100644 --- a/enums/icarSetPurposeType.json +++ b/enums/icarSetPurposeType.json @@ -6,9 +6,12 @@ "enum": [ "Enclosure", "Feeding", + "Finishing", + "Growing", "Health", "Lactation", "Movement", + "Rearing", "Reproduction", "Session", "Other" diff --git a/resources/icarAnimalCoreResource.json b/resources/icarAnimalCoreResource.json index 9eebb1f..d0b18ce 100644 --- a/resources/icarAnimalCoreResource.json +++ b/resources/icarAnimalCoreResource.json @@ -83,9 +83,9 @@ }, "parentage": { "type": "array", + "description": "Parents of the animal. The array can handle multiple generations by specifying the parent of a parent.", "items": { - "$ref": "../types/icarParentageType.json", - "description": "Array of parents." + "$ref": "../types/icarParentageType.json" } }, "healthStatus": { @@ -95,4 +95,4 @@ } } ] -} \ No newline at end of file +} diff --git a/resources/icarAnimalSortingCommandResource.json b/resources/icarAnimalSortingCommandResource.json new file mode 100644 index 0000000..df762de --- /dev/null +++ b/resources/icarAnimalSortingCommandResource.json @@ -0,0 +1,34 @@ +{ + "description": "Sorting data for a specific animal on a location.", + "allOf": [ + { + "$ref": "../resources/icarResource.json" + }, + { + "type": "object", + "required": [ + "animal", + "site", + "validFrom" + ], + "properties": { + "animal": { + "$ref": "../types/icarAnimalIdentifierType.json", + "description": "Unique animal scheme and identifier combination." + }, + "site": { + "type": "string", + "description": "Unique identifier in the system for this site." + }, + "validFrom": { + "$ref": "../types/icarDateTimeType.json", + "description": "Specifies from when the sort command should be active. RFC3339 UTC date time (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)." + }, + "validTo": { + "$ref": "../types/icarDateTimeType.json", + "description": "Specifies until when the sort command should be active. Could be left empty, when the sorting should be ongoing (until replaced). RFC3339 UTC date time (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance)." + } + } + } + ] +} diff --git a/resources/icarAttentionEventResource.json b/resources/icarAttentionEventResource.json new file mode 100644 index 0000000..477c32d --- /dev/null +++ b/resources/icarAttentionEventResource.json @@ -0,0 +1,50 @@ +{ + "description": "Defines an alert for an animal that may require attention.", + + "allOf": [ + { + "$ref": "../resources/icarAnimalEventCoreResource.json" + }, + { + "type": "object", + + "required" : ["category", "causes"], + + "properties": { + "alertEndDateTime": { + "type": ["string", "null"], + "$ref": "../types/icarDateTimeType.json", + "description": "RFC3339 date time that represents the end time of an alert (start time is the eventDateTime) if it has ended." + }, + "category": { + "$ref": "../enums/icarAttentionCategoryType.json", + "description": "A category that allows filtering of alerts by subject." + }, + "causes": { + "type": "array", + "items": { + "$ref": "../enums/icarAttentionCauseType.json" + }, + "description": "The specific causes of the alert. This is an array and at least one cause must be specified." + }, + "priority": { + "$ref": "../enums/icarAttentionPriorityType.json", + "description": "The relative priority of the alert." + }, + "severity": { + "$ref": "../enums/icarDiagnosisSeverityType.json", + "description": "A structured set of severity values that align with those used in disease diagnosis." + }, + "deviceAttentionScore": { + "type": "number", + "description": "Provides a manufacturer- and device-specific score related to the alert." + }, + "device": { + "$ref": "../types/icarDeviceReferenceType.json", + "description": "Identifies the device that is raising the alert." + } + } + } + ] +} + \ No newline at end of file diff --git a/resources/icarBatchResult.json b/resources/icarBatchResult.json index e087e80..03c6ffa 100644 --- a/resources/icarBatchResult.json +++ b/resources/icarBatchResult.json @@ -11,9 +11,8 @@ "description": "Metadata for the posted resource. Allows specification of the source, source Id to synchronise data." }, "messages": { - "type": "array", - "description": "An arry of errors for this resource.", - "nullable": true, + "type": ["array", "null"], + "description": "An array of errors for this resource. The messages array may be unspecified OR null.", "items": { "$ref": "../resources/icarResponseMessageResource.json" } diff --git a/resources/icarDeviceResource.json b/resources/icarDeviceResource.json index 53c5165..623086a 100644 --- a/resources/icarDeviceResource.json +++ b/resources/icarDeviceResource.json @@ -1,55 +1,65 @@ { - "description": "Describes the devices on a certain location.", + "description": "This resource is used to describe an instance of a device at a location.", - "type": "object", + "allOf": [{ + "$ref": "icarResource.json" + }, + { + "type": "object", - "required": [ - "id" - ], + "required": [ + "id" + ], - "properties": { - "id": { - "type": "string", - "description": "Unique identifier on location level in the source system for this device." - }, - "serial": { - "type": "string", - "description": "Optionally, the serial number of the device." - }, - "name": { - "type": "string", - "description": "Name given to the device by the farmer." - }, - "description": { - "type": "string", - "description": "Description of the device by the farmer." - }, - "softwareVersion": { - "type": "string", - "description": "Version of the software installed on the device." - }, - "hardwareVersion": { - "type": "string", - "description": "Version of the hardware installed in the device." - }, - "isActive": { - "type": "boolean", - "description": "Indicates whether the device is active at this moment." - }, - "supportedMessages": { - "type": "array", - "items": { - "type": "object", - "properties": { - "messages": { - "$ref": "../enums/icarMessageType.json" + "properties": { + "id": { + "type": "string", + "description": "Unique identifier on location level in the source system for this device." + }, + "serial": { + "type": "string", + "description": "Optionally, the serial number of the device." + }, + "name": { + "type": "string", + "description": "Name given to the device by the farmer." + }, + "description": { + "type": "string", + "description": "Description of the device by the farmer." + }, + "softwareVersion": { + "type": "string", + "description": "Version of the software installed on the device." + }, + "hardwareVersion": { + "type": "string", + "description": "Version of the hardware installed in the device." + }, + "isActive": { + "type": "boolean", + "description": "Indicates whether the device is active at this moment." + }, + "supportedMessages": { + "type": "array", + "description": "Identifies message types supported for the device", + "items": { + "type": "object", + "properties": { + "messages": { + "$ref": "../enums/icarMessageType.json" + } } } + }, + "manufacturer": { + "$ref": "../types/icarDeviceManufacturerType.json", + "description": "The device data as defined by the manufacturer." + }, + "registration": { + "$ref": "../types/icarDeviceRegistrationIdentifierType.json", + "description": "A registration identifier for the device (most devices should eventually have a registration issued by `org.icar` or other entity)." } - }, - "manufacturer": { - "$ref": "../types/icarDeviceManufacturerType.json", - "description": "The device data as defined by the manufacturer." } - } + }] } \ No newline at end of file diff --git a/resources/icarEventCoreResource.json b/resources/icarEventCoreResource.json index f595516..ed7675a 100644 --- a/resources/icarEventCoreResource.json +++ b/resources/icarEventCoreResource.json @@ -1,5 +1,5 @@ { - "description": "", + "description": "Core schema for representing an event.", "allOf": [ { diff --git a/resources/icarGestationResource.json b/resources/icarGestationResource.json index 4d339d2..32040cd 100644 --- a/resources/icarGestationResource.json +++ b/resources/icarGestationResource.json @@ -1,5 +1,5 @@ { - "description": "Gestation information of animals on a specific location.", + "description": "This resource holds computed or predicted gestation information for animals at a location.\n- Use this resource to understand potential sire and expected calving date.\n- This resource should be recomputed when a heat, repro-status observation, or pregnancy check event is recorded.", "allOf": [{ "$ref": "icarResource.json" @@ -16,7 +16,7 @@ "properties": { "id": { "type": "string", - "description": "Unique identifier in the source system for this event." + "description": "Unique identifier in the source system for this computed resource." }, "animal": { "$ref": "../types/icarAnimalIdentifierType.json", diff --git a/resources/icarGroupFeedingEventResource.json b/resources/icarGroupFeedingEventResource.json new file mode 100644 index 0000000..add60de --- /dev/null +++ b/resources/icarGroupFeedingEventResource.json @@ -0,0 +1,48 @@ +{ + "description": "Event for recording group or mob feeding. Allowances represent averages so this cannot be used to populate individual animal events.", + "type": "object", + "allOf": [ + { + "$ref": "../resources/icarGroupEventCoreResource.json" + } + ], + "properties": { + "feedingEndDateTime": { + + "$ref": "../types/icarDateTimeType.json", + "description": "The RFC3339 UTC moment from which animals could no longer consume the feed (eventDateTime represents the start of feed availability)." + }, + "feedPerAnimal": { + "type": "array", + "items": { + "$ref": "../types/icarConsumedFeedType.json", + "description": "Gives the feed offered to and consumed per animal (average)." + } + }, + "feedTotal": { + "description": "Gives the feed offered to and consumed (total for all animals).", + "type": "array", + "items": { + "$ref": "../types/icarConsumedFeedType.json" + } + }, + "rationPerAnimal": { + "type": "array", + "items": { + "$ref": "../types/icarConsumedRationType.json", + "description": "Gives the ration offered to and consumed per animal (average)." + } + }, + "rationTotal": { + "description": "Gives the feed offered to and consumed (total for all animals).", + "type": "array", + "items": { + "$ref": "../types/icarConsumedRationType.json" + } + }, + "device": { + "$ref": "../types/icarDeviceReferenceType.json", + "description": "Optional information about a device used for the feeding, if relevant." + } + } +} diff --git a/resources/icarGroupMovementArrivalEventResource.json b/resources/icarGroupMovementArrivalEventResource.json index 03d9753..bfb6a99 100644 --- a/resources/icarGroupMovementArrivalEventResource.json +++ b/resources/icarGroupMovementArrivalEventResource.json @@ -10,11 +10,12 @@ "properties": { "arrivalReason": { - "$ref": "../enums/icarArrivalReasonType.json" + "$ref": "../enums/icarArrivalReasonType.json", + "description": "Reason the group of animals arrived on the holding." }, "consignment": { - "$ref": "../types/icarConsignmentType.json" - + "$ref": "../types/icarConsignmentType.json", + "description": "Identifies the consignment of the group of animals to the holding." } } } diff --git a/resources/icarGroupMovementBirthEventResource.json b/resources/icarGroupMovementBirthEventResource.json index 0d239b1..43deef3 100644 --- a/resources/icarGroupMovementBirthEventResource.json +++ b/resources/icarGroupMovementBirthEventResource.json @@ -10,10 +10,11 @@ "properties": { "registrationReason": { - "$ref": "../enums/icarRegistrationReasonType.json" + "$ref": "../enums/icarRegistrationReasonType.json", + "description": "Identifies whether this is a birth or registration event" } } } ] -} \ No newline at end of file +} diff --git a/resources/icarGroupPositionObservationEventResource.json b/resources/icarGroupPositionObservationEventResource.json new file mode 100644 index 0000000..727f512 --- /dev/null +++ b/resources/icarGroupPositionObservationEventResource.json @@ -0,0 +1,12 @@ +{ + "description": "This event records that a group of animals was observed in a specific position or location (either a named location or a geographic coordinate).", + + "allOf": [ + { + "$ref": "../resources/icarGroupEventCoreResource.json" + }, + { + "$ref": "../types/icarPositionObservationType.json" + } + ] +} \ No newline at end of file diff --git a/resources/icarHealthStatusObservedEventResource.json b/resources/icarHealthStatusObservedEventResource.json index 8dc4fdc..e43dd14 100644 --- a/resources/icarHealthStatusObservedEventResource.json +++ b/resources/icarHealthStatusObservedEventResource.json @@ -10,8 +10,7 @@ "properties": { "observedStatus": { "$ref": "../enums/icarAnimalHealthStatusType.json", - "description": "Health status of the animal (such as Healthy, Suspicious, Ill, InTreatment, ToBeCulled).", - "nullable": false + "description": "Health status of the animal (such as Healthy, Suspicious, Ill, InTreatment, ToBeCulled). A null value is not supported." } } } diff --git a/resources/icarMovementArrivalEventResource.json b/resources/icarMovementArrivalEventResource.json index 6776804..82b2e83 100644 --- a/resources/icarMovementArrivalEventResource.json +++ b/resources/icarMovementArrivalEventResource.json @@ -9,15 +9,22 @@ "properties": { "arrivalReason": { - "$ref": "../enums/icarArrivalReasonType.json" + "$ref": "../enums/icarArrivalReasonType.json", + "description": "Reason the animal arrived on the holding." }, "animalDetail": { - "$ref": "icarAnimalCoreResource.json" + "$ref": "icarAnimalCoreResource.json", + "description": "Core animal details. Can be used if the animal has not already been defined on the holding." + }, + "animalState": { + "$ref": "../types/icarAnimalStateType.json", + "description": "State information about an animal." }, "consignment": { - "$ref": "../types/icarConsignmentType.json" + "$ref": "../types/icarConsignmentType.json", + "description": "Identifies the consignment of the animal to the holding." } } } ] -} \ No newline at end of file +} diff --git a/resources/icarMovementBirthEventResource.json b/resources/icarMovementBirthEventResource.json index ee64de2..f2b7c57 100644 --- a/resources/icarMovementBirthEventResource.json +++ b/resources/icarMovementBirthEventResource.json @@ -13,10 +13,12 @@ "properties": { "registrationReason": { - "$ref": "../enums/icarRegistrationReasonType.json" + "$ref": "../enums/icarRegistrationReasonType.json", + "description": "Identifies whether this is a birth or a registration event" }, "animalDetail": { - "$ref": "../resources/icarAnimalCoreResource.json" + "$ref": "../resources/icarAnimalCoreResource.json", + "description": "Core animal details. Can be used if the animal has not already been defined on the holding." } } } diff --git a/resources/icarMovementDeathEventResource.json b/resources/icarMovementDeathEventResource.json index 1e73223..d93bc2d 100644 --- a/resources/icarMovementDeathEventResource.json +++ b/resources/icarMovementDeathEventResource.json @@ -29,7 +29,8 @@ "description": "Reference (receipt, docket, or ID) for disposal." }, "consignment": { - "$ref": "../types/icarConsignmentType.json" + "$ref": "../types/icarConsignmentType.json", + "description": "Identifies the consignment of the animal from the holding." }, "deathMethod": { "$ref": "../enums/icarDeathMethodType.json", diff --git a/resources/icarMovementDepartureEventResource.json b/resources/icarMovementDepartureEventResource.json index 5dc6d06..78286b7 100644 --- a/resources/icarMovementDepartureEventResource.json +++ b/resources/icarMovementDepartureEventResource.json @@ -9,13 +9,16 @@ "properties": { "departureKind": { - "$ref": "../enums/icarDepartureKindType.json" + "$ref": "../enums/icarDepartureKindType.json", + "description": "Identifies the kind of departure of the animal from the holding." }, "departureReason": { - "$ref": "../enums/icarDepartureReasonType.json" + "$ref": "../enums/icarDepartureReasonType.json", + "description": "Identifies the reason for the departure of the animal from the holding." }, "consignment": { - "$ref": "../types/icarConsignmentType.json" + "$ref": "../types/icarConsignmentType.json", + "description": "Identifies the consignment of the animal from the holding." } } } diff --git a/resources/icarPositionObservationEventResource.json b/resources/icarPositionObservationEventResource.json new file mode 100644 index 0000000..d305d1f --- /dev/null +++ b/resources/icarPositionObservationEventResource.json @@ -0,0 +1,12 @@ +{ + "description": "This event records that an animal was observed in a specific position or location (either a named location or a geographic coordinate).", + + "allOf": [ + { + "$ref": "../resources/icarAnimalEventCoreResource.json" + }, + { + "$ref": "../types/icarPositionObservationType.json" + } + ] +} \ No newline at end of file diff --git a/resources/icarProgenyDetailsResource.json b/resources/icarProgenyDetailsResource.json index 00ea968..966f828 100644 --- a/resources/icarProgenyDetailsResource.json +++ b/resources/icarProgenyDetailsResource.json @@ -16,7 +16,7 @@ "properties": { "identifier": { "description": "Unique animal scheme and identifier combination.", - "nullable": true, + "type": ["object", "null"], "allOf": [ { "$ref": "../types/icarAnimalIdentifierType.json" @@ -24,8 +24,7 @@ ] }, "alternativeIdentifiers": { - "nullable": true, - "type": "array", + "type": ["array","null"], "items": { "$ref": "../types/icarAnimalIdentifierType.json" }, @@ -40,8 +39,7 @@ "description": "Gender of the animal." }, "managementTag": { - "type": "string", - "nullable": true, + "type": ["string", "null"], "description": "The identifier used by the farmer in day to day operations. In many cases this could be the animal number." }, "name": { @@ -54,7 +52,7 @@ }, "taggingDate": { "description": "Progeny tagging date in RFC3339 UTC (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance).", - "nullable": true, + "type": ["string", "null"], "allOf": [ { "$ref": "../types/icarDateTimeType.json" @@ -63,7 +61,7 @@ }, "birthStatus": { "description": "Birth status of the progeny.", - "nullable": true, + "type": ["string", "null"], "allOf": [ { "$ref": "../enums/icarParturitionBirthStatusType.json" @@ -72,7 +70,7 @@ }, "birthSize": { "description": "Size of the progeny.", - "nullable": true, + "type": ["string", "null"], "allOf": [ { "$ref": "../enums/icarParturitionBirthSizeType.json" @@ -81,7 +79,7 @@ }, "birthWeight": { "description": "Weight of the progeny.", - "nullable": true, + "type": ["object", "null"], "allOf": [ { "$ref": "../types/icarMassMeasureType.json" diff --git a/resources/icarReproDoNotBreedEventResource.json b/resources/icarReproDoNotBreedEventResource.json index eaf4f9c..ce7fbb3 100644 --- a/resources/icarReproDoNotBreedEventResource.json +++ b/resources/icarReproDoNotBreedEventResource.json @@ -8,9 +8,8 @@ "type": "object", "properties": { "doNotBreed": { - "type": "boolean", + "type": ["boolean", "null"], "description": "Set this attribute to true if the animal should not be bred, false if it may now be bred.", - "nullable": true, "default": true } } diff --git a/resources/icarReproParturitionEventResource.json b/resources/icarReproParturitionEventResource.json index e6a6f90..4208dd4 100644 --- a/resources/icarReproParturitionEventResource.json +++ b/resources/icarReproParturitionEventResource.json @@ -29,16 +29,14 @@ "description": "Calving ease (enum corresponds to traditional 1-5 values)." }, "progenyDetails": { - "type": "array", - "nullable": true, + "type": ["array","null"], "items": { "$ref": "../resources/icarProgenyDetailsResource.json" }, "description": "List of progeny details. May not be fully identified, but recommend that gender and status are supplied at least." }, "progeny": { - "type": "array", - "nullable": true, + "type": ["array", "null"], "deprecated": true, "items": { "$ref": "../resources/icarAnimalCoreResource.json" diff --git a/resources/icarReproPregnancyCheckEventResource.json b/resources/icarReproPregnancyCheckEventResource.json index 9224f70..d738952 100644 --- a/resources/icarReproPregnancyCheckEventResource.json +++ b/resources/icarReproPregnancyCheckEventResource.json @@ -14,7 +14,7 @@ }, "result": { "$ref": "../enums/icarReproPregnancyResultType.json", - "description": "Result - uknown, empty, pregnant." + "description": "Result - unknown, empty, pregnant." }, "foetalAge": { "type": "integer", diff --git a/resources/icarResource.json b/resources/icarResource.json index 0decd45..e56c441 100644 --- a/resources/icarResource.json +++ b/resources/icarResource.json @@ -14,7 +14,7 @@ "properties": { "resourceType" : { "type": "string", - "description": "Uniform resource identifier (URI) or shortname of the logical resourceType. The ResourceType catalog defines the set of allowed resourceTyps." + "description": "Uniform resource identifier (URI) or shortname of the logical resourceType. The ResourceType catalog defines the set of allowed resourceTypes." }, "@self": { "type": "string", @@ -22,7 +22,7 @@ }, "meta": { "$ref": "../types/icarMetaDataType.json", - "description": "Meta-data for the resource. Mandatory if you wish to support synchronisation." + "description": "Meta-data for the resource. Mandatory if you wish to support synchronisation.\n Systems should maintain and provide meta data if at all possible.\nICAR ADE working group intend meta to be required in the next major release of ADE." }, "location": { "$ref": "../types/icarLocationIdentifierType.json", diff --git a/resources/icarResponseMessageResource.json b/resources/icarResponseMessageResource.json index 8f50b02..a97c2f8 100644 --- a/resources/icarResponseMessageResource.json +++ b/resources/icarResponseMessageResource.json @@ -13,10 +13,9 @@ "description": "Distinguish errors, warnings, and informational messages." }, "status": { - "type": "integer", + "type": ["integer", "null"], "description": "The HTTP status code applicable to this problem.", - "format": "int32", - "nullable": true + "format": "int32" }, "title": { "type": "string", @@ -27,9 +26,8 @@ "description": "A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized." }, "instance": { - "type": "string", - "description": "A URI reference or internal JSON document reference to the specific data item that caused the problem.", - "nullable": true + "type": ["string", "null"], + "description": "A URI reference or internal JSON document reference to the specific data item that caused the problem." } } } \ No newline at end of file diff --git a/resources/icarSortingSiteResource.json b/resources/icarSortingSiteResource.json new file mode 100644 index 0000000..8f0b184 --- /dev/null +++ b/resources/icarSortingSiteResource.json @@ -0,0 +1,31 @@ +{ + "description": "Site available on a location.", + "allOf": [ + { + "$ref": "../resources/icarResource.json" + }, + { + "type": "object", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string", + "description": "Unique identifier in the system for this site." + }, + "name": { + "type": "string", + "description": "Name of the site as it is known on the location." + }, + "capacity": { + "type": "number", + "default": 0, + "description": "The maximum capacity of this site.", + "format": "int32" + } + } + } + ] +} diff --git a/resources/resourceTypeCatalog.md b/resources/resourceTypeCatalog.md index 1c0eaf6..9baec88 100644 --- a/resources/resourceTypeCatalog.md +++ b/resources/resourceTypeCatalog.md @@ -2,7 +2,7 @@ This document defines a set of URI identifiers and string short codes and maps them to ICAR resource types. -The catalog is represented as a table with the columns, shortname, URI, link to resource resource type in github. +The catalog is represented as a table with the columns, shortname, `resourceType` discriminator, URI, and name of the resource schema file. To help with readability and conciseness the URIs are represnted as CURIs (concise URIs) where the prefix is: @@ -13,46 +13,71 @@ and the expansion is: `http://data.adewg.icar.org/core/` -Short Name | URI | JSON Resource Type Definition ---- | --- | --- -Animal | icar:Animal | icarAnimalCoreResource.json -AnimalSetJoinEvent | icar:AnimalSetJoinEvent | icarAnimalSetJoinEventResource.json -AnimalSetLeaveEvent | icar:AnimalSetLeaveEvent | icarAnimalSetLeaveEventResource.json -AnimalSet | icar:AnimalSet | icarAnimalSetResource.json -BreedingValue | icar:BreedingValue | icarBreedingValueResource.json -ConformationScoreEvent | icar:ConformationScoreEvent | icarConformationScoreEventResource.json -DailyMilkingAverages | icar:DailyMilkingAverages | icarDailyMilkingAveragesResource.json -Device | icar:Device | icarDeviceResource.json -DiagnosisEvent | icar:DiagnosisEvent | icarDiagnosisEventResource.json -FeedIntakeEvent | icar:FeedIntakeEvent | icarFeedIntakeEventResource.json -FeedRecommendation | icar:FeedRecommendation | icarFeedRecommendationResource.json -FeedReport | icar:FeedReport | icarFeedReportResource.json -Feed | icar:Feed | icarFeedResource.json -FeedStorage | icar:FeedStorage | icarFeedStorageResource.json -Gestation | icar:Gestation | icarGestationResource.json -Lactation | icar:Lactation | icarLactationResource.json -LactationStatusObservedEvent | icar:LactationStatusObservedEvent | icarLactationStatusObservedEventResource.json -Location | icar:Location | icarLocationResource.json -Medicine | icar:Medicine | icarMedicineResource.json -MilkingDryOffEvent | icar:MilkingDryOffEvent | icarMilkingDryOffEventResource.json -MilkingVisitEvent | icar:MilkingVisitEvent | icarMilkingVisitEventResource.json -MovementArrivalEvent | icar:MovementArrivalEvent | icarMovementArrivalEventResource.json -MovementBirthEvent | icar:MovementBirthEvent | icarMovementBirthEventResource.json -MovementDeathEvent | icar:MovementDeathEvent | icarMovementDeathEventResource.json -MovementDepartureEvent | icar:MovementDepartureEvent | icarMovementDepartureEventResource.json -Ration | icar:Ration | icarRationResource.json -ReproAbortionEvent | icar:ReproAbortionEvent | icarReproAbortionEventResource.json -ReproDoNotBreedEvent | icar:ReproDoNotBreedEvent | icarReproDoNotBreedEventResource.json -ReproEmbryo | icar:ReproEmbryo | icarReproEmbryoResource.json -ReproHeatEvent | icar:ReproHeatEvent | icarReproHeatEventResource.json -ReproInseminationEvent | icar:ReproInsemonationEvent | icarReproInsemonationEventResource.json -ReproMatingRecommendation | icar:ReproMatingRecommendation | icarReproMatingRecommendationResource.json -ReproParturitionEvent | icar:ReproParturitionEvent | icarReproParturitionEventResource.json -ReproSemenStraw | icar:ReproSemenStraw | icarReproSemenStrawResource.json -ReproStatusObservedEvent | icar:ReproStatusObservedEvent | icarReproStatusObservedEventResource.json -TestDay | icar:TestDay | icarTestDayResource.json -TestDayResult | icar:TestDayResult | icarTestDayResultResource.json -TreatmentEvent | icar:TreatmentEvent | icarTreatmentEventResource.json -TreatmentProgramEvent | icar:TreatmentProgramEvent | icarTreatmentProgramEventResource.json -WeightEvent | icar:WeightEvent | icarWeightEventResource.json +Short Name | Discriminator (resourceType) | URI (future use) | JSON Resource Type Definition +--- | --- | --- | --- +Animal | **icarAnimalCoreResource** | icar:Animal | icarAnimalCoreResource.json +AnimalSetJoinEvent | **icarAnimalSetJoinEventResource** | icar:AnimalSetJoinEvent | icarAnimalSetJoinEventResource.json +AnimalSetLeaveEvent | **icarAnimalSetLeaveEventResource** | icar:AnimalSetLeaveEvent | icarAnimalSetLeaveEventResource.json +AnimalSet | **icarAnimalSetResource** | icar:AnimalSet | icarAnimalSetResource.json +AttentionEvent | **icarAttentionEventResource** | icar:AttentionEvent | icarAttentionEventResource.json +BreedingValue | **icarBreedingValueResource** | icar:BreedingValue | icarBreedingValueResource.json +CarcassObservationsEvent | **icarCarcassObservationsEventResource** | icar:CarcassObservations | icarCarcassObservationsEventResource.json +Carcass | **icarCarcassResource** | icar:Carcass | icarCarcassResource.json +ConformationScoreEvent | **icarConformationScoreEventResource** | icar:ConformationScoreEvent | icarConformationScoreEventResource.json +DailyMilkingAverages | **icarDailyMilkingAveragesResource** | icar:DailyMilkingAverages | icarDailyMilkingAveragesResource.json +Device | **icarDeviceResource** | icar:Device | icarDeviceResource.json +DiagnosisEvent | **icarDiagnosisEventResource** | icar:DiagnosisEvent | icarDiagnosisEventResource.json +FeedIntakeEvent | **icarFeedIntakeEventResource** | icar:FeedIntakeEvent | icarFeedIntakeEventResource.json +FeedRecommendation | **icarFeedRecommendationResource** | icar:FeedRecommendation | icarFeedRecommendationResource.json +FeedReport | **icarFeedReportResource** | icar:FeedReport | icarFeedReportResource.json +Feed | **icarFeedResource** | icar:Feed | icarFeedResource.json +FeedStorage | **icarFeedStorageResource** | icar:FeedStorage | icarFeedStorageResource.json +FeedTransaction | **icarFeedTransactionResource** | icar:FeedTransaction | icarFeedTransactionResource.json +Gestation | **icarGestationResource** | icar:Gestation | icarGestationResource.json +GroupFeedingEvent | **icarGroupFeedingEventResource** | icar:GroupFeedingEvent | icarGroupFeedingEventResource.json +GroupMovementArrivalEvent | **icarGroupMovementArrivalEventResource**| icar:GroupMovementArrivalEvent | icarGroupMovementArrivalEventResource.json +GroupMovementBirthEvent | **icarGroupMovementBirthEventResource** | icar:GroupMovementBirthEvent | icarGroupMovementBirthEventResource.json +GroupMovementDeathEvent | **icarGroupMovementDeathEventResource** | icar:GroupMovementDeathEvent | icarGroupMovementDeathEventResource.json +GroupMovementDepartureEvent | **icarGroupMovementDepartureEventResource** | icar:GroupMovementDepartureEvent | icarGroupMovementDepartureEventResource.json +GroupTreatmentEvent | **icarGroupTreatmentEventResource** | icar:GroupTreatmentEvent | icarGroupTreatmentEventResource.json +GroupWeightEvent | **icarGroupWeightEventResource** | icar:GroupWeightEvent | icarGroupWeightEventResource.json +HealthStatusObservedEvent | **icarHealthStatusObservedEventResource** | icar:HealthStatusObservedEvent | icarHealthStatusObservedEventResource.json +InventoryTransaction | **icarInventoryTransactionResource** | icar:InventoryTransaction | icarInventoryTransactionResource.json +Lactation | **icarLactationResource** | icar:Lactation | icarLactationResource.json +LactationStatusObservedEvent | **icarLactationStatusObservedEventResource** | icar:LactationStatusObservedEvent | icarLactationStatusObservedEventResource.json +Location | **icarLocationResource** | icar:Location | icarLocationResource.json +Medicine | **icarMedicineResource** | icar:Medicine | icarMedicineResource.json +MedicineTransaction | **icarMedicineTransactionResource** | icar:MedicineTransaction | icarMedicineTransactionResource.json +MilkingDryOffEvent | **icarMilkingDryOffEventResource** | icar:MilkingDryOffEvent | icarMilkingDryOffEventResource.json +MilkingVisitEvent | **icarMilkingVisitEventResource** | icar:MilkingVisitEvent | icarMilkingVisitEventResource.json +MilkPrediction | **icarMilkPredictionResource** | icar:MilkPrediction | icarMilkPredictionResource.json +MovementArrivalEvent | **icarMovementArrivalEventResource** | icar:MovementArrivalEvent | icarMovementArrivalEventResource.json +MovementBirthEvent | **icarMovementBirthEventResource** | icar:MovementBirthEvent | icarMovementBirthEventResource.json +MovementDeathEvent | **icarMovementDeathEventResource** | icar:MovementDeathEvent | icarMovementDeathEventResource.json +MovementDepartureEvent | **icarMovementDepartureEventResource** | icar:MovementDepartureEvent | icarMovementDepartureEventResource.json +ProcessingLot | **icarProcessingLotResource** | icar:ProcessingLot | icarProcessingLotResource.json +ProgenyDetails | **icarProgenyDetailsResource** | icar:ProgenyDetails | icarProgenyDetailsResource.json +Ration | **icarRationResource** | icar:Ration | icarRationResource.json +ReproAbortionEvent | **icarReproAbortionEventResource** | icar:ReproAbortionEvent | icarReproAbortionEventResource.json +ReproDoNotBreedEvent | **icarReproDoNotBreedEventResource** | icar:ReproDoNotBreedEvent | icarReproDoNotBreedEventResource.json +ReproEmbryoFlushingEvent | **icarReproEmbryoFlushingEventResource** | icar:ReproEmbryoFlushingEvent | icarReproEmbryoFlushingEventResource.json +ReproEmbryo | **icarReproEmbryoResource** | icar:ReproEmbryo | icarReproEmbryoResource.json +ReproHeatEvent | **icarReproHeatEventResource** | icar:ReproHeatEvent | icarReproHeatEventResource.json +ReproInseminationEvent | **icarReproInsemonationEventResource** | icar:ReproInsemonationEvent | icarReproInsemonationEventResource.json +ReproMatingRecommendation | **icarReproMatingRecommendationResource** | icar:ReproMatingRecommendation | icarReproMatingRecommendationResource.json +ReproParturitionEvent | **icarReproParturitionEventResource** | icar:ReproParturitionEvent | icarReproParturitionEventResource.json +ReproPregnancyCheckEvent | **icarReproPregnancyCheckEventResource** | icar:ReproPregnancyCheckEvent | icarReproPregnancyCheckEventResource.json +ReproSemenStraw | **icarReproSemenStrawResource** | icar:ReproSemenStraw | icarReproSemenStrawResource.json +ReproStatusObservedEvent | **icarReproStatusObservedEventResource** | icar:ReproStatusObservedEvent | icarReproStatusObservedEventResource.json +SchemeType | **icarSchemeTypeResource** | icar:SchemeType | icarSchemeTypeResource.json +SchemeValue | **icarSchemeValueResource** | icar:SchemeValue | icarSchemeValueResource.json +Statistics | **icarStatisticsResource** | icar:Statistics | icarStatisticsResource.json +TestDay | **icarTestDayResource** | icar:TestDay | icarTestDayResource.json +TestDayResult | **icarTestDayResultResource** | icar:TestDayResult | icarTestDayResultResource.json +TreatmentEvent | **icarTreatmentEventResource** | icar:TreatmentEvent | icarTreatmentEventResource.json +TreatmentProgramEvent | **icarTreatmentProgramEventResource** | icar:TreatmentProgramEvent | icarTreatmentProgramEventResource.json +TypeClassificationEvent | **icarTypeClassificationEventResource** | icar:TypeClassificationEvent | icarTypeClassificationEventResource.json +WeightEvent | **icarWeightEventResource** | icar:WeightEvent | icarWeightEventResource.json +WithdrawalEvent | **icarWithdrawalEventResource** | icar:WithdrawalEvent | icarWithdrawalEventResource.json + diff --git a/types/icarAnimalStateType.json b/types/icarAnimalStateType.json new file mode 100644 index 0000000..0ed1ca9 --- /dev/null +++ b/types/icarAnimalStateType.json @@ -0,0 +1,24 @@ +{ + "description": "State information about an animal", + + "type": "object", + + "properties": { + "currentLactationParity": { + "type": "number", + "description": "The current parity of the animal." + }, + "lastCalvingDate": { + "$ref": "../types/icarDateType.json", + "description": "RFC3339 UTC date (see https://ijmacd.github.io/rfc3339-iso8601/)." + }, + "lastInseminationDate": { + "$ref": "../types/icarDateType.json", + "description": "RFC3339 UTC date (see https://ijmacd.github.io/rfc3339-iso8601/)." + }, + "lastDryingOffDate": { + "$ref": "../types/icarDateType.json", + "description": "RFC3339 UTC date (see https://ijmacd.github.io/rfc3339-iso8601/)." + } + } +} diff --git a/types/icarBreedFractionsType.json b/types/icarBreedFractionsType.json index 3cd7371..52909ae 100644 --- a/types/icarBreedFractionsType.json +++ b/types/icarBreedFractionsType.json @@ -1,5 +1,5 @@ { - "description": "", + "description": "Defines the breeds of the animal by fraction expressed as a denominator and, for each breed, a numerator.", "type": "object", @@ -14,11 +14,13 @@ }, "fractions": { "type": "array", + "description": "The numerators of breed fractions for each breed proportion.", "items": { "type": "object", "properties": { "breed": { - "$ref": "icarBreedIdentifierType.json" + "$ref": "icarBreedIdentifierType.json", + "description": "The breed for this breed fraction using a scheme and id." }, "fraction": { "type": "number", @@ -29,4 +31,4 @@ } } } -} \ No newline at end of file +} diff --git a/types/icarCarcassMetricType.json b/types/icarCarcassMetricType.json index f2c30d2..490817b 100644 --- a/types/icarCarcassMetricType.json +++ b/types/icarCarcassMetricType.json @@ -5,7 +5,8 @@ "properties": { "id": { - "$ref": "../types/icarCarcassMetricIdentifierType.json" + "$ref": "../types/icarCarcassMetricIdentifierType.json", + "description": "The id of the metric expressed as a scheme and id." }, "method": { "description": "The standard method used to determine the value of the metric.", @@ -16,4 +17,4 @@ "type": "string" } } -} \ No newline at end of file +} diff --git a/types/icarConsignmentType.json b/types/icarConsignmentType.json index c59179f..a9b84ce 100644 --- a/types/icarConsignmentType.json +++ b/types/icarConsignmentType.json @@ -9,7 +9,8 @@ "description": "Official identifier for the movement." }, "originLocation": { - "$ref": "../types/icarLocationIdentifierType.json" + "$ref": "../types/icarLocationIdentifierType.json", + "description": "The location of the origin of the consignment expressed as a scheme and id." }, "originAddress": { "description": "Origin address for movement.", @@ -25,7 +26,8 @@ "$ref": "../types/icarOrganizationType.json" }, "destinationLocation": { - "$ref": "../types/icarLocationIdentifierType.json" + "$ref": "../types/icarLocationIdentifierType.json", + "description": "The location of the destination of the consignment expressed as a scheme and id." }, "destinationAddress": { "description": "Destination address for movement.", @@ -110,4 +112,4 @@ } } } -} \ No newline at end of file +} diff --git a/types/icarConsumedFeedType.json b/types/icarConsumedFeedType.json index 9e2ac76..94cfc36 100644 --- a/types/icarConsumedFeedType.json +++ b/types/icarConsumedFeedType.json @@ -12,11 +12,15 @@ }, "entitlement": { "$ref": "../types/icarFeedQuantityType.json", - "description": "The amount of feed the animal was entitled to reveive" + "description": "The amount of feed the animal was entitled to receive" }, "feedConsumption": { "$ref": "../types/icarFeedQuantityType.json", "description": "The amount of feed the animal has consumed" + }, + "dryMatterPercentage": { + "type": "number", + "description": "The dry matter content of the feed provided or consumed, expressed as a percentage." } } } diff --git a/types/icarConsumedRationType.json b/types/icarConsumedRationType.json index e7bec9e..dbf3d30 100644 --- a/types/icarConsumedRationType.json +++ b/types/icarConsumedRationType.json @@ -1,5 +1,5 @@ { - "description": "Gives the consumed amount of feed and the amount the animal was entitled to. Amounts are real weights.", + "description": "Gives the consumed amount of a mixed ration, and the amount the animal was entitled to. Amounts are real weights.", "type": "object", "required": [ @@ -13,11 +13,15 @@ }, "entitlement": { "$ref": "../types/icarFeedQuantityType.json", - "description": "The amount of feed the animal was entitled to reveive" + "description": "The amount of feed the animal was entitled to receive" }, "feedConsumption": { "$ref": "../types/icarFeedQuantityType.json", "description": "The amount of feed the animal has consumed" + }, + "dryMatterPercentage": { + "type": "number", + "description": "The dry matter content of the ration provided or consumed, expressed as a percentage." } } } diff --git a/types/icarDeviceReferenceType.json b/types/icarDeviceReferenceType.json index e8171c7..291c711 100644 --- a/types/icarDeviceReferenceType.json +++ b/types/icarDeviceReferenceType.json @@ -1,5 +1,5 @@ { - "description": "", + "description": "Device reference details.", "allOf": [{ "$ref": "../types/icarResourceReferenceType.json" @@ -15,6 +15,14 @@ "serial": { "type": "string", "description": "Optionally, the serial number of the device." + }, + "manufacturerName": { + "type": "string", + "description": "The manufacturer of the device. This is called `manufacturerName` to distinguish it from the manufacturer-specific parameters in icarDevice." + }, + "registration": { + "$ref": "../types/icarDeviceRegistrationIdentifierType.json", + "description": "A registration identifier for the device (most devices should eventually have a registration issued by `org.icar` or other entity)." } } } diff --git a/types/icarDeviceRegistrationIdentifierType.json b/types/icarDeviceRegistrationIdentifierType.json new file mode 100644 index 0000000..a6adcd4 --- /dev/null +++ b/types/icarDeviceRegistrationIdentifierType.json @@ -0,0 +1,11 @@ +{ + "description": "A device registration scheme and ID that identifies a registered device. The primary scheme used should be `org.icar`.", + + "type": "object", + + "allOf": [ + { + "$ref": "../types/icarIdentifierType.json" + } + ] +} \ No newline at end of file diff --git a/types/icarFeedDurationType.json b/types/icarFeedDurationType.json index 071a6b7..b4aedc4 100644 --- a/types/icarFeedDurationType.json +++ b/types/icarFeedDurationType.json @@ -14,7 +14,8 @@ }, "value": { "type": "number", - "format": "double" + "format": "double", + "description": "The duration of the feeding in the units specified." } } } diff --git a/types/icarFeedQuantityType.json b/types/icarFeedQuantityType.json index e6f899a..7b773e2 100644 --- a/types/icarFeedQuantityType.json +++ b/types/icarFeedQuantityType.json @@ -15,7 +15,8 @@ }, "value": { "type": "number", - "format": "double" + "format": "double", + "description": "The feed quantity in the units specified." } } } diff --git a/types/icarGroupSpecifierType.json b/types/icarGroupSpecifierType.json index 8e05016..4c6a4d3 100644 --- a/types/icarGroupSpecifierType.json +++ b/types/icarGroupSpecifierType.json @@ -5,23 +5,19 @@ "properties": { "lactationNumberRangeMin": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "minimum number of lactations for the animals in the group." }, "lactationNumberRangeMax": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "maximum number of lactations for the animals in the group." }, "daysInMilkRangeMin": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "minimum number of days in milk for the animals in the group." }, "daysInMilkRangeMax": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "maximum number of days in milk for the animals in the group." }, "animalSetId": { diff --git a/types/icarIndividualWeightType.json b/types/icarIndividualWeightType.json index 5bce0bd..501be0f 100644 --- a/types/icarIndividualWeightType.json +++ b/types/icarIndividualWeightType.json @@ -4,14 +4,13 @@ "properties": { "animal": { + "type": ["object", "null"], "$ref": "../types/icarAnimalIdentifierType.json", - "description": "Unique animal scheme and identifier combination.", - "nullable": true + "description": "Unique animal scheme and identifier combination." }, "weight": { - "type": "number", - "description": "The weight measurement", - "nullable": true + "type": ["number", "null"], + "description": "The weight measurement" } } } \ No newline at end of file diff --git a/types/icarInventoryClassificationType.json b/types/icarInventoryClassificationType.json index 3110fc3..845e9e2 100644 --- a/types/icarInventoryClassificationType.json +++ b/types/icarInventoryClassificationType.json @@ -26,10 +26,9 @@ "description": "Primary breed defined using an identifier and scheme." }, "birthPeriod": { - "type": "string", + "type": ["string", "null"], "pattern": "^(([0-9]{4})|([0-9]{4}-[0-1][0-9])|([0-9]{4}-[0-1][0-9]-[0-3][0-9](Z?)(\/|--)[0-9]{4}-[0-1][0-9]-[0-3][0-9](Z?)))$", - "description": "The range of birth dates. Use YYYY (all one year), YYYY-MM (one month), or two RFC3339 date-times separated by / to represent a range.", - "nullable": true + "description": "The range of birth dates. Use YYYY (all one year), YYYY-MM (one month), or two RFC3339 date-times separated by / to represent a range." }, "reproductiveStatus": { "$ref": "../enums/icarAnimalReproductionStatusType.json", @@ -45,6 +44,10 @@ "items": { "$ref": "../enums/icarProductionPurposeType.json" } + }, + "reference": { + "type": "string", + "description": "An external reference (identifier or name) to further identify the group of animals." } } } \ No newline at end of file diff --git a/types/icarMedicineCourseSummaryType.json b/types/icarMedicineCourseSummaryType.json index fcdad68..19c7757 100644 --- a/types/icarMedicineCourseSummaryType.json +++ b/types/icarMedicineCourseSummaryType.json @@ -33,14 +33,12 @@ "description": "Total dose proposed or administered." }, "numberOfTreatments": { - "type": "number", - "description": "The number of treatments included in the course.", - "nullable": true + "type": ["number", "null"], + "description": "The number of treatments included in the course." }, "treatmentInterval": { - "type": "integer", - "description": "The interval between treatments specified in HOURS.", - "nullable": true + "type": ["integer", "null"], + "description": "The interval between treatments specified in HOURS." }, "batches": { "type": "array", diff --git a/types/icarMedicineReferenceType.json b/types/icarMedicineReferenceType.json index b14851b..60ee9d9 100644 --- a/types/icarMedicineReferenceType.json +++ b/types/icarMedicineReferenceType.json @@ -13,7 +13,8 @@ "description": "An indicator whether the medicine or remedy is an approved medicine" }, "registeredIdentifier": { - "$ref": "../types/icarMedicineIdentifierType.json" + "$ref": "../types/icarMedicineIdentifierType.json", + "description": "The registered identifier of the medicine expressed as a scheme and id." } } } diff --git a/types/icarMetaDataType.json b/types/icarMetaDataType.json index 88bdab0..2be379a 100644 --- a/types/icarMetaDataType.json +++ b/types/icarMetaDataType.json @@ -14,7 +14,7 @@ }, "sourceId": { "type": "string", - "description": "Unique Id (ideally UUID) for the resource in the original source system. Treat source and sourceId as an icarIdentifierType." + "description": "Unique Id within Source (e.g. UUID, IRI, URI, or composite ID if needed) for the resource in the original source system. \n Systems should generate (if needed), store, and return sourceId if at all possible.\nICAR ADE working group intend to make use of metadata, source and sourceId mandatory in the next major release (2.0)." }, "isDeleted": { "type": "boolean", @@ -26,7 +26,7 @@ }, "created": { "description": "RFC3339 UTC date/time of creation (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance).", - "nullable": true, + "type": ["string", "null"], "allOf": [ { "$ref": "../types/icarDateTimeType.json" @@ -39,7 +39,7 @@ }, "validFrom": { "description": "RFC3339 UTC start of period when the resource is valid (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance).", - "nullable": true, + "type": ["string", "null"], "allOf": [ { "$ref": "../types/icarDateTimeType.json" @@ -48,7 +48,7 @@ }, "validTo": { "description": "RFC3339 UTC end of the period when the resoure is valid (see https://ijmacd.github.io/rfc3339-iso8601/ for format guidance).", - "nullable": true, + "type": ["string", "null"], "allOf": [ { "$ref": "../types/icarDateTimeType.json" diff --git a/types/icarMilkCharacteristicsType.json b/types/icarMilkCharacteristicsType.json index 9eeb63f..3286b1a 100644 --- a/types/icarMilkCharacteristicsType.json +++ b/types/icarMilkCharacteristicsType.json @@ -11,7 +11,7 @@ "properties": { "characteristic": { "type": "string", - "description": "ICAR Milk Characteristics Codes and values: SCC, FAT, PROTEIN, LAC, UREA, BLOOD, ACETONE, BHB, LDH, PRO, AVGCOND, MAXCOND, AVGFLWR, MAXFLWR, WEIGHT, TEMPERATURE.\nThe following units have to be applied:\n\n|SCC|Somatic cell count|x1000 cells/ml|NCL\n|FAT|Fat|%|VP\n|PROTEIN|Protein|%|VP\n|LAC|Lactose|%|VP\n|UREA|Urea|mg/l|M1\n|BLOOD|Blood|true/false|A99\n|ACETONE|Acetone|mmol/l|M33\n|BHB|Beta hydroxybutyrate|mmol/l|M33\n|LDH|Lactate dehydrogenase|IU/l|\n|PRO|Progesteron|mmol/l|M33\n|AVGCOND|Average conductivity value of the milk at 25 ° C|mS/cm|H61\n|MAXCOND|Maximum conductivity value of the milk at 25 ° C|mS/cm|H61\n|AVGFLWR|Average flow rate|Kg/min|F31\n|MAXFLWR|Max flow rate|Kg/min|F31\n|WEIGHT|Weight of animal|Kg|KGM\n|PAG|Pregnancy associated glycoprotein|mmol/l|M33" + "description": "Treat this field as an enum, with the list and units in https://github.com/adewg/ICAR/blob/ADE-1/enums/icarMilkCharacteristicCodeType.json." }, "value": { "type": "string", @@ -19,7 +19,7 @@ }, "unit": { "type": "string", - "description": "the defaults are described above, only use this field when differed from the default. Use UN/CEFACT codes." + "description": "Use the units for characteristics in https://github.com/adewg/ICAR/blob/ADE-1/enums/icarMilkCharacteristicCodeType.json. Only override when your units for a characteristic are different. Use UN/CEFACT codes." }, "measuringDevice": { "type": "string", diff --git a/types/icarPositionObservationType.json b/types/icarPositionObservationType.json new file mode 100644 index 0000000..f6d89d5 --- /dev/null +++ b/types/icarPositionObservationType.json @@ -0,0 +1,20 @@ +{ + "description": "This type may be included in a position observation event to identify either a named position (such as a barn or pen) or a geographic location.", + + "type": "object", + + "properties": { + "positionName": { + "type": "string", + "description": "The name of a location, such as a barn, pen, building, or field." + }, + "site": { + "type": "string", + "description": "Identifier for a sorting site (icarSortingSiteResource) for this position." + }, + "geometry": { + "$ref": "https://geojson.org/schema/Geometry.json", + "description": "A GeoJSON geometry (such as a latitude/longitude point) that specifies the position." + } + } +} diff --git a/types/icarPositionType.json b/types/icarPositionType.json index c1277e3..72ac79b 100644 --- a/types/icarPositionType.json +++ b/types/icarPositionType.json @@ -6,7 +6,7 @@ "properties": { "position": { - "description": "The position to be treated or diagnosed.", + "description": "Position on the animal where the diagnosis or treatment occurred.", "$ref": "../enums/icarPositionOnAnimalType.json" } } diff --git a/types/icarQuarterMilkingType.json b/types/icarQuarterMilkingType.json index 072e743..c08ae24 100644 --- a/types/icarQuarterMilkingType.json +++ b/types/icarQuarterMilkingType.json @@ -15,18 +15,15 @@ ] }, "xposition": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "Optional milking robot X position. Vendors may choose not to provide this." }, "yposition": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "Optional milking robot Y position. Vendors may choose not to provide this." }, "zposition": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "Optional milking robot Z position. Vendors may choose not to provide this." }, "quarterMilkingDuration": { diff --git a/types/icarResourceReferenceType.json b/types/icarResourceReferenceType.json index 09ed987..6634b26 100644 --- a/types/icarResourceReferenceType.json +++ b/types/icarResourceReferenceType.json @@ -15,8 +15,7 @@ }, "@type": { "type": "string", - "description": "Deprecated - use reltype. Specifies whether this is a single resource Link or a Collection.", - "enum": ["Link"] + "description": "Deprecated - use reltype. Specifies whether this is a single resource Link or a Collection." }, "identifier": { "$ref": "../types/icarIdentifierType.json", diff --git a/types/icarStatisticsGroupType.json b/types/icarStatisticsGroupType.json index 6992906..7fc789c 100644 --- a/types/icarStatisticsGroupType.json +++ b/types/icarStatisticsGroupType.json @@ -8,8 +8,7 @@ "$ref": "../enums/icarGroupType.json" }, "denominator": { - "type": "number", - "nullable": true, + "type": ["number", "null"], "description": "Number of animals in the group." }, "icarGroupSpecifier": { diff --git a/types/icarStatisticsType.json b/types/icarStatisticsType.json index 13ce1fb..e00d3c3 100644 --- a/types/icarStatisticsType.json +++ b/types/icarStatisticsType.json @@ -6,14 +6,15 @@ "properties": { "metric": { "$ref": "../types/icarMetricType.json", - "description": "The metric code for a specific statitics. See https://github.com/adewg/ICAR/wiki/Schemes for more info" + "description": "The metric code for a specific statistics. See https://github.com/adewg/ICAR/wiki/Schemes for more info" }, "unit": { "type": "string", "description": "The unit of the metric. This must be appropriate to the metric and UN-CEFACT unit codes should be used where possible." }, "aggregation": { - "$ref": "../enums/icarAggregationType.json" + "$ref": "../enums/icarAggregationType.json", + "description": "The aggregation applied to the metric." }, "value": { "type": "number", diff --git a/url-schemes/exampleUrlScheme.json b/url-schemes/exampleUrlScheme.json index 4136249..7a45dcd 100644 --- a/url-schemes/exampleUrlScheme.json +++ b/url-schemes/exampleUrlScheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Release Candidate Messages", "description": "The specifications of messages which are ready for ICAR approval and release", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -14,43 +14,43 @@ "url": "https://icar-ade.standard.com" }], "tags": [{ - "name": "ADE-1.3 additions", + "name": "ADE-1.4 additions", "description": "new endpoints not yet approved" }, { - "name": "ADE-1.3-feed", + "name": "ADE-1.4-feed", "description": "Feed messages approved by the working group" }, { - "name": "ADE-1.3-health", + "name": "ADE-1.4-health", "description": "Health messages approved by the working group" }, { - "name": "ADE-1.3-management", + "name": "ADE-1.4-management", "description": "Management messages approved by the working group" }, { - "name": "ADE-1.3-milk", + "name": "ADE-1.4-milk", "description": "Milk messages approved by the working group" }, { - "name": "ADE-1.3-performance", + "name": "ADE-1.4-performance", "description": "Performance messages approved by the working group" }, { - "name": "ADE-1.3-registration", + "name": "ADE-1.4-registration", "description": "Registration messages approved by the working group" }, { - "name": "ADE-1.3-reproduction", + "name": "ADE-1.4-reproduction", "description": "Reproduction messages approved by the working group" }, { - "name": "ADE-1.3-carcass", + "name": "ADE-1.4-carcass", "description": "Carcass messages approved by the working group" }, { - "name": "ADE-1.3-scheme", + "name": "ADE-1.4-scheme", "description": "Scheme definitions approved by the working group" } ], @@ -61,7 +61,7 @@ "summary": "Get available schema/id combinations for locations.", "description": "# Purpose\nProvide a list of available locations.\nShould return only those combinations the user currently logged in has access to.", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "responses": { "200": { @@ -91,7 +91,7 @@ "summary": "Get the milking-withdrawals for a certain location", "description": "# Purpose\nProvides the milking-withdrawals for a certain location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -130,7 +130,7 @@ "summary": "Get the data for milking visits", "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": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -173,7 +173,7 @@ "summary": "Get the test days", "description": "# Purpose\nProvides data from the test days on a farm that intersects with the given start/end date if provided. Otherwise returns all available entries.", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -216,7 +216,7 @@ "summary": "Get the data for test day results", "description": "# Purpose\nProvides data from the test day for animals on a farm\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -259,7 +259,7 @@ "summary": "Get the milk predictions for a certain location", "description": "# Purpose\nProvides the milk predictions for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -298,7 +298,7 @@ "summary": "Get daily averages for milking-visits of a animals", "description": "# Purpose\nProvides daily averages of the milking-visits of per animal.", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -336,7 +336,7 @@ "summary": "Get the data for lactations", "description": "# Purpose\nProvides data from lactations of animals.", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -368,7 +368,7 @@ "summary": "Get the list of observed changes to lactation status for animals.", "description": "# Purpose\nProvides a list of events arising from observed changes to lactation status.", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -406,7 +406,7 @@ "summary": "Get the births for a certain location", "description": "# Purpose\nProvides the born animals on a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -444,7 +444,7 @@ "summary": "Get the deaths for a certain location", "description": "# Purpose\nProvides the died animals on a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -482,7 +482,7 @@ "summary": "Get the arrivals for a certain location", "description": "# Purpose\nProvides the arrived animals on a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -525,7 +525,7 @@ "summary": "Get the departures for a certain location", "description": "# Purpose\nProvides the departed animals from a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -563,7 +563,7 @@ "summary": "Get the animals for a certain location", "description": "# Purpose\nProvides the animals on a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -595,7 +595,7 @@ "summary": "Get the animal sets for a certain location", "description": "# Purpose\nProvides the animal sets on a location. If animal-scheme and animal-id are provided, the sets containing that animal are returned.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -635,7 +635,7 @@ "summary": "Get the animal set join events for a certain location", "description": "# Purpose\nProvides the animal set join events on a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -679,7 +679,7 @@ "summary": "Get the animal set leave events for a certain location", "description": "# Purpose\nProvides the animal set leave events on a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -723,7 +723,7 @@ "summary": "Get the service sires matching your query parameters - for now we only implement the query by some identifier, like lifetime number, ai-code, ... ", "description": "# Purpose\nProvides the service sires.\nOnly animal fields relevant to service sires will be populated (location is not expected, for example).", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [{ "$ref": "#/components/parameters/identifier-scheme" @@ -755,7 +755,7 @@ "summary": "Get the statistics for a certain location", "description": "# Purpose\nProvides the statistics for a location\n One can specify the period for which the statistics can be calculated by specifying a date to and date from parameter. Also the purpose can be provided to limit the purpose of the statistics", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -797,7 +797,7 @@ "summary": "Get the pregnancy checks for a certain location", "description": "# Purpose\nProvides the pregnancy checks on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -840,7 +840,7 @@ "summary": "Get the heats for a certain location", "description": "# Purpose\nProvides the Heats on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -878,7 +878,7 @@ "summary": "Get the inseminations for a certain location", "description": "# Purpose\nProvides the Inseminations on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -921,7 +921,7 @@ "summary": "Get the drying off for a certain location", "description": "# Purpose\nProvides the drying off on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -967,7 +967,7 @@ "summary": "Get the abortion events for a certain location", "description": "# Purpose\nProvides the abortion events on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1005,7 +1005,7 @@ "summary": "Get the animals that were assigned as do-not-breed for a certain location", "description": "# Purpose\nProvides the not be bred animals on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1043,7 +1043,7 @@ "summary": "Get the parturition events for a certain location", "description": "# Purpose\nProvides the Parturition events on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1081,7 +1081,7 @@ "summary": "Get the embryo flushing events for a certain location", "description": "# Purpose\nProvides the embryo flushing events on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1119,7 +1119,7 @@ "summary": "Get the weight data of animals", "description": "# Purpose\nProvides weight data from animals on a farm.", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1157,7 +1157,7 @@ "summary": "Get the device data for a location", "description": "# Purpose\nProvides device data for devices present on a farm.", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1195,7 +1195,7 @@ "summary": "Get the feed storage device data for a location", "description": "# Purpose\nProvides feed storage device data for storages present on a farm.", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1238,7 +1238,7 @@ "summary": "Get the breeding values of the animals of a location", "description": "# Purpose\nProvides breeding values of the animals present on a farm.", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1276,7 +1276,7 @@ "summary": "Get the mating recommendations for a certain location", "description": "# Purpose\nProvides the mating recommendations on a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1314,7 +1314,7 @@ "summary": "Get the conformation scores for a certain location", "description": "# Purpose\nProvides the conformation scores on a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1352,7 +1352,7 @@ "summary": "Get the type classification events for a certain location", "description": "# Purpose\nProvides the animal type classification events for a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -1391,7 +1391,7 @@ "summary": "Get the diagnoses for a certain location", "description": "# Purpose\nProvides the animal health diagnoses for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1429,7 +1429,7 @@ "summary": "Get the treatments for a certain location", "description": "# Purpose\nProvides the animal health treatments for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1467,7 +1467,7 @@ "summary": "Get the treatment programs for a certain location", "description": "# Purpose\nProvides the animal health treatment programs for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1505,7 +1505,7 @@ "summary": "Get the health-status-observed of an animal for a certain location", "description": "# Purpose\nProvides the animal health-status for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -1544,7 +1544,7 @@ "summary": "Get the gestations for a certain location", "description": "# Purpose\nProvides the gestations for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1582,7 +1582,7 @@ "summary": "Get the feeds available on a certain location", "description": "# Purpose\nProvides the feeds for a location. We recommend using the fao.org scheme for the type of feeds and the icar.org scheme for the feed properties\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1620,7 +1620,7 @@ "summary": "Get the rations for a certain location", "description": "# Purpose\nProvides the rations for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1658,7 +1658,7 @@ "summary": "Get the feed intakes for a certain location", "description": "# Purpose\nProvides the feed intakes for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1690,13 +1690,52 @@ } } }, + "/locations/{location-scheme}/{location-id}/group-feeding": { + "get": { + "operationId": "get-group-feeding", + "summary": "Get the group feeding events for a certain location", + "description": "# Purpose\nProvides the group feeding events for a location.\n", + "tags": [ + "ADE-1.4-feed" + ], + "parameters": [{ + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the feed intakes for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupFeedingEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/feed-recommendations": { "get": { "operationId": "get-Feed-Recommendations", "summary": "Get the feed recommendations for a certain location", "description": "# Purpose\nProvides the feed recommendations for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1734,7 +1773,7 @@ "summary": "Get the feed reports for animals on a certain location for a certain period. One can use the report-start- and report-end-date-time paramters to get a daily feed report. ", "description": "# Purpose\nProvides the feed reports for animal on a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1778,7 +1817,7 @@ "summary": "Get the list of observed changes to animal reproductive status", "description": "# Purpose\nProvides a collection of events where a change to animal reproductive status has been observed.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1816,7 +1855,7 @@ "summary": "Get the list of schemata/schema types supported", "description": "# Purpose\nProvides a list of schemata/schema types supported.\n", "tags": [ - "ADE-1.3-scheme" + "ADE-1.4-scheme" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1853,7 +1892,7 @@ "summary": "Get the list of schema type schemes", "description": "# Purpose\nProvides a list of schemata/schema types supported.\n", "tags": [ - "ADE-1.3-scheme" + "ADE-1.4-scheme" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1896,7 +1935,7 @@ "summary": "Get the list of values for specidif sheme", "description": "# Purpose\nProvides a list of scheme values for specific scheme\n", "tags": [ - "ADE-1.3-scheme" + "ADE-1.4-scheme" ], "parameters": [{ "$ref": "#/components/parameters/location-scheme" @@ -1939,7 +1978,7 @@ "summary": "Get the group treatments for a certain location", "description": "# Purpose\nProvides the group health treatments for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -1978,7 +2017,7 @@ "summary": "Get the weights for a certain location", "description": "# Purpose\nProvides the group weights for a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -2017,7 +2056,7 @@ "summary": "Get the group arrival events for a certain location", "description": "# Purpose\nProvides the group arrival records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -2056,7 +2095,7 @@ "summary": "Get the group birth or registration events for a certain location", "description": "# Purpose\nProvides the group birth records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -2095,7 +2134,7 @@ "summary": "Get the group death events for a certain location", "description": "# Purpose\nProvides the group death records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -2134,7 +2173,7 @@ "summary": "Get the group departure events for a certain location", "description": "# Purpose\nProvides the group departure records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -2173,7 +2212,7 @@ "summary": "Get the processing lots that relate to a certain location", "description": "# Purpose\nProvides the carcass processing lots relating to a location\n", "tags": [ - "ADE-1.3-carcass" + "ADE-1.4-carcass" ], "parameters": [ { @@ -2212,7 +2251,7 @@ "summary": "Get the carcasses that relate to a certain location", "description": "# Purpose\nProvides the carcasses relating to a location\n", "tags": [ - "ADE-1.3-carcass" + "ADE-1.4-carcass" ], "parameters": [ { @@ -2251,7 +2290,7 @@ "summary": "Get the carcass observation events that relate to a certain location", "description": "# Purpose\nProvides the carcass observation events relating to a location\n", "tags": [ - "ADE-1.3-carcass" + "ADE-1.4-carcass" ], "parameters": [ { @@ -2290,7 +2329,7 @@ "summary": "Get the inventory transactions that relate to a certain location", "description": "# Purpose\nProvides the inventory transactions relating to a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -2344,7 +2383,7 @@ "summary": "Get the feed inventory transactions that relate to a certain location", "description": "# Purpose\nProvides the feed inventory transactions relating to a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -2395,7 +2434,7 @@ "summary": "Get the medicine inventory transactions that relate to a certain location", "description": "# Purpose\nProvides the medicine inventory transactions relating to a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-health" ], "parameters": [ { @@ -2439,6 +2478,159 @@ } } } + }, + "/locations/{location-scheme}/{location-id}/attention-events": { + "get": { + "operationId": "get-attention-events", + "summary": "Get attention events.", + "description": "# Purpose\nProvides the attention events for a location. These are individual animal events, typically generated by devices such as wearables and sensors.\n", + "tags": [ + "ADE-1.4-health" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the attention event resources for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAttentionEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/position-observations": { + "get": { + "operationId": "get-animal-position-observations", + "summary": "Get position observation events for animals that relate to a given location", + "description": "# Purpose\nProvides the collection of position observation events for animals at the specified location.\n", + "tags": [ + "ADE-1.3-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the animal position observation events for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarPositionObservationEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/group-position-observations": { + "get": { + "operationId": "get-group-position-observations", + "summary": "Get position observation events for groups that relate to a given location", + "description": "# Purpose\nProvides the collection of position observation events for groups at the specified location.\n", + "tags": [ + "ADE-1.3-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the animal position observation events for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupPositionObservationEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } } }, "components": { @@ -2560,6 +2752,9 @@ "icarFeedIntakeEventCollection": { "$ref": "../collections/icarFeedIntakeEventCollection.json" }, + "icarGroupFeedingEventCollection": { + "$ref": "../collections/icarGroupFeedingEventCollection.json" + }, "icarFeedReportCollection": { "$ref": "../collections/icarFeedReportCollection.json" }, @@ -2616,6 +2811,15 @@ }, "icarMedicineTransactionCollection": { "$ref": "../collections/icarMedicineTransactionCollection.json" + }, + "icarAttentionEventCollection": { + "$ref": "../collections/icarAttentionEventCollection.json" + }, + "icarPositionObservationEventCollection": { + "$ref": "../collections/icarPositionObservationEventCollection.json" + }, + "icarGroupPositionObservationEventCollection": { + "$ref": "../collections/icarGroupPositionObservationEventCollection.json" } }, "parameters": { diff --git a/url-schemes/feedURLscheme.json b/url-schemes/feedURLscheme.json index cf7fe39..2d7d7d4 100644 --- a/url-schemes/feedURLscheme.json +++ b/url-schemes/feedURLscheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Feed-related events and messages API Specifications", "description": "Specifications for messages that support livestock feeding and feed management.", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -17,7 +17,7 @@ ], "tags": [ { - "name": "ADE-1.3-feed", + "name": "ADE-1.4-feed", "description": "Feeding messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get the feeds for a certain location", "description": "# Purpose\nProvides the animal feeds for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -65,7 +65,7 @@ "summary": "Add a single new feed.", "description": "# Purpose\nAllows a client to add a single feed.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -133,7 +133,7 @@ "summary": "Get the rations for a certain location", "description": "# Purpose\nProvides the animal rations for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -170,7 +170,7 @@ "summary": "Add a single new ration.", "description": "# Purpose\nAllows a client to add a single ration.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -238,7 +238,7 @@ "summary": "Get the feed intake events for a certain location", "description": "# Purpose\nProvides the animal feed intake events for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -275,7 +275,7 @@ "summary": "Add a single new feed intake event.", "description": "# Purpose\nAllows a client to add a single feed intake event.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -343,7 +343,7 @@ "summary": "Get the feed recommendations for a certain location", "description": "# Purpose\nProvides the animal feed recommendations for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -380,7 +380,7 @@ "summary": "Add a single new feed recommendation.", "description": "# Purpose\nAllows a client to add a single feed recommendation.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -448,7 +448,7 @@ "summary": "Get the feed reports for animals on a certain location for a certain period. One can use the report-start- and report-end-date-time paramters to get a daily feed report. If you need feed-reports for AnimalSets please refer to the WIKI pages : https://github.com/adewg/ICAR/wiki/Feed-Reporting", "description": "# Purpose\nProvides the feed reports for animal on a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -493,7 +493,7 @@ "summary": "Get the feed storage devices for a certain location", "description": "# Purpose\nProvides the animal feed storage devices for a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -535,7 +535,7 @@ "summary": "Add a single new feed storage.", "description": "# Purpose\nAllows a client to add a single feed-storage.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -603,7 +603,7 @@ "summary": "Get the feed inventory transactions that relate to a certain location", "description": "# Purpose\nProvides the feed inventory transactions relating to a location\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -652,7 +652,7 @@ "summary": "Add a single new feed inventory transaction.", "description": "# Purpose\nAllows a client to add a single feed inventory transaction.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -714,13 +714,118 @@ } } }, + "/locations/{location-scheme}/{location-id}/group-feeding": { + "get": { + "operationId": "get-group-feeding", + "summary": "Get the group feeding events for a certain location", + "description": "# Purpose\nProvides the group feeding events for a location\n", + "tags": [ + "ADE-1.4-feed" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the resources for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupFeedingEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + }, + "post": { + "operationId": "post-single-group-feeding", + "summary": "Add a single new group feeding event.", + "description": "# Purpose\nAllows a client to add a single group feeding event.\n", + "tags": [ + "ADE-1.4-feed" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The group feeding event to create. \nA client MAY fill in the *Id* field with a client-generated UUID and the server MAY use this *Id*.\nIf the server does not use the client-specified *ID* field it shall issue its own *ID* for the resource.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupFeedingEventResource" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a copy of the event, as modifed by the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupFeedingEventResource" + } + } + } + }, + "201": { + "description": "Created. The Location header contains the URI to the new resource.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the new resource." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, "/batches/locations/{location-scheme}/{location-id}/feeds": { "post": { "operationId": "post-batch-feeds", "summary": "Add an array of feeds.", "description": "# Purpose \nAllows a client to add a collection of feeds.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -795,7 +900,7 @@ "summary": "Add an array of rations.", "description": "# Purpose \nAllows a client to add a collection of rations.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -870,7 +975,7 @@ "summary": "Add an array of feed intake events.", "description": "# Purpose \nAllows a client to add a collection of feed intake events.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -945,7 +1050,7 @@ "summary": "Add an array of feed recommendations.", "description": "# Purpose \nAllows a client to add a collection of feed recommendations.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -1020,7 +1125,7 @@ "summary": "Add an array of feed storages.", "description": "# Purpose \nAllows a client to add a collection of feed storages.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -1095,7 +1200,7 @@ "summary": "Add an array of feed inventory transactions.", "description": "# Purpose \nAllows a client to add a collection of feed inventory transactions.\n", "tags": [ - "ADE-1.3-feed" + "ADE-1.4-feed" ], "parameters": [ { @@ -1163,6 +1268,81 @@ } } } + }, + "/batches/locations/{location-scheme}/{location-id}/group-feedings": { + "post": { + "operationId": "post-batch-group-feedings", + "summary": "Add an array of group feeding events.", + "description": "# Purpose \nAllows a client to add a collection of group feeding events.\n", + "tags": [ + "ADE-1.4-feed" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The collection of group feeding events to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupFeedingEventArray" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a set of batch results, which may include warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + }, + "201": { + "description": "Created. The Location header contains URI to retrieve a set of batch results, which may include warnings.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the results." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "description": "The response contains a set of batch results, which may include errors and warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + } + } + } } }, "components": { @@ -1247,7 +1427,19 @@ "items": { "$ref": "#/components/schemas/icarFeedTransactionResource" } - } + }, + "icarGroupFeedingEventResource": { + "$ref": "../resources/icarGroupFeedingEventResource.json" + }, + "icarGroupFeedingEventCollection": { + "$ref": "../collections/icarGroupFeedingEventCollection.json" + }, + "icarGroupFeedingEventArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarGroupFeedingEventResource" + } + } }, "parameters": { "location-scheme": { diff --git a/url-schemes/healthURLScheme.json b/url-schemes/healthURLScheme.json index c5814a1..e9ac3fa 100644 --- a/url-schemes/healthURLScheme.json +++ b/url-schemes/healthURLScheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Health Diagnosis and Treatment API Specifications", "description": "Specifications for messages that support livestock health and disease diagnosis and treatments.", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -17,7 +17,7 @@ ], "tags": [ { - "name": "ADE-1.3-health", + "name": "ADE-1.4-health", "description": "Health messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get the diagnoses for a certain location", "description": "# Purpose\nProvides the animal health diagnoses for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -65,7 +65,7 @@ "summary": "Add a single new diagnosis event", "description": "# Purpose \nAllows a client to add a single animal health diagnosis event.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -133,7 +133,7 @@ "summary": "Get the treatments for a certain location", "description": "# Purpose\nProvides the animal health treatments for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -170,7 +170,7 @@ "summary": "Add a single new health treatment event", "description": "# Purpose \nAllows a client to add a single animal health treatment event.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -220,7 +220,7 @@ "summary": "Get the group treatments for a certain location", "description": "# Purpose\nProvides the group health treatments for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -257,7 +257,7 @@ "summary": "Add one group health treatment event", "description": "# Purpose \nAllows a client to add one group health treatment event.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -307,7 +307,7 @@ "summary": "Get the treatment programs for a certain location", "description": "# Purpose\nProvides the animal health treatment programs for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -344,7 +344,7 @@ "summary": "Add a single new health treatment programme.", "description": "# Purpose \nAllows a client to add a single animal health treatment programme.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -394,7 +394,7 @@ "summary": "Get the health-status-observed of an animal for a certain location", "description": "# Purpose\nProvides the animal health-status for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -431,7 +431,7 @@ "summary": "Add a single new health status observed.", "description": "# Purpose \nAllows a client to add a single animal health status observed.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -481,7 +481,7 @@ "summary": "Get medicine inventory transactions.", "description": "# Purpose\nProvides the medicine inventory transactions for a location\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -530,7 +530,7 @@ "summary": "Add a single new medicine inventory transaction.", "description": "# Purpose \nAllows a client to add a single medicine inventory transaction.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -557,7 +557,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/icarHealthStatusObservedEvent" + "$ref": "#/components/schemas/icarMedicineTransactionResource" } } } @@ -574,13 +574,112 @@ } } }, + "/locations/{location-scheme}/{location-id}/attention-events": { + "get": { + "operationId": "get-attention-events", + "summary": "Get attention events.", + "description": "# Purpose\nProvides the attention events for a location. These are individual animal events, typically generated by devices such as wearables and sensors.\n", + "tags": [ + "ADE-1.4-health" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the attention event resources for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAttentionEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + }, + "post": { + "operationId": "post-single-attention-event", + "summary": "Add a single new attention event.", + "description": "# Purpose \nAllows a client to add a single attention event (typically generated by a device, wearable, or sensor).\n", + "tags": [ + "ADE-1.4-health" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The attention event resource to create. \nA client MAY fill in the *ID* field with a client-generated UUID and the server MAY use this *ID*.\nIf the server does not use the client-specified *ID* field it shall issue its own *ID* for the resource.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\nThis applies to all resource *ID* and *meta* objects in the *icarTreatmentProgramEvent*.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAttentionEventResource" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a copy of the resource, as modifed by the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAttentionEventResource" + } + } + } + }, + "201": { + "description": "Created. The Location header contains the URI to the new resource." + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status." + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, "/batches/locations/{location-scheme}/{location-id}/diagnoses": { "post": { "operationId": "post-batch-Diagnosis", "summary": "Add a single new diagnosis event", "description": "# Purpose \nAllows a client to add a collection of animal health diagnosis events.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -655,7 +754,7 @@ "summary": "Add a collection of health treatment events", "description": "# Purpose \nAllows a client to add a collection of animal health treatment events.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -730,7 +829,7 @@ "summary": "Add a collection of group health treatment events", "description": "# Purpose \nAllows a client to add a collection of group health treatment events.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -805,7 +904,7 @@ "summary": "Add a collection of animal health treatment program events.", "description": "# Purpose \nAllows a client to add a collection of animal health treatment program events.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -880,7 +979,7 @@ "summary": "Add new health status observed events", "description": "# Purpose \nAllows a client to add a collection of animal health status observed events.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -955,7 +1054,7 @@ "summary": "Add an array of medicine inventory transactions.", "description": "# Purpose \nAllows a client to add a collection of medicine inventory transactions.\n", "tags": [ - "ADE-1.3-health" + "ADE-1.4-health" ], "parameters": [ { @@ -1023,6 +1122,81 @@ } } } + }, + "/batches/locations/{location-scheme}/{location-id}/attention-events": { + "post": { + "operationId": "post-batch-attention-events", + "summary": "Add an array of attention events.", + "description": "# Purpose \nAllows a client to add a collection of attention events for animals. These are typically generated by devices such as wearables and sensors.\n", + "tags": [ + "ADE-1.4-health" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The collection of attention events to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAttentionEventArray" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a set of batch results, which may include warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + }, + "201": { + "description": "Created. The Location header contains URI to retrieve a set of batch results, which may include warnings.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the results." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "description": "The response contains a set of batch results, which may include errors and warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + } + } + } } }, "components": { @@ -1104,7 +1278,19 @@ "items": { "$ref": "#/components/schemas/icarMedicineTransactionResource" } - } + }, + "icarAttentionEventResource": { + "$ref": "../resources/icarAttentionEventResource.json" + }, + "icarAttentionEventCollection": { + "$ref": "../collections/icarAttentionEventCollection.json" + }, + "icarAttentionEventArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarAttentionEventResource" + } + } }, "parameters": { "location-scheme": { diff --git a/url-schemes/managementURLScheme.json b/url-schemes/managementURLScheme.json index ff9fd65..ed1ff2a 100644 --- a/url-schemes/managementURLScheme.json +++ b/url-schemes/managementURLScheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Management events and messages API Specifications", "description": "Specifications for messages that support livestock management activities.", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -17,7 +17,7 @@ ], "tags": [ { - "name": "ADE-1.3-management", + "name": "ADE-1.4-management", "description": "Management messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get the animal sets for a certain location", "description": "# Purpose\nProvides the animal animal sets for a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -65,7 +65,7 @@ "summary": "Add a single new animal set.", "description": "# Purpose\nAllows a client to add a single animal set.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -133,7 +133,7 @@ "summary": "Get the animal set joins events for a certain location", "description": "# Purpose\nProvides the animal animal set join events for a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -170,7 +170,7 @@ "summary": "Add a single new animal set join event.", "description": "# Purpose\nAllows a client to add a single animal-set-join.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -238,7 +238,7 @@ "summary": "Get the animal set leave events for a certain location", "description": "# Purpose\nProvides the animal animal set leave events for a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -275,7 +275,7 @@ "summary": "Add a single new animal set leave event.", "description": "# Purpose\nAllows a client to add a single animal set leave event.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -343,7 +343,7 @@ "summary": "Get the devices for a certain location", "description": "# Purpose\nProvides the animal devices for a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -380,7 +380,7 @@ "summary": "Add a single new device.", "description": "# Purpose\nAllows a client to add a single device.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -448,7 +448,7 @@ "summary": "Get the statistics for a certain location", "description": "# Purpose\nProvides the statistics for a location\n One can specify the period for which the statistics can be calculated by specifying a date to and date from parameter. Also the purpose can be provided to limit the purpose of the statistics", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -490,7 +490,7 @@ "summary": "Get the inventory transactions that relate to a certain location", "description": "# Purpose\nProvides the inventory transactions relating to a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -544,7 +544,7 @@ "summary": "Get the feed inventory transactions that relate to a certain location", "description": "# Purpose\nProvides the feed inventory transactions relating to a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -595,7 +595,7 @@ "summary": "Get the medicine inventory transactions that relate to a certain location", "description": "# Purpose\nProvides the medicine inventory transactions relating to a location\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -639,14 +639,249 @@ } } } + }, + "/locations/{location-scheme}/{location-id}/position-observations": { + "get": { + "operationId": "get-animal-position-observations", + "summary": "Get position observation events for animals that relate to a given location", + "description": "# Purpose\nProvides the collection of position observation events for animals at the specified location.\n", + "tags": [ + "ADE-1.3-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the animal position observation events for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarPositionObservationEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + }, + "post": { + "operationId": "post-single-animal-position-observation", + "summary": "Add a single new animal position observation event.", + "description": "# Purpose\nAllows a client to add a single animal position observation event.\n", + "tags": [ + "ADE-1.3-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The device to create. \nA client MAY fill in the *Id* field with a client-generated UUID and the server MAY use this *Id*.\nIf the server does not use the client-specified *ID* field it shall issue its own *ID* for the resource.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarPositionObservationEventResource" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a copy of the event, as modifed by the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarDeviceResource" + } + } + } + }, + "201": { + "description": "Created. The Location header contains the URI to the new resource.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the new resource." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/group-position-observations": { + "get": { + "operationId": "get-group-position-observations", + "summary": "Get position observation events for groups that relate to a given location", + "description": "# Purpose\nProvides the collection of position observation events for groups at the specified location.\n", + "tags": [ + "ADE-1.3-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/date-from" + }, + { + "$ref": "#/components/parameters/date-to" + }, + { + "$ref": "#/components/parameters/identifier-scheme" + }, + { + "$ref": "#/components/parameters/identifier-id" + }, + { + "$ref": "#/components/parameters/meta-modified-from" + }, + { + "$ref": "#/components/parameters/meta-modified-to" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the animal position observation events for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupPositionObservationEventCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } }, + "post": { + "operationId": "post-single-group-position-observation", + "summary": "Add a single new group position observation event.", + "description": "# Purpose\nAllows a client to add a single group position observation event.\n", + "tags": [ + "ADE-1.3-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The device to create. \nA client MAY fill in the *Id* field with a client-generated UUID and the server MAY use this *Id*.\nIf the server does not use the client-specified *ID* field it shall issue its own *ID* for the resource.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupPositionObservationEventResource" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a copy of the event, as modifed by the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarDeviceResource" + } + } + } + }, + "201": { + "description": "Created. The Location header contains the URI to the new resource.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the new resource." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + + }, "/batches/locations/{location-scheme}/{location-id}/animal-sets": { "post": { "operationId": "post-batch-animal-sets", "summary": "Add an array of animal-sets.", "description": "# Purpose \nAllows a client to add a collection of animal-sets.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -721,7 +956,7 @@ "summary": "Add an array of animal-set join events.", "description": "# Purpose \nAllows a client to add a collection of animal-set join events.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -796,7 +1031,7 @@ "summary": "Add an array of animal set leave events.", "description": "# Purpose \nAllows a client to add a collection of animal set leave events.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -871,7 +1106,7 @@ "summary": "Add an array of devices.", "description": "# Purpose \nAllows a client to add a collection of devices.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -946,7 +1181,7 @@ "summary": "Add an array of inventory transactions.", "description": "# Purpose \nAllows a client to add a collection of inventory transactions.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -1021,7 +1256,7 @@ "summary": "Add an array of feed inventory transactions.", "description": "# Purpose \nAllows a client to add a collection of feed inventory transactions.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -1096,7 +1331,7 @@ "summary": "Add an array of medicine inventory transactions.", "description": "# Purpose \nAllows a client to add a collection of medicine inventory transactions.\n", "tags": [ - "ADE-1.3-management" + "ADE-1.4-management" ], "parameters": [ { @@ -1164,6 +1399,156 @@ } } } + }, + "/batches/locations/{location-scheme}/{location-id}/position-observations": { + "post": { + "operationId": "post-batch-animal-position-observations", + "summary": "Add an array of animal position observation events.", + "description": "# Purpose \nAllows a client to add a collection of position observation events for individual animals.\n", + "tags": [ + "ADE-1.3-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The collection of animal position observation events to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarPositionObservationEventArray" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a set of batch results, which may include warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + }, + "201": { + "description": "Created. The Location header contains URI to retrieve a set of batch results, which may include warnings.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the results." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "description": "The response contains a set of batch results, which may include errors and warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + } + } + } + }, + "/batches/locations/{location-scheme}/{location-id}/group-position-observations": { + "post": { + "operationId": "post-batch-group-position-observations", + "summary": "Add an array of group position observation events.", + "description": "# Purpose \nAllows a client to add a collection of position observation events for groups.\n", + "tags": [ + "ADE-1.3-management" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The collection of animal position observation events to create. \nA client MAY fill in resource *Id*s with a client-generated UUID and the server MAY use these *Id*s.\nIf the server does not use the client-specified *Id* field it shall issue its own *Id*s for the resources.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarGroupPositionObservationEventArray" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a set of batch results, which may include warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + }, + "201": { + "description": "Created. The Location header contains URI to retrieve a set of batch results, which may include warnings.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the results." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "default": { + "description": "The response contains a set of batch results, which may include errors and warnings.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/batchResults" + } + } + } + } + } + } } }, "components": { @@ -1260,6 +1645,30 @@ "items": { "$ref": "#/components/schemas/icarMedicineTransactionResource" } + }, + "icarGroupPositionObservationEventResource": { + "$ref": "../resources/icarGroupPositionObservationEventResource.json" + }, + "icarGroupPositionObservationEventCollection": { + "$ref": "../collections/icarGroupPositionObservationEventCollection.json" + }, + "icarGroupPositionObservationEventArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarGroupPositionObservationEventResource" + } + }, + "icarPositionObservationEventResource": { + "$ref": "../resources/icarPositionObservationEventResource.json" + }, + "icarPositionObservationEventCollection": { + "$ref": "../collections/icarPositionObservationEventCollection.json" + }, + "icarPositionObservationEventArray": { + "type": "array", + "items": { + "$ref": "#/components/schemas/icarPositionObservationEventResource" + } } }, "parameters": { diff --git a/url-schemes/milkURLScheme.json b/url-schemes/milkURLScheme.json index 638ee55..4513310 100644 --- a/url-schemes/milkURLScheme.json +++ b/url-schemes/milkURLScheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Milk recording and lactation information API Specifications", "description": "Specifications for messages that support dairy milking visits, lactation, and related information.", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -17,7 +17,7 @@ ], "tags": [ { - "name": "ADE-1.3-milk", + "name": "ADE-1.4-milk", "description": "Milking-related messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get the milking-visits for a certain location", "description": "# Purpose\nProvides the animal milking-visits for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -65,7 +65,7 @@ "summary": "Add a single new milking-visits.", "description": "# Purpose\nAllows a client to add a single milking-visits.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -133,7 +133,7 @@ "summary": "Get the test-day for a certain location", "description": "# Purpose\nProvides the animal test-day for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -170,7 +170,7 @@ "summary": "Add a single new test-day.", "description": "# Purpose\nAllows a client to add a single test-day.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -238,7 +238,7 @@ "summary": "Get the test-day-result for a certain location", "description": "# Purpose\nProvides the animal test-day-result for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -275,7 +275,7 @@ "summary": "Add a single new test-day-result.", "description": "# Purpose\nAllows a client to add a single test-day-result.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -343,7 +343,7 @@ "summary": "Get the daily milking averages for a certain location", "description": "# Purpose\nProvides the animal daily milking averages for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -382,7 +382,7 @@ "summary": "Get the milk predictions for a certain location", "description": "# Purpose\nProvides the milk predictions for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -421,7 +421,7 @@ "summary": "Get the lactations for a certain location", "description": "# Purpose\nProvides the animal lactation for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -454,7 +454,7 @@ "summary": "Get the lactation status observations for a certain location", "description": "# Purpose\nProvides the animal lactation status observations for a location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -491,7 +491,7 @@ "summary": "Add a single new lactation status observation event.", "description": "# Purpose\nAllows a client to add a single lactation status observation event.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -559,7 +559,7 @@ "summary": "Get the milking-withdrawals for a certain location", "description": "# Purpose\nProvides the milking-withdrawals for a certain location\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -598,7 +598,7 @@ "summary": "Add a single new milking-visits event", "description": "# Purpose \nAllows a client to add a collection of milking visits.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -673,7 +673,7 @@ "summary": "Add batch of test-days.", "description": "# Purpose \nAllows a client to add a collection of test-days.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -748,7 +748,7 @@ "summary": "Add an array of test-day-results.", "description": "# Purpose \nAllows a client to add a collection of test-day-result.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { @@ -823,7 +823,7 @@ "summary": "Add an array of lactation status observations.", "description": "# Purpose \nAllows a client to add a collection of lactation status observations.\n", "tags": [ - "ADE-1.3-milk" + "ADE-1.4-milk" ], "parameters": [ { diff --git a/url-schemes/performanceURLScheme.json b/url-schemes/performanceURLScheme.json index 4ce0ccc..5a3873c 100644 --- a/url-schemes/performanceURLScheme.json +++ b/url-schemes/performanceURLScheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Performance observation events and messages API Specifications", "description": "Specifications for messages that support livestock performance assessment other than milk production.", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -17,7 +17,7 @@ ], "tags": [ { - "name": "ADE-1.3-performance", + "name": "ADE-1.4-performance", "description": "Performance messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get the weights for a certain location", "description": "# Purpose\nProvides the animal weights for a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -65,7 +65,7 @@ "summary": "Add a single new weight.", "description": "# Purpose\nAllows a client to add a single weight.\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -133,7 +133,7 @@ "summary": "Get the weights for a certain location", "description": "# Purpose\nProvides the group weights for a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -170,7 +170,7 @@ "summary": "Add a single group weight.", "description": "# Purpose\nAllows a client to add a single group weight.\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -238,7 +238,7 @@ "summary": "Get the breeding values for a certain location", "description": "# Purpose\nProvides the animal breeding values for a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -277,7 +277,7 @@ "summary": "Get the conformation score events for a certain location", "description": "# Purpose\nProvides the animal conformation score events for a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -314,7 +314,7 @@ "summary": "Add a single new conformation score.", "description": "# Purpose\nAllows a client to add a single conformation score.\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -382,7 +382,7 @@ "summary": "Get the type classification events for a certain location", "description": "# Purpose\nProvides the animal type classification events for a location\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -419,7 +419,7 @@ "summary": "Add a single new type classificatione.", "description": "# Purpose\nAllows a client to add a single type classification.\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -487,7 +487,7 @@ "summary": "Add an array of weights.", "description": "# Purpose \nAllows a client to add a collection of weights.\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -562,7 +562,7 @@ "summary": "Add an array of weights.", "description": "# Purpose \nAllows a client to add a collection of group weights.\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { @@ -637,7 +637,7 @@ "summary": "Add an array of conformation-scores.", "description": "# Purpose \nAllows a client to add a collection of conformation scores.\n", "tags": [ - "ADE-1.3-performance" + "ADE-1.4-performance" ], "parameters": [ { diff --git a/url-schemes/registrationURLScheme.json b/url-schemes/registrationURLScheme.json index 0caa7fc..ae3d573 100644 --- a/url-schemes/registrationURLScheme.json +++ b/url-schemes/registrationURLScheme.json @@ -1,9 +1,9 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Animal Registration and Movement API Specifications", "description": "Specifications for messages that support livestock movement information and registration (sometimes called I&R).", - "version": "1.3", + "version": "1.4", "contact": { "name": "Animal Data Exchange Working Group", "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", @@ -17,7 +17,7 @@ ], "tags": [ { - "name": "ADE-1.3-registration", + "name": "ADE-1.4-registration", "description": "Registration and movement messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get available schema/id combinations for locations.", "description": "# Purpose\nProvide a list of available locations.\nShould return only those combinations the user currently logged in has access to.", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "responses": { "200": { @@ -58,7 +58,7 @@ "summary": "Get the animals for a certain location", "description": "# Purpose\nProvides the animals on a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -89,7 +89,7 @@ "summary": "Add a single animal resource.", "description": "# Purpose \nAllows a client to add a single animal resource. Many servers do not support adding animals, requiring a registration event instead.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -157,7 +157,7 @@ "summary": "Get the births for a certain location", "description": "# Purpose\nProvides the animal birth records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -194,7 +194,7 @@ "summary": "Add a single new birth or initial registration event", "description": "# Purpose \nAllows a client to add a single animal birth or initial registration event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -262,7 +262,7 @@ "summary": "Get the group birth or registration events for a certain location", "description": "# Purpose\nProvides the group birth records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -299,7 +299,7 @@ "summary": "Add one group birth or registration event", "description": "# Purpose \nAllows a client to add one group birth or registration event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -367,7 +367,7 @@ "summary": "Get the group death events for a certain location", "description": "# Purpose\nProvides the group death records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -404,7 +404,7 @@ "summary": "Add one group death event", "description": "# Purpose \nAllows a client to add a group death event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -472,7 +472,7 @@ "summary": "Get the deaths for a certain location", "description": "# Purpose\nProvides the animal death records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -509,7 +509,7 @@ "summary": "Add a single new death event", "description": "# Purpose \nAllows a client to add a single animal death event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -577,7 +577,7 @@ "summary": "Get the arrivals for a certain location", "description": "# Purpose\nProvides the animal arrival records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -614,7 +614,7 @@ "summary": "Add a single new arrival event", "description": "# Purpose \nAllows a client to add a single animal arrival event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -682,7 +682,7 @@ "summary": "Get the group arrival events for a certain location", "description": "# Purpose\nProvides the group arrival records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -719,7 +719,7 @@ "summary": "Add a group arrival event", "description": "# Purpose \nAllows a client to add a group arrival event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -787,7 +787,7 @@ "summary": "Get the departures for a certain location", "description": "# Purpose\nProvides the animal departure records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -824,7 +824,7 @@ "summary": "Add a single new departure event", "description": "# Purpose \nAllows a client to add a single animal departure event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -892,7 +892,7 @@ "summary": "Get the group departure events for a certain location", "description": "# Purpose\nProvides the group departure records for a location\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -929,7 +929,7 @@ "summary": "Add a group departure event", "description": "# Purpose \nAllows a client to add a group departure event.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -997,7 +997,7 @@ "summary": "Add an array of animal resources", "description": "# Purpose \nAllows a client to add a collection of animal resources. Many servers do not support adding animals, requiring registration events instead.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1072,7 +1072,7 @@ "summary": "Add an array of birth or initial registration events", "description": "# Purpose \nAllows a client to add a collection of animal birth events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1147,7 +1147,7 @@ "summary": "Add an array of group birth or initial registration events", "description": "# Purpose \nAllows a client to add an array of group birth events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1222,7 +1222,7 @@ "summary": "Add an array of death events", "description": "# Purpose \nAllows a client to add a collection of animal death events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1297,7 +1297,7 @@ "summary": "Add an array of group death events", "description": "# Purpose \nAllows a client to add an array of group death events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1372,7 +1372,7 @@ "summary": "Add an array of arrival events", "description": "# Purpose \nAllows a client to add a collection of animal arrival events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1447,7 +1447,7 @@ "summary": "Add an array of group arrival events", "description": "# Purpose \nAllows a client to add an array of group arrival events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1522,7 +1522,7 @@ "summary": "Add an array of departure events", "description": "# Purpose \nAllows a client to add a collection of animal departure events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { @@ -1597,7 +1597,7 @@ "summary": "Add an array of group departure events", "description": "# Purpose \nAllows a client to add an array of group departure events.\n", "tags": [ - "ADE-1.3-registration" + "ADE-1.4-registration" ], "parameters": [ { diff --git a/url-schemes/reproductionURLScheme.json b/url-schemes/reproductionURLScheme.json index a03d8bc..01517e7 100644 --- a/url-schemes/reproductionURLScheme.json +++ b/url-schemes/reproductionURLScheme.json @@ -1,5 +1,5 @@ { - "openapi": "3.0.1", + "openapi": "3.1.0", "info": { "title": "Reproduction API Specifications", "description": "Specifications for messages that support livestock reproduction recording.", @@ -17,7 +17,7 @@ ], "tags": [ { - "name": "ADE-1.3-reproduction", + "name": "ADE-1.4-reproduction", "description": "Reproduction messages approved by the working group" } ], @@ -28,7 +28,7 @@ "summary": "Get the pregnancy-checks for a certain location", "description": "# Purpose\nProvides the animal pregnancy-checks for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -65,7 +65,7 @@ "summary": "Add a single new pregnancy-check.", "description": "# Purpose\nAllows a client to add a single pregnancy-check.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -133,7 +133,7 @@ "summary": "Get the heats for a certain location", "description": "# Purpose\nProvides the animal heats for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -170,7 +170,7 @@ "summary": "Add a single new heat.", "description": "# Purpose\nAllows a client to add a single heat.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -238,7 +238,7 @@ "summary": "Get the inseminations for a certain location", "description": "# Purpose\nProvides the animal inseminations for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -275,7 +275,7 @@ "summary": "Add a single new insemination.", "description": "# Purpose\nAllows a client to add a single insemination.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -343,7 +343,7 @@ "summary": "Get the drying-off events for a certain location", "description": "# Purpose\nProvides the animal drying off events for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -380,7 +380,7 @@ "summary": "Add a single new drying off event.", "description": "# Purpose\nAllows a client to add a single drying-off.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -448,7 +448,7 @@ "summary": "Get the abortions for a certain location", "description": "# Purpose\nProvides the animal abortions for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -485,7 +485,7 @@ "summary": "Add a single new abortion.", "description": "# Purpose\nAllows a client to add a single abortion.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -553,7 +553,7 @@ "summary": "Get the do-not-breed events for a certain location", "description": "# Purpose\nProvides the animal do-not-breed events for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -590,7 +590,7 @@ "summary": "Add a single new do-not-breed.", "description": "# Purpose\nAllows a client to add a single do-not-breed.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -658,7 +658,7 @@ "summary": "Get the parturitions for a certain location", "description": "# Purpose\nProvides the animal parturition (birth) events for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -695,7 +695,7 @@ "summary": "Add a single new parturition.", "description": "# Purpose\nAllows a client to add a single parturition.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -763,7 +763,7 @@ "summary": "Get the mating recommendations for a certain location", "description": "# Purpose\nProvides the animal mating recommendations for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -800,7 +800,7 @@ "summary": "Add a single new mating recommendation.", "description": "# Purpose\nAllows a client to add a single mating recommendation.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -868,7 +868,7 @@ "summary": "Get the gestations for a certain location", "description": "# Purpose\nProvides the animal gestations for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -905,7 +905,7 @@ "summary": "Add a single new gestation.", "description": "# Purpose\nAllows a client to add a single gestation.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -973,7 +973,7 @@ "summary": "Get the reproductive status observations for a certain location", "description": "# Purpose\nProvides the animal reproductive status observations for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1010,7 +1010,7 @@ "summary": "Add a single new repro-status-observation.", "description": "# Purpose\nAllows a client to add a single reproductive status observation.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1078,7 +1078,7 @@ "summary": "Get the embryo flushings for a certain location", "description": "# Purpose\nProvides the animal embryo flushings for a location\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1115,7 +1115,7 @@ "summary": "Add a single new embyro flushing.", "description": "# Purpose\nAllows a client to add a single embryo flushing event.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1183,7 +1183,7 @@ "summary": "Add an array of pregnancy-checks.", "description": "# Purpose \nAllows a client to add a collection of pregnancy-checks.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1258,7 +1258,7 @@ "summary": "Add an array of heats.", "description": "# Purpose \nAllows a client to add a collection of heats.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1333,7 +1333,7 @@ "summary": "Add an array of inseminations.", "description": "# Purpose \nAllows a client to add a collection of inseminations.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1408,7 +1408,7 @@ "summary": "Add an array of drying-off events.", "description": "# Purpose \nAllows a client to add a collection of drying-off events.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1483,7 +1483,7 @@ "summary": "Add an array of abortions.", "description": "# Purpose \nAllows a client to add a collection of abortions.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1558,7 +1558,7 @@ "summary": "Add an array of do-not-breed events.", "description": "# Purpose \nAllows a client to add a collection of do-not-breed events.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1633,7 +1633,7 @@ "summary": "Add an array of parturitions.", "description": "# Purpose \nAllows a client to add a collection of parturitions.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1708,7 +1708,7 @@ "summary": "Add an array of mating recommendations.", "description": "# Purpose \nAllows a client to add a collection of mating recommendations.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1783,7 +1783,7 @@ "summary": "Add an array of gestations.", "description": "# Purpose \nAllows a client to add a collection of gestations.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1858,7 +1858,7 @@ "summary": "Add an array of reproductive status observations.", "description": "# Purpose \nAllows a client to add a collection of reproductive status observations.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { @@ -1933,7 +1933,7 @@ "summary": "Add an array of embryo-flushings.", "description": "# Purpose \nAllows a client to add a collection of embryo-flushings.\n", "tags": [ - "ADE-1.3-reproduction" + "ADE-1.4-reproduction" ], "parameters": [ { diff --git a/url-schemes/sortingURLScheme.json b/url-schemes/sortingURLScheme.json new file mode 100644 index 0000000..cbff7cf --- /dev/null +++ b/url-schemes/sortingURLScheme.json @@ -0,0 +1,294 @@ +{ + "openapi": "3.0.1", + "info": { + "title": "Sorting-related messages API Specifications", + "description": "Specifications for messages that support livestock sorting management.", + "version": "1.3", + "contact": { + "name": "Animal Data Exchange Working Group", + "url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", + "email": "icar@icar.org" + } + }, + "servers": [ + { + "url": "https://icar-ade.standard.com" + } + ], + "tags": [ + { + "name": "ADE-1.3-sorting", + "description": "Sorting messages approved by the working group" + } + ], + "paths": { + "/locations/{location-scheme}/{location-id}/sorting-sites": { + "get": { + "operationId": "get-sorting-sites", + "summary": "Get the sorting-sites for a certain location", + "description": "# Purpose\nProvides the sorting-sites for a location\n", + "tags": [ + "ADE-1.3-sorting" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the resources for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarSortingSiteCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/{animal-scheme}/{animal-id}/sorting": { + "get": { + "operationId": "get-sorting of an animal", + "summary": "Get the sorting of a certain animal for a certain site", + "description": "# Purpose\nProvides the sorting of a certain animal\n", + "tags": [ + "ADE-1.3-sorting" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/animal-scheme" + }, + { + "$ref": "#/components/parameters/animal-id" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the resources for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAnimalSortingCommandResource" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + }, + "delete": { + "operationId": "delete-animal-sorting", + "summary": "Delete sorting for a certain animal of a location", + "description": "# Purpose\nProvides the deletion of sorting for a location\n", + "tags": [ + "ADE-1.3-sorting" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + }, + { + "$ref": "#/components/parameters/animal-scheme" + }, + { + "$ref": "#/components/parameters/animal-id" + } + ], + "responses": { + "200": { + "description": "Successful." + }, + "default": { + "$ref": "#/components/responses/default" + } + } + } + }, + "/locations/{location-scheme}/{location-id}/sortings": { + "get": { + "operationId": "get-all-animal-sorting-commands", + "summary": "Get the known sorting-commands for all animals of a certain location", + "description": "# Purpose\nProvides the known sorting-commands for all animals of a location\n", + "tags": [ + "ADE-1.3-sorting" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "responses": { + "200": { + "description": "Successful. The response contains the resources for the given location.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAnimalSortingCommandCollection" + } + } + } + }, + "default": { + "$ref": "#/components/responses/default" + } + } + }, + "post": { + "operationId": "post-animal-sorting", + "summary": "Add an animal into a sorting-site.", + "description": "# Purpose\nAllows a client to add an animal to a sorting-site", + "tags": [ + "ADE-1.3-sorting" + ], + "parameters": [ + { + "$ref": "#/components/parameters/location-scheme" + }, + { + "$ref": "#/components/parameters/location-id" + } + ], + "requestBody": { + "required": true, + "description": "The sorting of an animal to be create. \nA client MAY fill in the *Id* field with a client-generated UUID and the server MAY use this *Id*.\nIf the server does not use the client-specified *ID* field it shall issue its own *ID* for the resource.\nA client SHALL ensure that the *meta.source* and *meta.sourceId* fields are filled by the client.\n", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAnimalSortingCommandResource" + } + } + } + }, + "responses": { + "200": { + "description": "Successful. The response contains a copy of the event, as modified by the server.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/icarAnimalSortingCommandResource" + } + } + } + }, + "201": { + "description": "Created. The Location header contains the URI to the new resource.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains the URI to the new resource." + } + } + }, + "202": { + "description": "Accepted. The Location header contains a URI that the client can query for processing status.", + "headers": { + "Location": { + "schema": { + "type": "string", + "format": "uri" + }, + "description": "Contains a URI to query creation status." + } + } + }, + "400": { + "$ref": "#/components/responses/default" + }, + "500": { + "$ref": "#/components/responses/default" + } + } + } + } + }, + "components": { + "schemas": { + "icarAnimalSortingCommandCollection": { + "$ref": "../collections/icarAnimalSortingCommandCollection.json" + }, + "icarSortingSiteCollection": { + "$ref": "../collections/icarSortingSiteCollection.json" + }, + "icarAnimalSortingCommandResource": { + "$ref": "../resources/icarAnimalSortingCommandResource.json" + } + }, + "parameters": { + "location-scheme": { + "name": "location-scheme", + "in": "path", + "description": "The scheme id for the location identifier.", + "required": true, + "schema": { + "type": "string" + } + }, + "location-id": { + "name": "location-id", + "in": "path", + "description": "The unique identifier for the location.", + "required": true, + "schema": { + "type": "string" + } + }, + "animal-scheme": { + "name": "animal-scheme", + "in": "path", + "description": "The scheme id for the animal identifier.", + "required": true, + "schema": { + "type": "string" + } + }, + "animal-id": { + "name": "animal-id", + "in": "path", + "description": "The unique identifier for the animal.", + "required": true, + "schema": { + "type": "string" + } + } + }, + "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": { + "$ref": "../collections/icarErrorCollection.json" + } + } + } + } + }, + "examples": {} + } +} diff --git a/well-known/icarDeviceRegistrationIdentifierType.md b/well-known/icarDeviceRegistrationIdentifierType.md new file mode 100644 index 0000000..5863912 --- /dev/null +++ b/well-known/icarDeviceRegistrationIdentifierType.md @@ -0,0 +1,6 @@ +# Well-known Registration Schemes for measurement, sensing, imaging, wearable, or control devices. + +| Short URI | Resolvable URI | Organisation | Description | +| --- | --- | --- | --- | +| org.icar | https://www.icar.org/index.php/icar-recording-guidelines/#section11 | ICAR | A device registration scheme operated by ICAR. | + diff --git a/well-known/icarMedicineIdentifierType.md b/well-known/icarMedicineIdentifierType.md index 9241cce..a491920 100644 --- a/well-known/icarMedicineIdentifierType.md +++ b/well-known/icarMedicineIdentifierType.md @@ -1,4 +1,7 @@ # Well-known Medicine Registration Identifier Schemes | Short URI | Resolvable URI | Description | Example | Code list or format specification | -| --- | --- | --- | --- | --- | \ No newline at end of file +| --- | --- | --- | --- | --- | +| nz.govt.acvm | https://eatsafe.nzfsa.govt.nz/web/public/acvm-register | New Zealand Agricultural Compounds and Veterinary Medicines Register. Use the **Registration Number** from this register. | Z123456 | Character followed by numbers | +| au.gov.apma | https://www.apvma.gov.au/ | Australian Pesticides and Veterinary Medicines Authority. Use the PubCRIS **product number** from this register. | 99999 | Numeric | +| uk.gov.vmd | https://www.vmd.defra.gov.uk/productinformationdatabase/ | Veterinary Medicines Directorate product information database. Use the **VM Number** from this register. | 12345/54321 | number "/" number |