From 5dffe47ffe1d4bbf2afea7592c9fac83c4b9fc2f Mon Sep 17 00:00:00 2001 From: Goncalo-FradeIOHK Date: Wed, 7 Sep 2022 16:34:07 +0100 Subject: [PATCH] feat(domain): add standard DIDUrl --- Domain/Sources/Models/DIDUrl.swift | 20 ++++++++++++++++++++ bootstrap.sh | 2 +- 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 Domain/Sources/Models/DIDUrl.swift diff --git a/Domain/Sources/Models/DIDUrl.swift b/Domain/Sources/Models/DIDUrl.swift new file mode 100644 index 00000000..3b923e27 --- /dev/null +++ b/Domain/Sources/Models/DIDUrl.swift @@ -0,0 +1,20 @@ +/// Represents a DIDUrl with ``did``, ``path``, ``parameters``, ``fragment`` +/// As specified in [w3 standards](`https://www.w3.org/TR/did-core/#dfn-did-urls`) +public struct DIDUrl { + public let did: DID + public let path: [String] + public let parameters: [String: [String]] + public let fragment: String? + + public init( + did: DID, + path: [String], + parameters: [String: [String]], + fragment: String? = nil + ) { + self.did = did + self.path = path + self.parameters = parameters + self.fragment = fragment + } +} diff --git a/bootstrap.sh b/bootstrap.sh index 889928e7..b6ce7d94 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -14,7 +14,7 @@ else cd atala-prism-swift-sdk || exit fi - openapi-generator generate -g swift5 -o OpenAPI/Castor -i ../atala-prism-building-blocks/castor/api/castor-openapi-spec.yaml --additional-properties=projectName=CastorAPI + openapi-generator generate -g swift5 -o OpenAPI/Castor -i ../atala-prism-building-blocks/castor/api/http/castor-openapi-spec.yaml --additional-properties=projectName=CastorAPI openapi-generator generate -g swift5 -o OpenAPI/Pollux -i ../atala-prism-building-blocks/pollux/api/pollux-openapi-spec.yaml --additional-properties=projectName=PolluxAPI fi