@ai-sdk/google 2.0.105 → 2.0.107
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +13 -0
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -1
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +5 -0
- package/dist/internal/index.js.map +1 -1
- package/dist/internal/index.mjs +5 -0
- package/dist/internal/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/internal/index.js
CHANGED
|
@@ -187,6 +187,11 @@ function convertJSONSchemaDefinition(jsonSchema, isRoot, referenceContext) {
|
|
|
187
187
|
const nonNullTypes = type.filter((t) => t !== "null");
|
|
188
188
|
if (nonNullTypes.length === 0) {
|
|
189
189
|
result.type = "null";
|
|
190
|
+
} else if (nonNullTypes.length === 1) {
|
|
191
|
+
result.type = nonNullTypes[0];
|
|
192
|
+
if (hasNull) {
|
|
193
|
+
result.nullable = true;
|
|
194
|
+
}
|
|
190
195
|
} else {
|
|
191
196
|
result.anyOf = nonNullTypes.map((t) => ({ type: t }));
|
|
192
197
|
if (hasNull) {
|