Change-Id: I57cd3d5a7f9a6ddb6ce479732b24a36cbb0a62c9changes/05/18205/2
parent
d8d1ea8221
commit
b0c3b25897
@ -0,0 +1,64 @@
|
||||
{
|
||||
"title": "JSON schema for JSONPatch files",
|
||||
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||
|
||||
"type": "array",
|
||||
|
||||
"items": {
|
||||
"$ref": "#/definitions/operation"
|
||||
},
|
||||
|
||||
"definitions": {
|
||||
"operation": {
|
||||
"type": "object",
|
||||
"required": [ "op", "path" ],
|
||||
"allOf": [ { "$ref": "#/definitions/path" } ],
|
||||
"oneOf": [
|
||||
{
|
||||
"required": [ "value" ],
|
||||
"properties": {
|
||||
"op": {
|
||||
"description": "The operation to perform.",
|
||||
"type": "string",
|
||||
"enum": [ "add", "replace", "test" ]
|
||||
},
|
||||
"value": {
|
||||
"description": "The value to add, replace or test."
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"properties": {
|
||||
"op": {
|
||||
"description": "The operation to perform.",
|
||||
"type": "string",
|
||||
"enum": [ "remove" ]
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"required": [ "from" ],
|
||||
"properties": {
|
||||
"op": {
|
||||
"description": "The operation to perform.",
|
||||
"type": "string",
|
||||
"enum": [ "move", "copy" ]
|
||||
},
|
||||
"from": {
|
||||
"description": "A JSON Pointer path pointing to the location to move/copy from.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
"path": {
|
||||
"properties": {
|
||||
"path": {
|
||||
"description": "A JSON Pointer path.",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue