Skip to content

Instantly share code, notes, and snippets.

@bduisenov
Created October 13, 2017 13:53
Show Gist options
  • Save bduisenov/855981820a75f82d60856b04186e9538 to your computer and use it in GitHub Desktop.
Save bduisenov/855981820a75f82d60856b04186e9538 to your computer and use it in GitHub Desktop.
{
"id": "https://tools.ietf.org/rfc/rfc7807.txt",
"$schema": "http://json-schema.org/draft-06/schema#",
"description": "schema for a rfc7807",
"definitions": {
"validation": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"description": "A URI reference [RFC3986] that identifies the problem type.",
"type": "string",
"format": "uri"
},
"title": {
"description": "A short, human-readable summary of the problem type.",
"type": "string"
},
"status": {
"description": "The HTTP status code ([RFC7231], Section 6) generated by the origin server for this occurrence of the problem.",
"type": "number"
},
"instance": {
"description": "A URI reference that identifies the specific occurrence of the problem.",
"type": "string"
},
"detail": {
"description": "A human-readable explanation specific to this occurrence of the problem.",
"type": "string"
},
"debugging": {
"description": "Debugging information for DEV and QA environments.",
"type": "string"
},
"invalid-params": {
"description": "An array of validation errors.",
"type": "array",
"items": {
"description": "The validation error descriptor.",
"type": "object",
"required": [
"path",
"name",
"reason"
],
"properties": {
"path": {
"type": "string"
},
"name": {
"type": "string"
},
"reason": {
"type": "string"
}
},
"additionalProperties": false
},
"uniqueItems": true
}
},
"additionalProperties": false
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment