Skip to contents

Holds a set of reusable objects for different aspects of the OAS. All objects defined within the components object will have no effect on the API unless they are explicitly referenced from properties outside the components object. We currently only support the security_schemes object within the components object (see class_security_schemes()).

Usage

class_components(..., security_schemes = class_security_schemes())

Arguments

...

These dots are for future extensions and must be empty.

security_schemes

An object to hold reusable security scheme objects created by class_security_schemes().

Value

A components S7 object with various schemas for the API.

Examples

class_components()
#> <rapid::components>
#>  @ security_schemes: <rapid::security_schemes>
#>  .. @ name       : chr(0) 
#>  .. @ details    : <rapid::security_scheme_details>  list()
#>  .. @ description: chr(0) 
class_components(
  security_schemes = class_security_schemes(
    name = "a",
    details = class_security_scheme_details(
      class_api_key_security_scheme("parm", "query")
    )
  )
)
#> <rapid::components>
#>  @ security_schemes: <rapid::security_schemes>
#>  .. @ name       : chr "a"
#>  .. @ details    : <rapid::security_scheme_details> List of 1
#>  .. .. $ : <rapid::api_key_security_scheme>
#>  .. ..  ..@ parameter_name: chr "parm"
#>  .. ..  ..@ location      : chr "query"
#>  .. @ description: chr(0)