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
Does this issue reproduce with the latest stable release?
Yes (v0.10.0)
What did you do?
exec cue def -l '#top:' schema.json
stdout 'description of a field'
stdout 'overall description'
stdout 'description of foo'
-- schema.json --
{
"$schema": "https://json-schema.org/draft/2019-09/schema",
"$defs": {
"foo": {
"description": "description of foo",
"properties": {
"a": {
"description": "description of a field",
"type": "number"
}
}
}
},
"description": "overall description",
"$ref": "#/$defs/foo"
}
What did you expect to see?
A passing test. All the descriptions should be present as doc comments in the result.
What did you see instead?
> exec cue def -l '#top:' schema.json
[stdout]
#top: {
// overall description
@jsonschema(schema="https://json-schema.org/draft/2019-09/schema")
#foo
#foo: null | bool | number | string | [...] | {
// description of a field
a?: number
...
}
}
> stdout 'description of a field'
> stdout 'overall description'
> stdout 'description of foo'
FAIL: y.txtar:4: no match for `description of foo` found in stdout
The description of the foo definition isn't present, and the "overall description" text has moved into an inner comment on #top, where it will then be lost when computed with (e.g. compiling to a cue.Value) because it doesn't attach to any particular field.
The text was updated successfully, but these errors were encountered:
What version of CUE are you using (
cue version
)?Does this issue reproduce with the latest stable release?
Yes (v0.10.0)
What did you do?
What did you expect to see?
A passing test. All the descriptions should be present as doc comments in the result.
What did you see instead?
The description of the
foo
definition isn't present, and the "overall description" text has moved into an inner comment on#top
, where it will then be lost when computed with (e.g. compiling to acue.Value
) because it doesn't attach to any particular field.The text was updated successfully, but these errors were encountered: