From b26adc75f9e5e31789ab4dd6855693bc0249e4aa Mon Sep 17 00:00:00 2001 From: Andrei Ivanov <9808017@gmail.com> Date: Wed, 15 Jun 2022 15:22:37 +0300 Subject: [PATCH 1/3] SERV-104 Update dependencies --- go.mod | 4 ++-- go.sum | 4 ++++ .../jschema/internal/checker/check_schema.go | 15 +-------------- .../notations/jschema/internal/loader/unnamed.go | 11 +++++++++++ .../notations/jschema/jschema.go | 1 + vendor/modules.txt | 4 ++-- 6 files changed, 21 insertions(+), 18 deletions(-) create mode 100644 vendor/github.com/jsightapi/jsight-schema-go-library/notations/jschema/internal/loader/unnamed.go diff --git a/go.mod b/go.mod index bc7dec2..c7e84a3 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,8 @@ go 1.18 require ( github.com/jsightapi/datagram v0.0.0-20220518133429-389893b2d914 - github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220609105634-66dacc8fb482 - github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220608142925-ffc7adb01d28 + github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220615115655-75385d7e0710 + github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220610155950-d0680a0b271b github.com/stretchr/testify v1.7.0 ) diff --git a/go.sum b/go.sum index b3dbe1f..ed93f9e 100644 --- a/go.sum +++ b/go.sum @@ -10,10 +10,14 @@ github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220608143202-5aaf13dd4c61 github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220608143202-5aaf13dd4c61/go.mod h1:VJX6QuLo3OkzXJm9Sp6Mlnp87uWpubd7uxu6/CWZBtU= github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220609105634-66dacc8fb482 h1:Yoi+kYl+9irvtBLOI8iT3GJHaYTIM7fENYldfsh3tO8= github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220609105634-66dacc8fb482/go.mod h1:VJX6QuLo3OkzXJm9Sp6Mlnp87uWpubd7uxu6/CWZBtU= +github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220615115655-75385d7e0710 h1:xVNoi5W6paluOO5w9rr/tRTUkrBwJJ+lehDefqW3wBs= +github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220615115655-75385d7e0710/go.mod h1:8UjFwluFsKBmT2NyxDhA/iwm4++QwrG3Bs31s122m8g= github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220518141303-90f81f34b796 h1:w7DcC0xJFlot4sCOs5im9PXXVPVmk+liAtp8J/f4Z1U= github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220518141303-90f81f34b796/go.mod h1:OO00XD+yMOCPSWZy3EpsknpHKL9U67CeAuFwTThJk4w= github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220608142925-ffc7adb01d28 h1:s5sh4VErEhfGiNbgedtsAqcYvLQFbL3PgxRqPSJMXCw= github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220608142925-ffc7adb01d28/go.mod h1:OO00XD+yMOCPSWZy3EpsknpHKL9U67CeAuFwTThJk4w= +github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220610155950-d0680a0b271b h1:9b0+ksbP39Zp7lN8Mv/MKrzB4NwyuzrecfEhsZmV4+o= +github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220610155950-d0680a0b271b/go.mod h1:OO00XD+yMOCPSWZy3EpsknpHKL9U67CeAuFwTThJk4w= github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb h1:w1g9wNDIE/pHSTmAaUhv4TZQuPBS6GV3mMz5hkgziIU= github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/vendor/github.com/jsightapi/jsight-schema-go-library/notations/jschema/internal/checker/check_schema.go b/vendor/github.com/jsightapi/jsight-schema-go-library/notations/jschema/internal/checker/check_schema.go index 001b849..35d94de 100644 --- a/vendor/github.com/jsightapi/jsight-schema-go-library/notations/jschema/internal/checker/check_schema.go +++ b/vendor/github.com/jsightapi/jsight-schema-go-library/notations/jschema/internal/checker/check_schema.go @@ -54,20 +54,7 @@ func (c *checkSchema) checkType(name string, typ schema.Type, ss map[string]sche panic(r) }() - c.checkNode(typ.Schema().RootNode(), mergeTypes(ss, typ.Schema().TypesList())) -} - -func mergeTypes(tt1, tt2 map[string]schema.Type) map[string]schema.Type { - if len(tt1) == 0 { - return tt2 - } - if len(tt2) == 0 { - return tt1 - } - for k, v := range tt1 { - tt2[k] = v - } - return tt2 + c.checkNode(typ.Schema().RootNode(), ss) } func (c *checkSchema) checkerList(node schema.Node, ss map[string]schema.Type) []nodeChecker { diff --git a/vendor/github.com/jsightapi/jsight-schema-go-library/notations/jschema/internal/loader/unnamed.go b/vendor/github.com/jsightapi/jsight-schema-go-library/notations/jschema/internal/loader/unnamed.go new file mode 100644 index 0000000..8a718cc --- /dev/null +++ b/vendor/github.com/jsightapi/jsight-schema-go-library/notations/jschema/internal/loader/unnamed.go @@ -0,0 +1,11 @@ +package loader + +import "github.com/jsightapi/jsight-schema-go-library/notations/jschema/internal/schema" + +func AddUnnamedTypes(rootSchema *schema.Schema) { + for _, typ := range rootSchema.TypesList() { + for unnamed, unnamedTyp := range typ.Schema().TypesList() { + rootSchema.AddType(unnamed, unnamedTyp) + } + } +} diff --git a/vendor/github.com/jsightapi/jsight-schema-go-library/notations/jschema/jschema.go b/vendor/github.com/jsightapi/jsight-schema-go-library/notations/jschema/jschema.go index 63ca443..36e2f31 100644 --- a/vendor/github.com/jsightapi/jsight-schema-go-library/notations/jschema/jschema.go +++ b/vendor/github.com/jsightapi/jsight-schema-go-library/notations/jschema/jschema.go @@ -411,6 +411,7 @@ func (s *Schema) compile() error { return } loader.CompileAllOf(s.inner) + loader.AddUnnamedTypes(s.inner) checker.CheckRootSchema(s.inner) }) return s.compileErr diff --git a/vendor/modules.txt b/vendor/modules.txt index 7acf3ea..c6cbc7c 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -4,7 +4,7 @@ github.com/davecgh/go-spew/spew # github.com/jsightapi/datagram v0.0.0-20220518133429-389893b2d914 ## explicit; go 1.18 github.com/jsightapi/datagram -# github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220609105634-66dacc8fb482 +# github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220615115655-75385d7e0710 ## explicit; go 1.18 github.com/jsightapi/jsight-api-go-library/catalog github.com/jsightapi/jsight-api-go-library/core @@ -13,7 +13,7 @@ github.com/jsightapi/jsight-api-go-library/jerr github.com/jsightapi/jsight-api-go-library/kit github.com/jsightapi/jsight-api-go-library/notation github.com/jsightapi/jsight-api-go-library/scanner -# github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220608142925-ffc7adb01d28 +# github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220610155950-d0680a0b271b ## explicit; go 1.18 github.com/jsightapi/jsight-schema-go-library github.com/jsightapi/jsight-schema-go-library/bytes From a0fa30e01178a50902572d4546026ea92cb98159 Mon Sep 17 00:00:00 2001 From: Andrei Ivanov <9808017@gmail.com> Date: Wed, 15 Jun 2022 16:19:13 +0300 Subject: [PATCH 2/3] RC 4.1 --- go.mod | 4 ++-- go.sum | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/go.mod b/go.mod index c7e84a3..3ab303d 100644 --- a/go.mod +++ b/go.mod @@ -4,8 +4,8 @@ go 1.18 require ( github.com/jsightapi/datagram v0.0.0-20220518133429-389893b2d914 - github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220615115655-75385d7e0710 - github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220610155950-d0680a0b271b + github.com/jsightapi/jsight-api-go-library v1.0.0 + github.com/jsightapi/jsight-schema-go-library v1.0.0 github.com/stretchr/testify v1.7.0 ) diff --git a/go.sum b/go.sum index ed93f9e..58551a1 100644 --- a/go.sum +++ b/go.sum @@ -12,12 +12,15 @@ github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220609105634-66dacc8fb482 github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220609105634-66dacc8fb482/go.mod h1:VJX6QuLo3OkzXJm9Sp6Mlnp87uWpubd7uxu6/CWZBtU= github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220615115655-75385d7e0710 h1:xVNoi5W6paluOO5w9rr/tRTUkrBwJJ+lehDefqW3wBs= github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220615115655-75385d7e0710/go.mod h1:8UjFwluFsKBmT2NyxDhA/iwm4++QwrG3Bs31s122m8g= +github.com/jsightapi/jsight-api-go-library v1.0.0 h1:9rnhKHBS7dCogyxY3SR1NnghdA5Z2G4+LSMsl7DmK48= +github.com/jsightapi/jsight-api-go-library v1.0.0/go.mod h1:Pae4M/sz5vGK1+gxpTW9XTk8KHmVXbZKU5nZmJfLB1s= github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220518141303-90f81f34b796 h1:w7DcC0xJFlot4sCOs5im9PXXVPVmk+liAtp8J/f4Z1U= github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220518141303-90f81f34b796/go.mod h1:OO00XD+yMOCPSWZy3EpsknpHKL9U67CeAuFwTThJk4w= github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220608142925-ffc7adb01d28 h1:s5sh4VErEhfGiNbgedtsAqcYvLQFbL3PgxRqPSJMXCw= github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220608142925-ffc7adb01d28/go.mod h1:OO00XD+yMOCPSWZy3EpsknpHKL9U67CeAuFwTThJk4w= github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220610155950-d0680a0b271b h1:9b0+ksbP39Zp7lN8Mv/MKrzB4NwyuzrecfEhsZmV4+o= github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220610155950-d0680a0b271b/go.mod h1:OO00XD+yMOCPSWZy3EpsknpHKL9U67CeAuFwTThJk4w= +github.com/jsightapi/jsight-schema-go-library v1.0.0/go.mod h1:OO00XD+yMOCPSWZy3EpsknpHKL9U67CeAuFwTThJk4w= github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb h1:w1g9wNDIE/pHSTmAaUhv4TZQuPBS6GV3mMz5hkgziIU= github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= From cba26abeed22ca61f04f26352e464da1cbc3f600 Mon Sep 17 00:00:00 2001 From: Andrei Ivanov <9808017@gmail.com> Date: Wed, 15 Jun 2022 16:29:19 +0300 Subject: [PATCH 3/3] RC 4.1 --- go.sum | 1 + vendor/modules.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/go.sum b/go.sum index 58551a1..4c0bc8b 100644 --- a/go.sum +++ b/go.sum @@ -20,6 +20,7 @@ github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220608142925-ffc7adb01d github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220608142925-ffc7adb01d28/go.mod h1:OO00XD+yMOCPSWZy3EpsknpHKL9U67CeAuFwTThJk4w= github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220610155950-d0680a0b271b h1:9b0+ksbP39Zp7lN8Mv/MKrzB4NwyuzrecfEhsZmV4+o= github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220610155950-d0680a0b271b/go.mod h1:OO00XD+yMOCPSWZy3EpsknpHKL9U67CeAuFwTThJk4w= +github.com/jsightapi/jsight-schema-go-library v1.0.0 h1:LgvwT61R3oqJ4TGyz7+AApvFIJaMeMFrBbLKsPNuPPw= github.com/jsightapi/jsight-schema-go-library v1.0.0/go.mod h1:OO00XD+yMOCPSWZy3EpsknpHKL9U67CeAuFwTThJk4w= github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb h1:w1g9wNDIE/pHSTmAaUhv4TZQuPBS6GV3mMz5hkgziIU= github.com/lucasjones/reggen v0.0.0-20200904144131-37ba4fa293bb/go.mod h1:5ELEyG+X8f+meRWHuqUOewBOhvHkl7M76pdGEansxW4= diff --git a/vendor/modules.txt b/vendor/modules.txt index c6cbc7c..4b34f47 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -4,7 +4,7 @@ github.com/davecgh/go-spew/spew # github.com/jsightapi/datagram v0.0.0-20220518133429-389893b2d914 ## explicit; go 1.18 github.com/jsightapi/datagram -# github.com/jsightapi/jsight-api-go-library v0.3.1-0.20220615115655-75385d7e0710 +# github.com/jsightapi/jsight-api-go-library v1.0.0 ## explicit; go 1.18 github.com/jsightapi/jsight-api-go-library/catalog github.com/jsightapi/jsight-api-go-library/core @@ -13,7 +13,7 @@ github.com/jsightapi/jsight-api-go-library/jerr github.com/jsightapi/jsight-api-go-library/kit github.com/jsightapi/jsight-api-go-library/notation github.com/jsightapi/jsight-api-go-library/scanner -# github.com/jsightapi/jsight-schema-go-library v0.3.1-0.20220610155950-d0680a0b271b +# github.com/jsightapi/jsight-schema-go-library v1.0.0 ## explicit; go 1.18 github.com/jsightapi/jsight-schema-go-library github.com/jsightapi/jsight-schema-go-library/bytes