Reference

data class Reference(val ref: String, val isDynamic: Boolean = false) : ReferenceOr<Nothing> (source)

A reference to a definition within the current document.

Report a problem

Constructors

Link copied to clipboard
constructor(ref: String, isDynamic: Boolean = false)

Properties

Link copied to clipboard

Whether this reference is dynamic.

Link copied to clipboard
val ref: String

Reference to a definition like #/components/schemas/Name

Functions

Link copied to clipboard
open fun <B> mapToReference(mappingFunction: (Nothing) -> ReferenceOr<B>): ReferenceOr<B>

Same as map, but for mapping to references.

Link copied to clipboard
open fun <B> mapValue(mappingFunction: (Nothing) -> B): ReferenceOr<B>

Maps the value using the given function.

Link copied to clipboard
Link copied to clipboard
open fun valueOrNull(): Nothing?

Returns the value if this instance is of type Value, or null if it is of type Reference.