Skip to contents

as_api_key_security_scheme() turns an existing object into an api_key_security_scheme. This is in contrast with class_api_key_security_scheme(), which builds an api_key_security_scheme from individual properties.

Usage

as_api_key_security_scheme(x, ..., arg = caller_arg(x), call = caller_env())

Arguments

x

The object to coerce. Must be empty or be a list or character vector with names "name" and either "in" or "location", or names that can be coerced to those names via snakecase::to_snake_case(). Additional names are ignored.

...

These dots are for future extensions and must be empty.

arg

An argument name as a string. This argument will be mentioned in error messages as the input that is at the origin of a problem.

call

The execution environment of a currently running function, e.g. caller_env(). The function will be mentioned in error messages as the source of the error. See the call argument of abort() for more information.

Value

An api_key_security_scheme as returned by class_api_key_security_scheme().