The general constructor behind the eleven spec constructors: it builds a spec of kind from its
fields and validates it with the kind's validator. Use it for kinds without a constructor
(env_alias, setting, service, preset, ...) and for kinds defined by plugins. Unknown
fields are kept (forward compatibility); a wrong type of a known field is an error naming the
field.
Arguments
- kind
The kind name, one of the
kind.<name>features ofgptr_api().- name
The record name within the kind.
- ...
The kind's fields, named.
Examples
gptr_spec("env_alias", "SLACK_BOT_TOKEN", aliases = "slack-token")
#> <gptr_env_alias SLACK_BOT_TOKEN>
#> aliases: slack-token
#> api_version: 1.0
gptr_spec("setting", "panel.size", default = 3L, description = "Reviewers per panel")
#> <gptr_setting panel.size>
#> default: 3
#> description: Reviewers per panel
#> api_version: 1.0
#> scope: both