Skip to content

JSONReference_InternalReference

mattpolzin edited this page Jun 11, 2021 · 6 revisions

JSONReference.InternalReference

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

public enum InternalReference: LosslessStringConvertible, RawRepresentable, Equatable, Hashable 

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.

public 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.

public var description: String 

rawValue

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

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