cue: support export package clause and docs

Change-Id: I5db5b8e8bc6180061334c230770a20c4cadb6949
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/5092
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/openapi/types.go b/encoding/openapi/types.go
index 209dda6..9e2b07d 100644
--- a/encoding/openapi/types.go
+++ b/encoding/openapi/types.go
@@ -51,7 +51,7 @@
 	default:
 		return ""
 	}
-	b, err := format.Node(v.Syntax())
+	b, err := format.Node(v.Syntax(cue.Final()))
 	if err != nil {
 		return ""
 	}