Skip to content

Commit

Permalink
Merge pull request #866 from libgraviton/feature/patch-body
Browse files Browse the repository at this point in the history
does this pass?
  • Loading branch information
narcoticfresh committed May 13, 2024
2 parents 4799fac + cbaa5df commit 7076d81
Showing 1 changed file with 63 additions and 33 deletions.
96 changes: 63 additions & 33 deletions src/Graviton/RestBundle/Resources/config/schema/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,69 @@ components:
$ref:
type: string
description: An url to point to.

GravitonPatchBody:
type: array
items:
type: object
description: A JSONPatch document as defined by RFC 6902
required:
- "op"
- "path"
properties:
op:
type: string
description: The operation to be performed
enum:
- "add"
- "remove"
- "replace"
- "move"
- "copy"
- "test"
path:
type: string
description: A JSON-Pointer
value:
oneOf:
- type: string
- type: object
additionalProperties: true
- type: boolean
- type: array
items:
type: object
additionalProperties: true
- type: number
from:
type: string
description: A string containing a JSON Pointer value.
oneOf:
- $ref: '#/components/schemas/JSONPatchRequestAddReplaceTest'
- $ref: '#/components/schemas/JSONPatchRequestRemove'
- $ref: '#/components/schemas/JSONPatchRequestMoveCopy'

JSONPatchRequestAddReplaceTest:
type: object
additionalProperties: false
required:
- value
- op
- path
properties:
path:
description: A JSON Pointer path.
type: string
value:
description: The value to add, replace or test.
op:
description: The operation to perform.
type: string
enum:
- add
- replace
- test
JSONPatchRequestRemove:
type: object
additionalProperties: false
required:
- op
- path
properties:
path:
description: A JSON Pointer path.
type: string
op:
description: The operation to perform.
type: string
enum:
- remove
JSONPatchRequestMoveCopy:
type: object
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
from:
description: A JSON Pointer path.
type: string


0 comments on commit 7076d81

Please sign in to comment.