Skip to content

Instantly share code, notes, and snippets.

@theletterf
Created February 3, 2021 09:59
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save theletterf/cbc36c937bf1da986b0f19ec4159622d to your computer and use it in GitHub Desktop.
# Adapted from http://json.schemastore.org/json-patch
components:
schemas:
patchRequest:
type: array
items:
oneOf:
- additionalProperties: false
required:
- value
- op
- path
properties:
path:
description: A JSON Pointer path.
type: string
op:
description: The operation to perform.
type: string
enum:
- add
- replace
- test
value:
description: The value to add, replace or test.
- additionalProperties: false
required:
- op
- path
properties:
path:
description: A JSON Pointer path.
type: string
op:
description: The operation to perform.
type: string
enum:
- remove
- additionalProperties: false
required:
- from
- op
- path
properties:
path:
description: A JSON Pointer path.
type: string
op:
description: The operation to perform.
type: string
enum:
- move
- copy
@thecolour
Copy link

In the move/copy operation definition, there is a required field "from" which is not defined as a property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment