11 "title": "JSON schema for JSONPatch files",
12 "$schema": "http://json-schema.org/draft-04/schema#",
13 "type": "array",
14
15 "items": {
16 "oneOf": [
17 {
18 "additionalProperties": false,
19 "required": [ "value", "op", "path"],
20 "properties": {
21 "path" : { "$ref": "#/definitions/path" },
22 "op": {
23 "description": "The operation to perform.",
24 "type": "string",
25 "enum": [ "add", "replace", "test" ]
26 },
27 "value": {
28 "description": "The value to add, replace or test."
29 }
30 }
31 },
32 {
33 "additionalProperties": false,
34 "required": [ "op", "path"],
35 "properties": {
36 "path" : { "$ref": "#/definitions/path" },
37 "op": {
38 "description": "The operation to perform.",
39 "type": "string",
40 "enum": [ "remove" ]
41 }
42 }
43 },
44 {
45 "additionalProperties": false,
46 "required": [ "from", "op", "path" ],
47 "properties": {
48 "path" : { "$ref": "#/definitions/path" },
49 "op": {
50 "description": "The operation to perform.",
51 "type": "string",
52 "enum": [ "move", "copy" ]
53 },
54 "from": {
55 "$ref": "#/definitions/path",
56 "description": "A JSON Pointer path pointing to the location to move/copy from."
57 }
58 }
59 }
60 ]
61 },
62 "definitions": {
63 "path": {
64 "description": "A JSON Pointer path.",
65 "type": "string"
66 }
67 }
68})patch"_json;