github.com/joomcode/cue@v0.4.4-0.20221111115225-539fe3512047/encoding/jsonschema/testdata/refroot.txtar (about)

     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    "$id": "http://github.com/joomcode/cue/encoding/openapi/testdata/order.json",
     8  
     9    "properties": {
    10      "value": {},
    11      "next": { "$ref": "#" }
    12    }
    13  }
    14  
    15  -- out.cue --
    16  _schema
    17  _schema: {
    18  	@jsonschema(schema="http://json-schema.org/draft-07/schema#")
    19  	null | bool | number | string | [...] | {
    20  		@jsonschema(id="http://github.com/joomcode/cue/encoding/openapi/testdata/order.json")
    21  		value?: _
    22  		next?:  _schema_1
    23  		...
    24  	}
    25  }
    26  
    27  let _schema_1 = _schema