AVRO schema for JSON Patch document

Viewed 6

the JSON Patch document defined in rfc6902 has a field value that can basically be of any type.

 [
     { "op": "test", "path": "/a/b/c", "value": "foo" },
     { "op": "remove", "path": "/a/b/c" },
     { "op": "add", "path": "/a/b/c", "value": [ "foo", "bar" ] },
     { "op": "replace", "path": "/a/b/c", "value": 42 },
     { "op": "add", "path": "/biscuits/1", "value": { "name": "Ginger Nut" } }
]
        value:
          description: The value to be used within the operations.
          nullable: true
          anyOf:
            - type: string
            - type: number
            - type: integer
            - type: boolean
            - type: array
              items: {}
            - type: object

How could such a value field be defined in an avro schema

0 Answers
Related