Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Commit

Permalink
Merge pull request #145 from admin-ch/feature/schema-validation
Browse files Browse the repository at this point in the history
makes standardizedFamilyName optional
  • Loading branch information
stmitt authored Jul 19, 2022
2 parents 6a38683 + 0136ddd commit d352404
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Sources/CovidCertificateSDK/ehn/DCCCert.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public struct Person: Codable {
public let givenName: String?
public let standardizedGivenName: String?
public let familyName: String?
public let standardizedFamilyName: String
public let standardizedFamilyName: String?

private enum CodingKeys: String, CodingKey {
case givenName = "gn"
Expand All @@ -73,7 +73,7 @@ public struct Person: Codable {
givenName = try? container.decode(String.self, forKey: .givenName).trimmed
standardizedGivenName = try? container.decode(String.self, forKey: .standardizedGivenName).trimmed
familyName = try? container.decode(String.self, forKey: .familyName).trimmed
standardizedFamilyName = try container.decode(String.self, forKey: .standardizedFamilyName).trimmed
standardizedFamilyName = try? container.decode(String.self, forKey: .standardizedFamilyName).trimmed
}
}

Expand Down

0 comments on commit d352404

Please sign in to comment.