From cbaa5dfd5fe5c8acf24f5706ec36a9b56a3ecec7 Mon Sep 17 00:00:00 2001 From: Dario Nuevo Date: Mon, 13 May 2024 10:31:25 +0800 Subject: [PATCH] does this pass? --- .../Resources/config/schema/openapi.yaml | 96 ++++++++++++------- 1 file changed, 63 insertions(+), 33 deletions(-) diff --git a/src/Graviton/RestBundle/Resources/config/schema/openapi.yaml b/src/Graviton/RestBundle/Resources/config/schema/openapi.yaml index c3374cbfa..d764f5db4 100644 --- a/src/Graviton/RestBundle/Resources/config/schema/openapi.yaml +++ b/src/Graviton/RestBundle/Resources/config/schema/openapi.yaml @@ -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 + +