Effect CommunityEC
Effect Community•3y ago•
5 replies
timolins

Unsupported Conversion of S.optional() to JSON Schema

👋 Is it true that S.optional() isn't supported when converting to JSON Schema?

const person = S.struct({
  name: S.optional(S.string),
})

JSONSchema.to(person) // Error: cannot convert `undefined` to JSON Schema
Was this page helpful?