You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since fn for Joi.lazy(fn) should return joi schema, it's okay to be called once to avoid unnecessary overhead.
(+) My other need is describing lazily-loaded schema with Joi.describe().
If lazy.once() replace the schema as lazily loaded schema itself, we can now describe the lazy schema as well. (Could it be another feature request for Joi.describe()? )
The text was updated successfully, but these errors were encountered:
once could be a thing, but it's probably not a good idea for description as lazy is often used for cyclic or recursive patterns, so this would obviously result in endless descriptions.
Context
Since
fn
forJoi.lazy(fn)
should return joi schema, it's okay to be called once to avoid unnecessary overhead.(+) My other need is describing lazily-loaded schema with
Joi.describe()
.If
lazy.once()
replace the schema as lazily loaded schema itself, we can now describe the lazy schema as well. (Could it be another feature request forJoi.describe()
? )The text was updated successfully, but these errors were encountered: