...

Text file src/cuelang.org/go/encoding/jsonschema/testdata/refroot2.txtar

Documentation: cuelang.org/go/encoding/jsonschema/testdata

     1// This test tests the conversion and ordering of $defs.
     2
     3-- definition.json --
     4{
     5  "$schema": "http://json-schema.org/draft-07/schema#",
     6
     7  "properties": {
     8    "value": {},
     9    "next": { "$ref": "#" }
    10  }
    11}
    12
    13-- out.cue --
    14_schema
    15_schema: {
    16	@jsonschema(schema="http://json-schema.org/draft-07/schema#")
    17	null | bool | number | string | [...] | {
    18		value?: _
    19		next?:  _schema_1
    20		...
    21	}
    22}
    23
    24let _schema_1 = _schema

View as plain text