encoding/openapi: simplify based on user-defined format
For instance, don't use minimum and maximum for
int32 boundaries if the user indicated the field is an
int32.
Also move to apd instead of ints.
Issue #56
Change-Id: I472c3c2b1fd8622430595bd062cef3bbd53b62f1
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/2376
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/openapi/testdata/array.cue b/encoding/openapi/testdata/array.cue
new file mode 100644
index 0000000..3261f81
--- /dev/null
+++ b/encoding/openapi/testdata/array.cue
@@ -0,0 +1,19 @@
+Arrays: {
+ bar?: [...MyEnum]
+ foo?: [...MyStruct]
+}
+
+Arrays: {
+ bar?: [...MyEnum]
+ foo?: [...MyStruct]
+}
+
+// MyStruct
+MyStruct: {
+ a?: int
+ e?: [...MyEnum]
+ e?: [...MyEnum]
+}
+
+// MyEnum
+MyEnum: *"1" | "2" | "3"