json-patch / json-patch2

A possibile revision to the JSON-Patch format
44 stars 0 forks source link

JSON Patch Schema #13

Open tomalec opened 9 years ago

tomalec commented 9 years ago

There is JSON Schema:

  • describes your existing data format
  • clear, human- and machine-readable documentation
  • complete structural validation, useful for
    • automated testing
    • validating client-submitted data

In growing number of JSON Patch applications, we already faced problem with operations that are not permited for specific use case, operations that should be omitted, etc.

Why don't we create a JSON Patch Schema, that will

For example something like

[
  {op: "ignore", scope: "/name/space", path: "hiddenProperty"}, //will ignore all operations for `obj.name.space.hiddenProperty`
  {op: "error", scope: "", path: "_version#", ops: ["remove"]}, //will trigger an error in case of `{op: "remove", path: "/_ver#s"}`
  {op: "ignore", scope: "", path: /reg.egxp/, recursively: true} // will ignore any operation which path matches regexp, and check all objects recursively
]
gregsdennis commented 5 years ago

There is one: http://json.schemastore.org/json-patch

mitar commented 4 years ago

I do not understand at all what this issue is about.