-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from adewg/master
Merge from ADE-WG
- Loading branch information
Showing
14 changed files
with
239 additions
and
181 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
{ | ||
"id": { | ||
"type": "string", | ||
"description": "A unique identifier for this particular occurrence of the problem" | ||
}, | ||
"status": { | ||
"type": "integer", | ||
"description": "The HTTP status code applicable to this problem, expressed as a string value", | ||
"format": "int32" | ||
}, | ||
"code": { | ||
"type": "string", | ||
"description": "An application-specific error code, expressed as a string value." | ||
}, | ||
"title":{ | ||
"type": "string", | ||
"description": "A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization." | ||
}, | ||
"detail": { | ||
"type": "string", | ||
"description": "A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized." | ||
}, | ||
"meta": { | ||
"type": "object", | ||
"properties": "{}" | ||
}, | ||
"description": "A human-readable error message describing what went wrong." | ||
"type": "object", | ||
"properties": { | ||
"id": { | ||
"type": "string", | ||
"description": "A unique identifier for this particular occurrence of the problem" | ||
}, | ||
"status": { | ||
"type": "integer", | ||
"description": "The HTTP status code applicable to this problem, expressed as a string value", | ||
"format": "int32" | ||
}, | ||
"code": { | ||
"type": "string", | ||
"description": "An application-specific error code, expressed as a string value." | ||
}, | ||
"title": { | ||
"type": "string", | ||
"description": "A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization." | ||
}, | ||
"detail": { | ||
"type": "string", | ||
"description": "A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized." | ||
}, | ||
"meta": { | ||
"type": "object", | ||
"properties": { | ||
|
||
} | ||
} | ||
}, | ||
"description": "A human-readable error message describing what went wrong." | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,177 @@ | ||
{ | ||
"openapi": "3.0.1", | ||
"info": { | ||
"title": "Release Candidate Messages", | ||
"description": "The specifications of messages which are ready for ICAR approval and release", | ||
"version": "1.0", | ||
"contact" : { | ||
"name": "Animal Data Exchange Working Group", | ||
"url": "https://www.icar.org/index.php/technical-bodies/working-groups/animal-data-exchange-wg/", | ||
"email": "[email protected]" | ||
} | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "http://example.com" | ||
} | ||
], | ||
"tags" : [ | ||
{ | ||
"name" : "release-candidate", | ||
"description" : "approved by the working group, waiting for a test" | ||
} | ||
], | ||
"paths": { | ||
"/locations/{location-scheme}/{location-id}/milking-visits": { | ||
"get": { | ||
"operationId" : "get-milking-visits", | ||
"summary": "Get the data for milking visits", | ||
"description": "# Purpose\nProvides data from visits of animals to a milking parlour\n", | ||
"tags": [ "release-candidate"], | ||
"parameters": [ | ||
{ | ||
"name": "location-scheme", | ||
"in": "path", | ||
"description": "The scheme id for the location identifier.", | ||
"required": true, | ||
"schema": { | ||
"type": "string", | ||
"enum": [ | ||
"nl.ubn", | ||
"de.farmid", | ||
"be.pen" | ||
] | ||
} | ||
}, | ||
{ | ||
"name": "location-id", | ||
"in": "path", | ||
"description": "The unique identifier for the location.", | ||
"required": true, | ||
"schema": { | ||
"type": "string" | ||
} | ||
}, | ||
{ | ||
"name": "start-date-time", | ||
"in": "query", | ||
"description": "The start of the date-time range for the data to get in the request.", | ||
"schema": { | ||
"type": "string", | ||
"format": "date-time" | ||
} | ||
}, | ||
{ | ||
"name": "end-date-time", | ||
"in": "query", | ||
"description": "The end of the date-time range for the data to get in the request.", | ||
"schema": { | ||
"type": "string", | ||
"format": "date-time" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"201": { | ||
"description": "Successful. The response contains the milking results for the given location", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"$ref": "#/components/schemas/icarMilkingVisitsResponse" | ||
} | ||
} | ||
} | ||
}, | ||
"default": { | ||
"description": "An error has occured while handling the request. Check the content of the message for the error details.", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"errors": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/error" | ||
} | ||
} | ||
}, | ||
"description": "A default response containing only a list of errors" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"responseErrors": { | ||
"type": "object", | ||
"properties": { | ||
"errors": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/error" | ||
} | ||
} | ||
} | ||
}, | ||
"responseMetaData": { | ||
"type": "object", | ||
"properties": { | ||
"metaData": { | ||
"$ref": "#/components/schemas/metaData" | ||
} | ||
} | ||
}, | ||
"error": { | ||
"type": "object", | ||
"properties": { | ||
"data": { | ||
"$ref": "exampleErrorResource.json" | ||
} | ||
} | ||
}, | ||
"metaData": { | ||
"required": [ | ||
"source" | ||
], | ||
"type": "object", | ||
"properties": { | ||
"data": { | ||
"$ref": "icarMetaDataResource.json" | ||
} | ||
} | ||
}, | ||
"icarMilkingVisitsResponse": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/components/schemas/icarMilkingVisitsResponseDataSources" | ||
} | ||
}, | ||
"icarMilkingVisitsResponseDataSources": { | ||
"allOf": [ | ||
{ | ||
"$ref": "#/components/schemas/responseMetaData" | ||
}, | ||
{ | ||
"$ref": "#/components/schemas/responseErrors" | ||
}, | ||
{ | ||
"$ref": "#/components/schemas/icarMilkingVisitsResponseDataSource" | ||
} | ||
] | ||
}, | ||
"icarMilkingVisitsResponseDataSource": { | ||
"type": "object", | ||
"properties": { | ||
"data": { | ||
"$ref": "icarMilkingVisitResource.json" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
|
||
"required": [ | ||
"id", | ||
"animal", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
|
||
"required": [ | ||
"id", | ||
"scheme" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,4 @@ | ||
{ | ||
"$schema": "http://json-schema.org/draft-07/schema#", | ||
|
||
"$ref": "icarIdentifierType.json", | ||
"description": "Location identifier based on a scheme and ID." | ||
} |
Oops, something went wrong.