encoding/openapi: support Definitions

Fixes #131

Change-Id: Ic7581a22dddb0c6b01707c78ea9b051abfa0e0e2
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/3584
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/openapi/testdata/issue131.json b/encoding/openapi/testdata/issue131.json
new file mode 100644
index 0000000..1fc5e56
--- /dev/null
+++ b/encoding/openapi/testdata/issue131.json
@@ -0,0 +1,40 @@
+{
+   "openapi": "3.0.0",
+   "info": {
+      "title": "test",
+      "version": "v1"
+   },
+   "paths": {},
+   "components": {
+      "schemas": {
+         "Blocks": {
+            "type": "object",
+            "required": [
+               "block1"
+            ],
+            "properties": {
+               "block1": {
+                  "$ref": "#/components/schemas/Block"
+               }
+            }
+         },
+         "Block": {
+            "type": "object",
+            "required": [
+               "a",
+               "b"
+            ],
+            "properties": {
+               "a": {
+                  "type": "number",
+                  "exclusiveMinimum": 50
+               },
+               "b": {
+                  "type": "number",
+                  "exclusiveMaximum": 10
+               }
+            }
+         }
+      }
+   }
+}
\ No newline at end of file