// This test tests the conversion and ordering of $defs.

-- schema.json --
{
  "$schema": "http://json-schema.org/draft-07/schema#",

  "$id": "http://cuelang.org/go/encoding/openapi/testdata/order.json",

  "properties": {
    "value": {},
    "next": { "$ref": "#" }
  }
}

-- out/decode/extract --
@jsonschema(schema="http://json-schema.org/draft-07/schema#")
_schema
_schema: {
	@jsonschema(id="http://cuelang.org/go/encoding/openapi/testdata/order.json")
	null | bool | number | string | [...] | {
		value?: _
		next?:  _schema
		...
	}
}
