Mirror of https://github.com/cue-lang/cue cuelang.org
cue go

encoding/jsonschema: recognize builtin validators without call master

Currently the encoding/jsonschema generate logic does not have any way of recognizing builtin validators unless they're in a call expression. However, CUE does not require them to be called (`list.UniqueItems` is as valid as `list.UniqueItems()`) so fix that behavior. Signed-off-by: Roger Peppe <rogpeppe@gmail.com> Change-Id: I5b75ec68a36bda4d6538153c67417e0ddbc610c5 Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1232562 TryBot-Result: CUEcueckoo <cueckoo@cuelang.org> Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com> Reviewed-by: Daniel Martí <mvdan@mvdan.cc>


+24 -19
2 changed files