You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I expected to see some CUE output that declared and/or constrained the field to be {}. Ideally with a close() around it, due to the additionalProperties: false, but I'm aware that question is tracked in #750.
Removing the additionalProperties: false field stops the panic, but results in an output which is literally just ..., which IMHO is precisely the /opposite/ of the output that I believe the JSONSchema is representing.
Issue #3354 demonstrates that aliases are used when they're
not actually needed. When investigating the fix for #2287, I
realised where the problem might be, and this is the result.
The problem was that all the self-references need to reference
the same AST node, but they were not doing so. Fix that by
creating the struct node to be embedded when we know that
we need a self-reference. We can also use the presence of
that node to signal that a self-reference is needed, removing the
need for `hasSelfReference`.
Fixes#3354
Signed-off-by: Roger Peppe <[email protected]>
Change-Id: Ie886b5819c612cbd64abca62d3231aedd530e2bf
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1199626
Reviewed-by: Daniel Martí <[email protected]>
Unity-Result: CUE porcuepine <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
Yes (0.4.3)
What did you do?
I imported a JSONSchema file that contains a schema constraining an object to be empty. CUE panicked:
What did you expect to see?
I expected to see some CUE output that declared and/or constrained the field to be
{}
. Ideally with aclose()
around it, due to theadditionalProperties: false
, but I'm aware that question is tracked in #750.Removing the
additionalProperties: false
field stops the panic, but results in an output which is literally just...
, which IMHO is precisely the /opposite/ of the output that I believe the JSONSchema is representing.What did you see instead?
The text was updated successfully, but these errors were encountered: