Skip to content

Commit

Permalink
encoding/jsonschema: add test case for issue 3586
Browse files Browse the repository at this point in the history
The fix will come in the next CL.

For #3586.

Signed-off-by: Roger Peppe <[email protected]>
Change-Id: Ie849759f8ef7c51021645db980a0dc07d54534ff
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1204510
Unity-Result: CUE porcuepine <[email protected]>
Reviewed-by: Daniel Martí <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
  • Loading branch information
rogpeppe committed Nov 25, 2024
1 parent 0ad2119 commit 15f57d8
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Issue 3586, first test case.
TODO fix this

-- schema.json --
{
"oneOf": [
true,
true
]
}
-- out/decode/extract --
_
-- test/string.json --
"something"
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
Issue 3586, second test case.
TODO fix this

-- schema.json --
{
"oneOf": [
{
"type": "string"
},
{
"type": [
"string",
"number"
]
}
]
}
-- out/decode/extract --
number | string
-- test/string.json --
"something"

0 comments on commit 15f57d8

Please sign in to comment.