Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON Patch Schema #13

Open
tomalec opened this issue Jun 30, 2015 · 2 comments
Open

JSON Patch Schema #13

tomalec opened this issue Jun 30, 2015 · 2 comments

Comments

@tomalec
Copy link

tomalec commented Jun 30, 2015

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

  • describe your operation permissions
  • become clear, human- and machine-readable documentation
  • complete structural validation, useful for
    • automated testing
    • validating client-submitted data

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
Copy link

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

@mitar
Copy link

mitar commented Oct 12, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants