CodeSquared docs

OasRef

OasRef is an object representing a reference in an OpenAPI document. It is used to share and reuse objects within the document.

Properties

PropertyTypeDescription
oasType'ref'Static value representing the OpenAPI reference type.
type'ref'Static 'ref' string indicating the object is a reference.
refType'schema' | 'response' | 'parameter' | 'example' | 'requestBody' | 'header'Flag indicating the type of object being referenced.
$refstringUri reference identifier, for example "#/components/schemas/Pet"
summarystring | undefinedOptional summary of the referenced object.
descriptionstring | undefinedOptional description of the referenced object.

Methods

isRef

Returns true indicating that the object is a reference.

ref.isRef()

Return value

true

resolve

Returns the referenced object.

ref.resolve()

Return value

The referenced object.

resolveOnce

Returns the referenced object.

ref.resolveOnce()

Return value

The referenced object.