encoding/openapi: update tests
Not sure why the Git CI didn't catch this.
Change-Id: I1869cf3376f5caca52d5ccb68375e5dc03d6a8ea
Reviewed-on: https://cue-review.googlesource.com/c/cue/+/6441
Reviewed-by: Marcel van Lohuizen <mpvl@golang.org>
diff --git a/encoding/openapi/testdata/builtins.json b/encoding/openapi/testdata/builtins.json
index aebb3e3..92dc87f 100644
--- a/encoding/openapi/testdata/builtins.json
+++ b/encoding/openapi/testdata/builtins.json
@@ -18,19 +18,19 @@
"properties": {
"timestamp1": {
"type": "string",
- "format": "dateTime"
+ "format": "date-time"
},
"timestamp2": {
"type": "string",
- "format": "dateTime"
+ "format": "date-time"
},
"timestamp3": {
"type": "string",
- "format": "dateTime"
+ "format": "date-time"
},
"timestamp4": {
"type": "string",
- "format": "dateTime"
+ "format": "date-time"
},
"date1": {
"type": "string",
diff --git a/encoding/openapi/testdata/oneof-funcs.json b/encoding/openapi/testdata/oneof-funcs.json
index b61f51b..6b6b548 100644
--- a/encoding/openapi/testdata/oneof-funcs.json
+++ b/encoding/openapi/testdata/oneof-funcs.json
@@ -281,8 +281,7 @@
"properties": {
"exact": {
"description": "Randomly picked description from a set of size one.",
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
},
@@ -293,8 +292,7 @@
"properties": {
"regex": {
"description": "Randomly picked description from a set of size one.",
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
}
@@ -308,8 +306,7 @@
"properties": {
"exact": {
"description": "Randomly picked description from a set of size one.",
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
},
@@ -320,8 +317,7 @@
"properties": {
"regex": {
"description": "Randomly picked description from a set of size one.",
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
}
@@ -488,8 +484,7 @@
"properties": {
"shared": {
"description": "Randomly picked description from a set of size one.",
- "type": "string",
- "format": "string"
+ "type": "string"
},
"extra": {
"description": "Randomly picked description from a set of size one.",
diff --git a/encoding/openapi/testdata/oneof-resolve.json b/encoding/openapi/testdata/oneof-resolve.json
index 2b894b0..7130198 100644
--- a/encoding/openapi/testdata/oneof-resolve.json
+++ b/encoding/openapi/testdata/oneof-resolve.json
@@ -134,12 +134,10 @@
"type": "integer"
},
"exact": {
- "type": "string",
- "format": "string"
+ "type": "string"
},
"regex": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
},
"allOf": [
@@ -229,12 +227,10 @@
"type": "integer"
},
"exact": {
- "type": "string",
- "format": "string"
+ "type": "string"
},
"regex": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
},
"allOf": [
@@ -383,12 +379,10 @@
"type": "integer"
},
"exact": {
- "type": "string",
- "format": "string"
+ "type": "string"
},
"regex": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
},
"allOf": [
@@ -463,13 +457,7 @@
"WithMap": {
"type": "object",
"properties": {
- "shared": {
- "type": "object",
- "format": "string",
- "additionalProperties": {
- "type": "integer"
- }
- },
+ "shared": {},
"extra": {
"type": "integer"
}
diff --git a/encoding/openapi/testdata/oneof.json b/encoding/openapi/testdata/oneof.json
index 9238266..66b46b3 100644
--- a/encoding/openapi/testdata/oneof.json
+++ b/encoding/openapi/testdata/oneof.json
@@ -256,8 +256,7 @@
],
"properties": {
"exact": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
},
@@ -267,8 +266,7 @@
],
"properties": {
"regex": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
}
@@ -281,8 +279,7 @@
],
"properties": {
"exact": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
},
@@ -292,8 +289,7 @@
],
"properties": {
"regex": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
}
@@ -444,8 +440,7 @@
],
"properties": {
"shared": {
- "type": "string",
- "format": "string"
+ "type": "string"
},
"extra": {
"type": "integer"
diff --git a/encoding/openapi/testdata/openapi-norefs.json b/encoding/openapi/testdata/openapi-norefs.json
index f5c4dfd..4a34623 100644
--- a/encoding/openapi/testdata/openapi-norefs.json
+++ b/encoding/openapi/testdata/openapi-norefs.json
@@ -65,8 +65,7 @@
"type": "number"
},
"a": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
},
"oneOf": [
@@ -118,8 +117,7 @@
"bar": {
"type": "array",
"items": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
},
"a": {
@@ -130,8 +128,7 @@
]
},
"b": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
},
"oneOf": [
@@ -169,12 +166,9 @@
"type": "object",
"properties": {
"a": {
- "type": "string",
- "format": "string"
+ "type": "string"
},
- "b": {
- "format": "string"
- }
+ "b": {}
},
"oneOf": [
{
diff --git a/encoding/openapi/testdata/openapi.json b/encoding/openapi/testdata/openapi.json
index 90bd1f5..50bcf83 100644
--- a/encoding/openapi/testdata/openapi.json
+++ b/encoding/openapi/testdata/openapi.json
@@ -77,8 +77,7 @@
],
"properties": {
"a": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
}
@@ -113,8 +112,7 @@
"bar": {
"type": "array",
"items": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
},
@@ -139,8 +137,7 @@
],
"properties": {
"b": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
}
@@ -168,8 +165,7 @@
"type": "object",
"properties": {
"a": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
},
"oneOf": [
@@ -189,8 +185,7 @@
],
"properties": {
"b": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
},
diff --git a/encoding/openapi/testdata/refs.json b/encoding/openapi/testdata/refs.json
index 8c507ed..31406bf 100644
--- a/encoding/openapi/testdata/refs.json
+++ b/encoding/openapi/testdata/refs.json
@@ -14,8 +14,7 @@
],
"properties": {
"b": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
},
@@ -47,8 +46,7 @@
"type": "object",
"properties": {
"a": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
},
"allOf": [
diff --git a/encoding/openapi/testdata/simple-filter.json b/encoding/openapi/testdata/simple-filter.json
index e12b2f7..fdf8708 100644
--- a/encoding/openapi/testdata/simple-filter.json
+++ b/encoding/openapi/testdata/simple-filter.json
@@ -34,7 +34,6 @@
},
"deprecatedField": {
"type": "string",
- "format": "string",
"deprecated": true
}
}
diff --git a/encoding/openapi/testdata/simple.json b/encoding/openapi/testdata/simple.json
index 3d5b306..4429e70 100644
--- a/encoding/openapi/testdata/simple.json
+++ b/encoding/openapi/testdata/simple.json
@@ -36,7 +36,6 @@
},
"deprecatedField": {
"type": "string",
- "format": "string",
"deprecated": true
}
}
diff --git a/encoding/openapi/testdata/structural.json b/encoding/openapi/testdata/structural.json
index 3e1945c..a483851 100644
--- a/encoding/openapi/testdata/structural.json
+++ b/encoding/openapi/testdata/structural.json
@@ -13,8 +13,7 @@
"properties": {
"stringValue": {
"description": "Used for values of type STRING, DNS_NAME, EMAIL_ADDRESS, and URI",
- "type": "string",
- "format": "string"
+ "type": "string"
},
"int64Value": {
"description": "Used for values of type INT64",
@@ -38,7 +37,7 @@
"timestampValue": {
"description": "Used for values of type TIMESTAMP",
"type": "string",
- "format": "dateTime"
+ "format": "date-time"
},
"durationValue": {
"description": "Used for values of type DURATION",
@@ -55,8 +54,7 @@
"description": "Holds a set of name/value pairs.",
"type": "object",
"additionalProperties": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
}
@@ -119,8 +117,7 @@
"properties": {
"stringValue": {
"description": "Used for values of type STRING, DNS_NAME, EMAIL_ADDRESS, and URI",
- "type": "string",
- "format": "string"
+ "type": "string"
},
"int64Value": {
"description": "Used for values of type INT64",
@@ -144,7 +141,7 @@
"timestampValue": {
"description": "Used for values of type TIMESTAMP",
"type": "string",
- "format": "dateTime"
+ "format": "date-time"
},
"durationValue": {
"description": "Used for values of type DURATION",
@@ -161,8 +158,7 @@
"description": "Holds a set of name/value pairs.",
"type": "object",
"additionalProperties": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
}
@@ -224,8 +220,7 @@
"description": "Holds a set of name/value pairs.",
"type": "object",
"additionalProperties": {
- "type": "string",
- "format": "string"
+ "type": "string"
}
}
}