Skip to content

Commit

Permalink
fix(gen): match discriminator mapping by ref
Browse files Browse the repository at this point in the history
  • Loading branch information
tdakkota committed Jul 31, 2023
1 parent eb1bcf6 commit ff517f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gen/schema_gen_sum.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit ff517f9

Please sign in to comment.