Minor Changes
-
#3433
c1987e2
Thanks @gcanti! - Make json schema output more compatible with Open AI structured output, closes #3432.JSONSchema
- remove
oneOf
in favour ofanyOf
(e.g. inJsonSchema7object
,JsonSchema7empty
,JsonSchema7Enums
) - remove
const
in favour ofenum
(e.g. inJsonSchema7Enums
) - remove
JsonSchema7Const
type - remove
JsonSchema7OneOf
type
AST
- remove
identifier
annotation fromSchema.Null
- remove
identifier
annotation fromSchema.Object
- remove
Patch Changes
-
#3448
1ceed14
Thanks @tim-smart! - add Schema.ArrayEnsure & Schema.NonEmptyArrayEnsureThese schemas can be used to ensure that a value is an array, from a value that may be an array or a single value.
import { Schema } from "@effect/schema"; const schema = Schema.ArrayEnsure(Schema.String); Schema.decodeUnknownSync(schema)("hello"); // => ["hello"] Schema.decodeUnknownSync(schema)(["a", "b", "c"]); // => ["a", "b", "c"]
-
#3450
0e42a8f
Thanks @tim-smart! - update dependencies -
Updated dependencies [
8295281
,c940df6
,00b6c6d
,f8d95a6
]:- effect@3.6.4