Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion Sources/CoreXLSX/Relationships.swift
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,29 @@ public struct Relationship: Codable, Equatable {
"""
http://purl.oclc.org/ooxml/officeDocument/relationships/extendedProperties
"""
case sheetMetadata =
"""
http://schemas.openxmlformats.org/officeDocument/2006/relationships/\
sheetMetadata
"""
}

enum CodingKeys: String, CodingKey {
case id
case rawType = "type"
case target
}

/// The identifier for this entity.
public let id: String

/// The type of this entity.
public let type: SchemaType
public var type: SchemaType? { SchemaType(rawValue: rawType) }

/// The raw type string.
/// This is needed so that Relationship decodes when encountering type strings
/// that are missing SchemaType cases.
public let rawType: String

/// The path to this entity in the `.xlsx` archive.
public let target: String
Expand Down