File tree Expand file tree Collapse file tree 1 file changed +60
-3
lines changed Expand file tree Collapse file tree 1 file changed +60
-3
lines changed Original file line number Diff line number Diff line change 65
65
}
66
66
]
67
67
},
68
+ {
69
+ "description" : " oneOf with objects and type pattern" ,
70
+ "schema" : {
71
+ "oneOf" : [
72
+ {
73
+ "type" : " object" ,
74
+ "required" : [
75
+ " type"
76
+ ],
77
+ "properties" : {
78
+ "type" : {
79
+ "enum" : [
80
+ " TYPE_1"
81
+ ]
82
+ }
83
+ }
84
+ },
85
+ {
86
+ "type" : " object" ,
87
+ "required" : [
88
+ " type"
89
+ ],
90
+ "properties" : {
91
+ "type" : {
92
+ "enum" : [
93
+ " TYPE_2"
94
+ ]
95
+ }
96
+ }
97
+ }
98
+
99
+ ]
100
+ },
101
+ "tests" : [
102
+ {
103
+ "description" : " first oneOf valid" ,
104
+ "data" : {
105
+ "type" : " TYPE_1"
106
+ },
107
+ "valid" : true
108
+ },
109
+ {
110
+ "description" : " second oneOf valid" ,
111
+ "data" : {
112
+ "type" : " TYPE_2"
113
+ },
114
+ "valid" : true
115
+ },
116
+ {
117
+ "description" : " neither oneOf valid" ,
118
+ "data" : {
119
+ "type" : " INVALID_TYPE"
120
+ },
121
+ "valid" : false
122
+ }
123
+ ]
124
+ },
68
125
{
69
126
"description" : " oneOf with objects and type pattern" ,
70
127
"schema" : {
79
136
"type" : " string"
80
137
}
81
138
}
82
- },
139
+ },
83
140
{
84
141
"type" : " object" ,
85
142
"required" : [
93
150
}
94
151
}
95
152
}
96
-
153
+
97
154
]
98
155
},
99
156
"tests" : [
127
184
"oneOf" : [
128
185
{
129
186
"type" : " object" ,
130
-
187
+
131
188
"required" : [
132
189
" type"
133
190
],
You can’t perform that action at this time.
0 commit comments