-
Notifications
You must be signed in to change notification settings - Fork 431
Open
Description
Correct me if I'm wrong, but nowadays the converter follows the strict rule: make prop optional if it's not in required list.
But JSON Schema allows using key default. Of course, existence of the prop in real object depends on realization (e.g.: schema-based validator).
I use ajv in my json-rpc server pipeline to validate arguments with useDefaults:true: it injects default values (defined in schema) in case of absent props.
That's why I'd like to have optional flag removed from such types.
If you feel this is good idea, I can try to fork and make a pull request soon. I think this behavior should be optional, e.g.: `removeOptionalIfDefaultExists"
lionralfs, iharuya, Rac75116 and calleli
Metadata
Metadata
Assignees
Labels
No labels