Skip to content

Commit

Permalink
Merge pull request #992 from tdakkota/fix/match-discriminator-variants
Browse files Browse the repository at this point in the history
fix(gen): match `discriminator` mapping by ref
  • Loading branch information
ernado authored Jul 31, 2023
2 parents eb1bcf6 + ff517f9 commit aaea172
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 aaea172

Please sign in to comment.