From be9593b74e53a78ab690cef076dc159f277c3eda Mon Sep 17 00:00:00 2001 From: Mykhailo Sizov Date: Wed, 10 May 2023 10:13:48 +0300 Subject: [PATCH] feat: support for optional field in presexch Signed-off-by: Mykhailo Sizov --- pkg/doc/presexch/schema.go | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/pkg/doc/presexch/schema.go b/pkg/doc/presexch/schema.go index bb262f619..9841ba31a 100644 --- a/pkg/doc/presexch/schema.go +++ b/pkg/doc/presexch/schema.go @@ -89,7 +89,24 @@ const DefinitionJSONSchemaV1 = ` "not":{ "type":"object", "minProperties":1 - } + }, + "contains":{ + "type":"object", + "properties":{ + "type":{ + "type":"string" + }, + "pattern":{ + "type":"string" + }, + "const":{ + "type":"string" + } + }, + "required":[ + "type" + ] + } }, "required":[ "type" @@ -390,6 +407,9 @@ const DefinitionJSONSchemaV1 = ` }, "filter":{ "$ref":"#/definitions/filter" + }, + "optional":{ + "type":"boolean" } }, "required":[