Set or remove a schema node description
Arguments
- x
A
SchemaDoc.- path
Path to the target schema node. Use
$for the root node. Bare field segments such as$idimplicitly traverse containerfields. Use$fields$idto write the explicit field path. Backtick-quote field names that contain path operators, for example$`a$b`.- description
Optional description string. Use
NULLto remove the description.
Examples
schema <- schema_doc(schema_check("string"))
schema_set_desc(schema, "$", "A non-empty label.")
#> {
#> "description": "A non-empty label.",
#> "check": {
#> "kind": "string"
#> }
#> }