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
Describe the bug
It appears that the current implementation of the treatDefaultedOptionalAsRequired option in src/parse (Line 70) does not align with the documented behavior.
To Reproduce
Steps to reproduce the behavior:
// for the schema exportconstSchema=Joi.object({foo: Joi.number().integer().positive().default(60000).optional(),});// and configuration optionsawaitconvertFromDirectory({treatDefaultedOptionalAsRequired: true,
...
});
Expected behavior
The treatDefaultedOptionalAsRequired option should mark fields as required.
exportinterfaceSchema{foo: 60000|number;}
Actual behavior
Fields are still marked as optional.
exportinterfaceSchema{foo?: 60000|number;}
Additional context
The implementation can be updated:
Describe the bug
It appears that the current implementation of the treatDefaultedOptionalAsRequired option in src/parse (Line 70) does not align with the documented behavior.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
The treatDefaultedOptionalAsRequired option should mark fields as required.
Actual behavior
Fields are still marked as optional.
Additional context
The implementation can be updated:
The text was updated successfully, but these errors were encountered: