From f764d53fb6e5392f06766ff634218877fb1fd9a2 Mon Sep 17 00:00:00 2001 From: rahul Date: Sat, 20 Apr 2024 08:47:34 +0530 Subject: [PATCH 1/2] =?UTF-8?q?=E2=9C=A8=20feat(Pointer=20Schema):=20Bette?= =?UTF-8?q?r=20validation=20errors=20for=20pointer=20schema.=20Closes=20#8?= =?UTF-8?q?7.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- schemas/pointer.schema.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/schemas/pointer.schema.yaml b/schemas/pointer.schema.yaml index ff9e2659..68c0cc1a 100644 --- a/schemas/pointer.schema.yaml +++ b/schemas/pointer.schema.yaml @@ -11,9 +11,13 @@ description: | type: object -oneOf: - - $ref: "schema:ethdebug/format/pointer/region" - - $ref: "schema:ethdebug/format/pointer/collection" +if: + properties: + location: {} +then: + $ref: "schema:ethdebug/format/pointer/region" +else: + $ref: "schema:ethdebug/format/pointer/collection" examples: - # example: a single particular storage slot From 22276918f237f33c9802cb10cf36b6aca3b6299d Mon Sep 17 00:00:00 2001 From: rahul <10168946+raxhvl@users.noreply.github.com> Date: Sun, 21 Apr 2024 11:29:36 +0530 Subject: [PATCH 2/2] location: required Co-authored-by: g. nicholas d'andrea --- schemas/pointer.schema.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/schemas/pointer.schema.yaml b/schemas/pointer.schema.yaml index 68c0cc1a..100bc11e 100644 --- a/schemas/pointer.schema.yaml +++ b/schemas/pointer.schema.yaml @@ -12,8 +12,7 @@ description: | type: object if: - properties: - location: {} + required: [location] then: $ref: "schema:ethdebug/format/pointer/region" else: