Skip to content

JSON Patch Schema #13

Open
Open

Description

@tomalec

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
]

Activity

  1. gregsdennis commented on Feb 27, 2019

    @gregsdennis
  2. mitar commented on Oct 12, 2019

    @mitar

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions