encoding/openapi: make OrderedMap type opaque

The OrderedMap needs to be a pointer, which may be
a bit unintuitive it being a slice. Change it to as struct.

Info is left as a non-pointer to indicate the non-optional
nature of it. The user of pointers is enforced by making
MarshalJSON only work for pointer types.

Change-Id: I8481dd8974825928815bfef3acd1eb5fc0274029
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/2460
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/openapi/testdata/openapi.json b/encoding/openapi/testdata/openapi.json
index d4c6691..d64d270 100644
--- a/encoding/openapi/testdata/openapi.json
+++ b/encoding/openapi/testdata/openapi.json
@@ -13,12 +13,9 @@
                      "bar"
                   ],
                   "properties": {
-                     "bar": {
-                        "type": "array",
-                        "items": {
-                           "type": "string",
-                           "format": "string"
-                        }
+                     "port": {
+                        "$ref": "#/components/schema/Port",
+                        "type": "object"
                      },
                      "foo": {
                         "allOf": [
@@ -32,9 +29,12 @@
                            }
                         ]
                      },
-                     "port": {
-                        "$ref": "#/components/schema/Port",
-                        "type": "object"
+                     "bar": {
+                        "type": "array",
+                        "items": {
+                           "type": "string",
+                           "format": "string"
+                        }
                      }
                   }
                },
@@ -79,14 +79,14 @@
                "obj"
             ],
             "properties": {
+               "port": {
+                  "type": "integer"
+               },
                "obj": {
                   "type": "array",
                   "items": {
                      "type": "integer"
                   }
-               },
-               "port": {
-                  "type": "integer"
                }
             }
          },