From ff517f9e7225759d74ba8807cced4df27519cbcf Mon Sep 17 00:00:00 2001 From: tdakkota Date: Mon, 31 Jul 2023 03:55:09 +0300 Subject: [PATCH] fix(gen): match `discriminator` mapping by ref --- gen/schema_gen_sum.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gen/schema_gen_sum.go b/gen/schema_gen_sum.go index 1f128b785..94272726e 100644 --- a/gen/schema_gen_sum.go +++ b/gen/schema_gen_sum.go @@ -275,7 +275,7 @@ func (g *schemaGen) oneOf(name string, schema *jsonschema.Schema, side bool) (*i vschema = schema.OneOf[i] } - if vschema == v { + if vschema.Ref == v.Ref { found = true sum.SumSpec.Mapping = append(sum.SumSpec.Mapping, ir.SumSpecMap{ Key: k,