cuelang.org/go@v0.13.0/encoding/jsonschema/testdata/txtar/refroot.txtar (about)

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