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
encoding/jsonschema: pass comments to DefineSchema
This is a retry of https://cuelang.org/cl/1209259,
which got reverted in https://cuelang.org/cl/1209359 to un-break Unity
while we figured out why we couldn't get it to work as expected.
Currently if a schema has a doc comment, that comment is lost when it's
passed to DefineSchema, so add an argument that lets the callback see
it. This is a breaking API change, but this API is very deliberately
marked as experimental so that shouldn't matter.
An alternative that would not involve breaking the API might be to add
the comment to the Expr, but that proves quite awkward to use because in
practice callers tend to be defining a field at a path so they'd have to
jump through the hoop of extracting (and removing) the comment from the
expression only to add it back into the outer struct literal.
Signed-off-by: Roger Peppe <[email protected]>
TryBot-Result: CUEcueckoo <[email protected]>
Reviewed-by: Daniel Martí <[email protected]>
Change-Id: I45564d3f0f7ba34f435a8adb47f341dc71f187ac
Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1209367
0 commit comments