Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
encoding/jsonschema: add test cases for nested values
The current `state.value` logic looks wrong: it sets the `allowedTypes` value recursively when it encounters a structured value such as an array or an object even though only the top level of the value should influence the allowed types. As it happens, the fact that `usedTypes` is set at the same time hides this error, and it _seems_ that no other test fails as a result. However, upcoming changes will reveal this shortcoming, so we add a couple of test cases to show the fix. Signed-off-by: Roger Peppe <[email protected]> Change-Id: I85173a321d3578094fc96f5b56ed6269c496c18c Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1199399 Unity-Result: CUE porcuepine <[email protected]> Reviewed-by: Daniel Martí <[email protected]> TryBot-Result: CUEcueckoo <[email protected]>
- Loading branch information