@@ -846,9 +846,9 @@ func (schema *Schema) visitSetOperations(settings *schemaValidationSettings, val
846
846
if discriminatorVal , okcheck := valuemap [pn ]; okcheck {
847
847
if len (schema .Discriminator .Mapping ) > 0 {
848
848
if mapref , okcheck := schema .Discriminator .Mapping [discriminatorVal .(string )]; okcheck {
849
- for _ , item := range v {
850
- if item .Ref == mapref {
851
- return item .Value .visitJSON (settings , value )
849
+ for _ , oneof := range v {
850
+ if oneof .Ref == mapref {
851
+ return oneof .Value .visitJSON (settings , value )
852
852
}
853
853
}
854
854
}
@@ -857,9 +857,9 @@ func (schema *Schema) visitSetOperations(settings *schemaValidationSettings, val
857
857
``It is implied, that the property to which discriminator refers, contains the
858
858
name of the target schema. In the example above, the objectType property should
859
859
contain either simpleObject, or complexObject string.''*/
860
- for _ , oneof := range schema .OneOf {
861
- if strings .HasSuffix (oneof .Ref , discriminatorVal .(string )) {
862
- return oneof .Value .visitJSON (settings , value )
860
+ for _ , v := range schema .OneOf {
861
+ if strings .HasSuffix (v .Ref , discriminatorVal .(string )) {
862
+ return v .Value .visitJSON (settings , value )
863
863
}
864
864
}
865
865
}
0 commit comments