Skip to content

JSONReference_InternalReference

mattpolzin edited this page Nov 2, 2020 · 6 revisions

JSONReference.InternalReference

The context for a JSONReference that points to something within the same document as the reference itself.

public enum InternalReference

By contrast, an "external" reference is represented by a URL that is expected to be resolved to a different file than one containing the JSONReference.

This reference must start with "#".

Inheritance

Equatable, Hashable, LosslessStringConvertible, RawRepresentable

Initializers

init?(_:)

public init?(_ description: String)

init?(rawValue:)

Create a Reference from a path fragment as defined in RFC 3986.

public init?(rawValue: String)

Enumeration Cases

component

The reference refers to a component (i.e. #/components/...).

case component(name: String)

path

The reference refers to some path outside the Components Object.

case path(: Path)

Properties

name

Get the name of the referenced object.

var name: String?

This value will be nil if there are no path components (which can happen if the reference just points to the whole document).

description

Synonymous with rawValue.

var description: String

rawValue

A String formatted per the path fragment specification found in RFC 3986.

var rawValue: String
Types
Protocols
Global Functions
Extensions
Clone this wiki locally