Changelog
[1.4.0] - 2022-08-08
clone
function.schema.partial
just generates a new object schema type with each field marked as optional.Changelog
[1.3.1] - 2022-08-08
Schema.setDescription
and Schema.setExample
are now optional, so they can be used to clear a previously set description or example, respectively.Changelog
[1.3.0] - 2022-08-06
schema.boolean
, schema.number
, and schema.restrictedNumber
, added allowedSerializationForms
metadata and a setAllowedSerializationForms
function to set (replace) that metadata. These allow for boolean or numeric types that serialize as string or string/boolean (ex. for use in query params).CommonSchemaOptions
type and the ability to directly pass those options (i.e. description and example) during initial schema creation, because it was very inconsistent.Changelog
[1.2.1] - 2022-08-04
expectedTypeName
on NotSchema
and uniqueName
on UpgradedSchema
)Changelog
[1.2.0] - 2022-08-03
schema.partial
works. It now uses schema.object
more directly, resulting in better type inference.ObjectSchema.partial()
Changelog
[1.1.1] - 2022-08-03
InferRecordOfSchemasFromRecordOfValues
, which was causing TypeScript to erase important type information.Changelog
[1.1.0] - 2022-08-03
SchemaType
'restricted-number'
to 'restrictedNumber'
for better consistency with other multi-word type IDs.Changelog
[1.0.1] - 2022-08-03
TreatUndefinedAsOptional
, PickPossiblyUndefinedValues
, and PickAlwaysDefinedValues
, which were causing TypeScript to erase important type information.