Skip to content

Commit

Permalink
Merge pull request #438 from adewg/239-openapi-3.1
Browse files Browse the repository at this point in the history
Update to OpenAPI version 3.1
Resolves #239 
Resolves #451
  • Loading branch information
cookeac authored May 2, 2024
2 parents 584f50e + 60fd2f9 commit df6e1b3
Show file tree
Hide file tree
Showing 24 changed files with 285 additions and 321 deletions.
14 changes: 0 additions & 14 deletions .github/workflows/ValidateWithSpeccy.yml

This file was deleted.

2 changes: 1 addition & 1 deletion resources/icarAttentionEventResource.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@

"properties": {
"alertEndDateTime": {
"type": ["string", "null"],
"$ref": "../types/icarDateTimeType.json",
"nullable": true,
"description": "RFC3339 date time that represents the end time of an alert (start time is the eventDateTime) if it has ended."
},
"category": {
Expand Down
5 changes: 2 additions & 3 deletions resources/icarBatchResult.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
Expand Down
3 changes: 1 addition & 2 deletions resources/icarHealthStatusObservedEventResource.json
Original file line number Diff line number Diff line change
Expand Up @@ -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."
}
}
}
Expand Down
16 changes: 7 additions & 9 deletions resources/icarProgenyDetailsResource.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,15 @@
"properties": {
"identifier": {
"description": "Unique animal scheme and identifier combination.",
"nullable": true,
"type": ["object", "null"],
"allOf": [
{
"$ref": "../types/icarAnimalIdentifierType.json"
}
]
},
"alternativeIdentifiers": {
"nullable": true,
"type": "array",
"type": ["array","null"],
"items": {
"$ref": "../types/icarAnimalIdentifierType.json"
},
Expand All @@ -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": {
Expand All @@ -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"
Expand All @@ -63,7 +61,7 @@
},
"birthStatus": {
"description": "Birth status of the progeny.",
"nullable": true,
"type": ["string", "null"],
"allOf": [
{
"$ref": "../enums/icarParturitionBirthStatusType.json"
Expand All @@ -72,7 +70,7 @@
},
"birthSize": {
"description": "Size of the progeny.",
"nullable": true,
"type": ["string", "null"],
"allOf": [
{
"$ref": "../enums/icarParturitionBirthSizeType.json"
Expand All @@ -81,7 +79,7 @@
},
"birthWeight": {
"description": "Weight of the progeny.",
"nullable": true,
"type": ["object", "null"],
"allOf": [
{
"$ref": "../types/icarMassMeasureType.json"
Expand Down
3 changes: 1 addition & 2 deletions resources/icarReproDoNotBreedEventResource.json
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
Expand Down
6 changes: 2 additions & 4 deletions resources/icarReproParturitionEventResource.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
10 changes: 4 additions & 6 deletions resources/icarResponseMessageResource.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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."
}
}
}
12 changes: 4 additions & 8 deletions types/icarGroupSpecifierType.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
9 changes: 4 additions & 5 deletions types/icarIndividualWeightType.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
}
5 changes: 2 additions & 3 deletions types/icarInventoryClassificationType.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
10 changes: 4 additions & 6 deletions types/icarMedicineCourseSummaryType.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
6 changes: 3 additions & 3 deletions types/icarMetaDataType.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
Expand All @@ -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"
Expand Down
9 changes: 3 additions & 6 deletions types/icarQuarterMilkingType.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
3 changes: 1 addition & 2 deletions types/icarResourceReferenceType.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions types/icarStatisticsGroupType.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@
"$ref": "../enums/icarGroupType.json"
},
"denominator": {
"type": "number",
"nullable": true,
"type": ["number", "null"],
"description": "Number of animals in the group."
},
"icarGroupSpecifier": {
Expand Down
Loading

0 comments on commit df6e1b3

Please sign in to comment.