encoding/openapi: add support for deprecated field from protobuf

protos may be marked as `deprecated=true` in their definitions,
these fields can be mapped to openapi field `deprecated`.

Change-Id: I41204b1cd7e32e2822145622c6dfeab5d8184d65
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/2900
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/openapi/testdata/simple-filter.json b/encoding/openapi/testdata/simple-filter.json
index 0acf4a4..76b3d29 100644
--- a/encoding/openapi/testdata/simple-filter.json
+++ b/encoding/openapi/testdata/simple-filter.json
@@ -12,7 +12,8 @@
                "mediumNum",
                "smallNum",
                "float",
-               "double"
+               "double",
+               "deprecatedField"
             ],
             "properties": {
                "mediumNum": {
@@ -29,6 +30,11 @@
                "double": {
                   "type": "number",
                   "format": "double"
+               },
+               "deprecatedField": {
+                  "type": "string",
+                  "format": "string",
+                  "deprecated": true
                }
             }
          }