Delete a field schema from a container node
Arguments
- x
A
SchemaDoc.- name
Field name to remove.
- path
Path to the target container 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`.- missing
Missing-target behavior. Use
"error"to raise an error or"ignore"to leave the schema unchanged.
Examples
schema <- schema_doc(list(check = list(kind = "list")))
schema
#> {
#> "check": {
#> "kind": "list"
#> }
#> }
schema <- schema_add_field(schema, "id", schema_check("int"))
schema
#> {
#> "check": {
#> "kind": "list"
#> },
#> "fields": {
#> "id": {
#> "check": {
#> "kind": "int"
#> }
#> }
#> }
#> }
schema <- schema_del_field(schema, "id")
schema
#> {
#> "check": {
#> "kind": "list"
#> }
#> }