Skip to content

Commit

Permalink
Merge pull request #457 from GEA-FT/animal-sorting
Browse files Browse the repository at this point in the history
Sorting of animals
  • Loading branch information
cookeac committed Apr 30, 2024
2 parents c2dc653 + 58a637d commit 0becf0e
Show file tree
Hide file tree
Showing 5 changed files with 399 additions and 0 deletions.
20 changes: 20 additions & 0 deletions collections/icarAnimalSortingCommandCollection.json
Original file line number Diff line number Diff line change
@@ -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)."
}
}
}
]
}
20 changes: 20 additions & 0 deletions collections/icarSortingSiteCollection.json
Original file line number Diff line number Diff line change
@@ -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."
}
}
}
]
}
34 changes: 34 additions & 0 deletions resources/icarAnimalSortingCommandResource.json
Original file line number Diff line number Diff line change
@@ -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)."
}
}
}
]
}
31 changes: 31 additions & 0 deletions resources/icarSortingSiteResource.json
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
]
}
Loading

0 comments on commit 0becf0e

Please sign in to comment.