ellmer requires every property in a JSON Schema object to be listed in
required, including properties whose value may be null. rdantic keeps
nullable fields optional, so this adapter adds those property names while
leaving the original schema unchanged.
Arguments
- x
An rdantic type, or a JSON Schema list returned by
schema().
Examples
if (FALSE) { # \dontrun{
AgeName <- struct(
"AgeName",
age = (int[1][. > 0] | NULL),
name = (chr[1] | NULL)
)
to_ellmer_type(AgeName)
} # }