|
|
|
@ -5493,10 +5493,13 @@ func TestOneOfValidation(t *testing.T) { |
|
|
|
|
}{ |
|
|
|
|
{f: "red", t: "oneof=red green"}, |
|
|
|
|
{f: "green", t: "oneof=red green"}, |
|
|
|
|
{f: []string{"red", "green"}, t: "oneof=red green"}, |
|
|
|
|
{f: "red green", t: "oneof='red green' blue"}, |
|
|
|
|
{f: "blue", t: "oneof='red green' blue"}, |
|
|
|
|
{f: []string{"red green", "blue"}, t: "oneof='red green' blue"}, |
|
|
|
|
{f: 5, t: "oneof=5 6"}, |
|
|
|
|
{f: 6, t: "oneof=5 6"}, |
|
|
|
|
{f: []int{6, 5}, t: "oneof=5 6"}, |
|
|
|
|
{f: int8(6), t: "oneof=5 6"}, |
|
|
|
|
{f: int16(6), t: "oneof=5 6"}, |
|
|
|
|
{f: int32(6), t: "oneof=5 6"}, |
|
|
|
@ -5521,9 +5524,11 @@ func TestOneOfValidation(t *testing.T) { |
|
|
|
|
{f: "", t: "oneof=red green"}, |
|
|
|
|
{f: "yellow", t: "oneof=red green"}, |
|
|
|
|
{f: "green", t: "oneof='red green' blue"}, |
|
|
|
|
{f: []string{"green", "blue"}, t: "oneof='red green' blue"}, |
|
|
|
|
{f: 5, t: "oneof=red green"}, |
|
|
|
|
{f: 6, t: "oneof=red green"}, |
|
|
|
|
{f: 6, t: "oneof=7"}, |
|
|
|
|
{f: []int{6, 7}, t: "oneof=7"}, |
|
|
|
|
{f: uint(6), t: "oneof=7"}, |
|
|
|
|
{f: int8(5), t: "oneof=red green"}, |
|
|
|
|
{f: int16(5), t: "oneof=red green"}, |
|
|
|
@ -12285,4 +12290,4 @@ func TestMultiOrOperatorGroup(t *testing.T) { |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|