Skip to contents

The reference object allows for reuse of components between different parts of the API description. These objects are currently simple character references, but may change structure in the future to automatically resolve references.

Usage

class_reference(
  ref_uri = character(0),
  summary = character(0),
  description = character(0)
)

Arguments

ref_uri

Character scalar. The reference identifier. This must be in the form of a URI.

summary

Character scalar (optional). A short summary which by default should override that of the referenced component. If the referenced object-type does not allow a summary field, then this field has no effect.

description

Character scalar (optional). A description which by default should override that of the referenced component. CommonMark syntax may be used for rich text representation. If the referenced object-type does not allow a description field, then this field has no effect.

Value

A reference S7 object pointing (by name) to another part of the rapid object.

Examples

class_reference("#/components/schemas/Pet")
#> <rapid::reference>
#>  @ ref_uri    : chr "#/components/schemas/Pet"
#>  @ summary    : chr(0) 
#>  @ description: chr(0)