Skip to content

Commit

Permalink
Merge pull request #232 from cookeac/cookeac-master
Browse files Browse the repository at this point in the history
Example Health URL scheme with GET, single POST and batch POSTs - merging after approval by two reviewers
  • Loading branch information
cookeac authored Aug 18, 2021
2 parents 7e9917f + 6650449 commit 05a9088
Show file tree
Hide file tree
Showing 4 changed files with 724 additions and 0 deletions.
11 changes: 11 additions & 0 deletions enums/icarBatchResultSeverityType.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"description": "Severity code to distinguish warnings and errors.",

"type": "string",

"enum": [
"Information",
"Warning",
"Error"
]
}
22 changes: 22 additions & 0 deletions resources/icarBatchResult.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"description": "Returned by a batch POST event to return identity (meta), errors, and warnings for a resource.",
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier created in the system for this event. SHOULD be a UUID."
},
"meta": {
"$ref": "../types/icarMetaDataType.json",
"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,
"items": {
"$ref": "../resources/icarResponseMessageResource.json"
}
}
}
}
35 changes: 35 additions & 0 deletions resources/icarResponseMessageResource.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
"description": "An RFC7807 compliant problem response for JSON APIs.",

"type": "object",

"properties": {
"type": {
"type": "string",
"description": "Machine readable URI or code that defines the type of error or warning."
},
"severity": {
"$ref": "../enums/icarBatchResultSeverityType.json",
"description": "Distinguish errors, warnings, and informational messages."
},
"status": {
"type": "integer",
"description": "The HTTP status code applicable to this problem.",
"format": "int32",
"nullable": true
},
"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."
},
"instance": {
"type": "string",
"description": "A URI reference or internal JSON document reference to the specific data item that caused the problem.",
"nullable": true
}
}
}
Loading

0 comments on commit 05a9088

Please sign in to comment.