Commit 7e3672c
committed
validate: unions with leafrefs may return misleading error codes
When a leafref is not found in a union, it should not return an error
indicating the value for the leafref wouldn't match the restrictions
for a target but instead just say the leafref target wasn't found.
The only data that should indicate the error message for data type
restrictions is data associated with the target itself, not leafrefs.
Signed-off-by: Brad House <[email protected]>1 parent 529a594 commit 7e3672c
2 files changed
+37
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
153 | 178 | | |
154 | 179 | | |
155 | 180 | | |
| |||
190 | 215 | | |
191 | 216 | | |
192 | 217 | | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
193 | 221 | | |
194 | 222 | | |
195 | 223 | | |
| |||
228 | 256 | | |
229 | 257 | | |
230 | 258 | | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
231 | 264 | | |
232 | 265 | | |
233 | 266 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | | - | |
| 108 | + | |
| 109 | + | |
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
| |||
295 | 295 | | |
296 | 296 | | |
297 | 297 | | |
298 | | - | |
| 298 | + | |
| 299 | + | |
299 | 300 | | |
300 | 301 | | |
301 | 302 | | |
| |||
0 commit comments