Effect-TS / effect

An ecosystem of tools to build robust applications in TypeScript
https://effect.website
MIT License
7.74k stars 246 forks source link

From Discord: Seeking Help for Unresolved Discord Issue #3839

Closed effect-bot closed 1 month ago

effect-bot commented 1 month ago

Summary

In a discussion thread, two users, @nikwotton and @gcanti, are addressing an issue related to generating JSON Schemas using the Effect-TS library. @nikwotton is facing a problem with Schema.OptionFromUndefinedOr, which produces an error stating that a "jsonSchema" annotation is required. The conversation references the successful generation of JSON Schemas using Schema.UndefinedOr, where an optional property is correctly represented without requiring it.

Key Takeaways:

  1. Schema Options: Schema.UndefinedOr successfully generates a JSON Schema with an optional property, whereas Schema.OptionFromUndefinedOr encounters issues, suggesting a lack of support or a missing feature.
  2. Error Handling: The error message indicates the need for additional annotations or support in the library when using Schema.OptionFromUndefinedOr.
  3. Library Support: Enhancements may be needed in the library to support Schema.OptionFromUndefinedOr similarly to Schema.UndefinedOr.

Discord thread

https://discord.com/channels/795981131316985866/1291883287173922836