Some bug fixes (#8)

This PR contains the work done to fix some bug fixes that were encountered while quickly testing the interactions with the service endpoints. Furthermore, there is also a possible fix to build this library for non-apple platforms.

Reviewed-on: #8
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit was merged in pull request #8.
This commit is contained in:
2025-10-05 22:05:07 +00:00
committed by Javier Cicchelli
parent d5bd9feb0a
commit a83da81414
7162 changed files with 7199 additions and 7186 deletions
+5 -1
View File
@@ -30,6 +30,7 @@ let package = Package(
)
],
dependencies: [
.package(url: "https://github.com/apple/swift-crypto.git", from: "3.13.0"),
.package(url: "https://github.com/apple/swift-openapi-generator.git", from: "1.3.0"),
.package(url: "https://github.com/apple/swift-openapi-runtime", from: "1.5.0"),
.package(url: "https://github.com/apple/swift-openapi-urlsession", from: "1.0.2"),
@@ -39,6 +40,9 @@ let package = Package(
.target(
name: MarvelService.target,
dependencies: [
.product(name: "Crypto", package: "swift-crypto", condition: .when(platforms: [
.android, .linux, .openbsd, .windows
])),
.product(name: "OpenAPIRuntime", package: "swift-openapi-runtime"),
.product(name: "OpenAPIURLSession", package: "swift-openapi-urlsession")
],
@@ -63,4 +67,4 @@ enum MarvelService {
static let package = "marvel-service"
static let target = "MarvelService"
static let test = "\(MarvelService.target)Tests"
}
}
@@ -10,7 +10,13 @@
//
//===----------------------------------------------------------------------===
#if canImport(CriptoKit)
import CryptoKit
#elseif canImport(Crypto)
import Crypto
#else
import CommonCrypto
#endif
import struct Foundation.Data
import struct Foundation.TimeInterval
@@ -51,10 +57,33 @@ struct GenerateHashUseCase {
let stringToHash = timestamp.asString + self.privateKey + self.publicKey
let dataToHash = Data(stringToHash.utf8)
#if canImport(CriptoKit) || canImport(Crypto)
return Insecure.MD5
.hash(data: dataToHash)
.map { String(format: "%02x", $0) }
.map { String(format: .Format.hexadecimal, $0) }
.joined()
#else
return dataToHash
.withUnsafeBytes {
var hash = [UInt8](repeating: 0, count: Int(CC_MD5_DIGEST_LENGTH))
CC_MD5($0.baseAddress, CC_LONG(dataToHash.count), &hash)
return hash
}
.map { String(format: .Format.hexadecimal, $0) }
.joined()
#endif
}
}
// MARK: - Constants
private extension String {
/// A namespace assigned to string format representations.
enum Format {
/// A string format for MD5 hash hexadecimal bytes.
static let hexadecimal = "%02x"
}
}
+12 -26
View File
@@ -6350,11 +6350,9 @@ components:
required:
- id
- name
- description
- modified
- resourceURI
- urls
- thumbnail
- comics
- stories
- events
@@ -6474,7 +6472,6 @@ components:
- title
- issueNumber
- variantDescription
- description
- modified
- isbn
- upc
@@ -6492,7 +6489,6 @@ components:
- collectedIssues
- dates
- prices
- thumbnail
- images
- creators
- characters
@@ -6557,7 +6553,6 @@ components:
- modified
- resourceURI
- urls
- thumbnail
- series
- stories
- comics
@@ -6622,13 +6617,11 @@ components:
required:
- id
- title
- description
- resourceURI
- urls
- modified
- start
- end
- thumbnail
- comics
- stories
- series
@@ -6697,21 +6690,17 @@ components:
required:
- id
- title
- description
- resourceURI
- urls
- startYear
- endYear
- rating
- modified
- thumbnail
- comics
- stories
- events
- characters
- creators
- next
- previous
Story:
type: object
description: A story resource type that represents an indivisible, reusable components of comics. Most comics have two stories - a cover and an interior story (e. g. the cover from Amazing Fantasy \#15 and the origin of Spider-Man story from that comic) - but many, such as anthology comics and collections, will have more. Stories may be re-published in several comics, but the comic in which they originally appeared will always be present as a data point.
@@ -6759,17 +6748,14 @@ components:
required:
- id
- title
- description
- resourceURI
- type
- modified
- thumbnail
- comics
- series
- events
- characters
- creators
- originalissue
# Core Entity Summary Representations
CharacterSummary:
@@ -6788,7 +6774,6 @@ components:
required:
- resourceURI
- name
- role
ComicSummary:
type: object
description: A type that represents a summary of a comic resource.
@@ -6818,7 +6803,6 @@ components:
required:
- resourceURI
- name
- role
EventSummary:
type: object
description: A type that represents a summary of an event resource.
@@ -7294,14 +7278,16 @@ components:
etag:
type: string
description: A digest value of the content returned by the call.
required:
- code
- status
- copyright
- attributionText
- attributionHTML
- data
- etag
# These required fields are commented out due to a possible bug from the service, that can returns all fields as null
# when requesting events. (e. g.this happens when requesting all events without defining any filter parameter)
# required:
# - code
# - status
# - copyright
# - attributionText
# - attributionHTML
# - data
# - etag
SeriesDataWrapper:
type: object
description: The wrapper for the series data.
@@ -7446,9 +7432,9 @@ components:
description: A standard error type.
properties:
code:
type: string
type: integer
description: The HTTP status code of the returned result.
message:
reason:
type: string
description: A human readable message providing more details about the error.
required:
@@ -1,6 +0,0 @@
import Testing
@testable import marvel_service
@Test func example() async throws {
// Write your test here and use APIs like `#expect(...)` to check expected conditions.
}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1 +1 @@
{"hierarchy":{"paths":[["doc:\/\/MarvelService\/documentation\/MarvelService","doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware\/ClientMiddleware-Implementations"},"topicSections":[{"title":"Instance Methods","identifiers":["doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware\/intercept(_:body:baseURL:operationID:next:)"],"generated":true,"anchor":"Instance-Methods"}],"metadata":{"modules":[{"name":"MarvelService"}],"title":"ClientMiddleware Implementations","roleHeading":"API Collection","role":"collectionGroup"},"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"article","sections":[],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/marvelservice\/authmiddleware\/clientmiddleware-implementations"]}],"references":{"doc://MarvelService/documentation/MarvelService/AuthMiddleware/intercept(_:body:baseURL:operationID:next:)":{"abstract":[],"role":"symbol","identifier":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware\/intercept(_:body:baseURL:operationID:next:)","title":"intercept(_:body:baseURL:operationID:next:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"intercept","kind":"identifier"},{"text":"(","kind":"text"},{"preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","text":"HTTPRequest","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"body","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody","kind":"typeIdentifier"},{"text":"?, ","kind":"text"},{"text":"baseURL","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:10Foundation3URLV","text":"URL","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"operationID","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"next","kind":"externalParam"},{"text":": (","kind":"text"},{"preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","text":"HTTPRequest","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody","kind":"typeIdentifier"},{"text":"?, ","kind":"text"},{"preciseIdentifier":"s:10Foundation3URLV","text":"URL","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> (","kind":"text"},{"preciseIdentifier":"s:9HTTPTypes12HTTPResponseV","text":"HTTPResponse","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody","kind":"typeIdentifier"},{"text":"?)) ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> (","kind":"text"},{"preciseIdentifier":"s:9HTTPTypes12HTTPResponseV","text":"HTTPResponse","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody","kind":"typeIdentifier"},{"text":"?)","kind":"text"}],"kind":"symbol","type":"topic","url":"\/documentation\/marvelservice\/authmiddleware\/intercept(_:body:baseurl:operationid:next:)"},"doc://MarvelService/documentation/MarvelService":{"identifier":"doc:\/\/MarvelService\/documentation\/MarvelService","kind":"symbol","url":"\/documentation\/marvelservice","title":"MarvelService","role":"collection","abstract":[{"text":"A library that allows the developer to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"text":"Marvel Comics API","type":"text"}]},{"type":"text","text":" backend service."}],"type":"topic"},"doc://MarvelService/documentation/MarvelService/AuthMiddleware":{"abstract":[{"text":"A middleware that attaches the necessary authentication parameters to the path of the request.","type":"text"}],"role":"symbol","identifier":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware","navigatorTitle":[{"text":"AuthMiddleware","kind":"identifier"}],"title":"AuthMiddleware","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AuthMiddleware","kind":"identifier"}],"kind":"symbol","type":"topic","url":"\/documentation\/marvelservice\/authmiddleware"}}}
{"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware\/ClientMiddleware-Implementations"},"schemaVersion":{"minor":3,"major":0,"patch":0},"sections":[],"hierarchy":{"paths":[["doc:\/\/MarvelService\/documentation\/MarvelService","doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware"]]},"kind":"article","variants":[{"paths":["\/documentation\/marvelservice\/authmiddleware\/clientmiddleware-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"metadata":{"role":"collectionGroup","modules":[{"name":"MarvelService"}],"title":"ClientMiddleware Implementations","roleHeading":"API Collection"},"topicSections":[{"anchor":"Instance-Methods","identifiers":["doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware\/intercept(_:body:baseURL:operationID:next:)"],"generated":true,"title":"Instance Methods"}],"references":{"doc://MarvelService/documentation/MarvelService/AuthMiddleware/intercept(_:body:baseURL:operationID:next:)":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"intercept"},{"kind":"text","text":"("},{"preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","kind":"typeIdentifier","text":"HTTPRequest"},{"kind":"text","text":", "},{"kind":"externalParam","text":"body"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier","text":"HTTPBody"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"baseURL"},{"kind":"text","text":": "},{"preciseIdentifier":"s:10Foundation3URLV","kind":"typeIdentifier","text":"URL"},{"kind":"text","text":", "},{"kind":"externalParam","text":"operationID"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":", "},{"kind":"externalParam","text":"next"},{"kind":"text","text":": ("},{"preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","kind":"typeIdentifier","text":"HTTPRequest"},{"kind":"text","text":", "},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier","text":"HTTPBody"},{"kind":"text","text":"?, "},{"preciseIdentifier":"s:10Foundation3URLV","kind":"typeIdentifier","text":"URL"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ("},{"preciseIdentifier":"s:9HTTPTypes12HTTPResponseV","kind":"typeIdentifier","text":"HTTPResponse"},{"kind":"text","text":", "},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier","text":"HTTPBody"},{"kind":"text","text":"?)) "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ("},{"preciseIdentifier":"s:9HTTPTypes12HTTPResponseV","kind":"typeIdentifier","text":"HTTPResponse"},{"kind":"text","text":", "},{"preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","kind":"typeIdentifier","text":"HTTPBody"},{"kind":"text","text":"?)"}],"role":"symbol","url":"\/documentation\/marvelservice\/authmiddleware\/intercept(_:body:baseurl:operationid:next:)","kind":"symbol","type":"topic","title":"intercept(_:body:baseURL:operationID:next:)","abstract":[],"identifier":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware\/intercept(_:body:baseURL:operationID:next:)"},"doc://MarvelService/documentation/MarvelService/AuthMiddleware":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AuthMiddleware"}],"role":"symbol","url":"\/documentation\/marvelservice\/authmiddleware","kind":"symbol","type":"topic","title":"AuthMiddleware","abstract":[{"type":"text","text":"A middleware that attaches the necessary authentication parameters to the path of the request."}],"identifier":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware","navigatorTitle":[{"kind":"identifier","text":"AuthMiddleware"}]},"doc://MarvelService/documentation/MarvelService":{"kind":"symbol","identifier":"doc:\/\/MarvelService\/documentation\/MarvelService","role":"collection","abstract":[{"type":"text","text":"A library that allows the developer to interact with the "},{"type":"strong","inlineContent":[{"type":"text","text":"Marvel Comics API"}]},{"type":"text","text":" backend service."}],"url":"\/documentation\/marvelservice","type":"topic","title":"MarvelService"}}}
@@ -1 +1 @@
{"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"apiKey","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":")","kind":"text"}],"languages":["swift"]}],"kind":"declarations"},{"kind":"parameters","parameters":[{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"A Marvel API key."}]}],"name":"apiKey"}]},{"kind":"content","content":[{"type":"heading","anchor":"discussion","level":2,"text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"The middleware attaches the required "},{"code":"apikey","type":"codeVoice"},{"type":"text","text":" parameter to the URI path of the intercepted request."},{"type":"text","text":" "},{"type":"text","text":"This initializer should be used for client-side applications, as indicated in the "},{"isActive":true,"type":"reference","identifier":"https:\/\/developer.marvel.com\/documentation\/authorization"}]}]}],"schemaVersion":{"patch":0,"minor":3,"major":0},"hierarchy":{"paths":[["doc:\/\/MarvelService\/documentation\/MarvelService","doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware"]]},"abstract":[{"type":"text","text":"Initializes this middleware with an api key."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/marvelservice\/authmiddleware\/init(apikey:)"]}],"kind":"symbol","sections":[],"metadata":{"title":"init(apiKey:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"apiKey"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":")"}],"role":"symbol","externalID":"s:13MarvelService14AuthMiddlewareV6apiKeyACSS_tcfc","roleHeading":"Initializer","symbolKind":"init","modules":[{"name":"MarvelService"}]},"identifier":{"url":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware\/init(apiKey:)","interfaceLanguage":"swift"},"references":{"doc://MarvelService/documentation/MarvelService/AuthMiddleware":{"abstract":[{"text":"A middleware that attaches the necessary authentication parameters to the path of the request.","type":"text"}],"role":"symbol","identifier":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware","navigatorTitle":[{"text":"AuthMiddleware","kind":"identifier"}],"title":"AuthMiddleware","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AuthMiddleware","kind":"identifier"}],"kind":"symbol","type":"topic","url":"\/documentation\/marvelservice\/authmiddleware"},"doc://MarvelService/documentation/MarvelService":{"identifier":"doc:\/\/MarvelService\/documentation\/MarvelService","kind":"symbol","url":"\/documentation\/marvelservice","title":"MarvelService","role":"collection","abstract":[{"text":"A library that allows the developer to interact with the ","type":"text"},{"type":"strong","inlineContent":[{"text":"Marvel Comics API","type":"text"}]},{"type":"text","text":" backend service."}],"type":"topic"},"https://developer.marvel.com/documentation/authorization":{"type":"link","url":"https:\/\/developer.marvel.com\/documentation\/authorization","identifier":"https:\/\/developer.marvel.com\/documentation\/authorization","title":"Marvel API documentation","titleInlineContent":[{"text":"Marvel API documentation","type":"text"}]},"doc://MarvelService/documentation/MarvelService/AuthMiddleware/init(apiKey:)":{"abstract":[{"type":"text","text":"Initializes this middleware with an api key."}],"role":"symbol","identifier":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware\/init(apiKey:)","title":"init(apiKey:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"apiKey"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"text":")","kind":"text"}],"kind":"symbol","url":"\/documentation\/marvelservice\/authmiddleware\/init(apikey:)","type":"topic"}}}
{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"apiKey","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":")","kind":"text"}],"platforms":["macOS"]}]},{"kind":"parameters","parameters":[{"name":"apiKey","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"A Marvel API key."}]}]}]},{"kind":"content","content":[{"level":2,"type":"heading","anchor":"discussion","text":"Discussion"},{"type":"paragraph","inlineContent":[{"text":"The middleware attaches the required ","type":"text"},{"type":"codeVoice","code":"apikey"},{"text":" parameter to the URI path of the intercepted request.","type":"text"},{"text":" ","type":"text"},{"text":"This initializer should be used for client-side applications, as indicated in the ","type":"text"},{"type":"reference","isActive":true,"identifier":"https:\/\/developer.marvel.com\/documentation\/authorization"}]}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware\/init(apiKey:)"},"abstract":[{"type":"text","text":"Initializes this middleware with an api key."}],"variants":[{"paths":["\/documentation\/marvelservice\/authmiddleware\/init(apikey:)"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/MarvelService\/documentation\/MarvelService","doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware"]]},"metadata":{"roleHeading":"Initializer","externalID":"s:13MarvelService14AuthMiddlewareV6apiKeyACSS_tcfc","role":"symbol","symbolKind":"init","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"apiKey","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"String","preciseIdentifier":"s:SS","kind":"typeIdentifier"},{"text":")","kind":"text"}],"title":"init(apiKey:)","modules":[{"name":"MarvelService"}]},"schemaVersion":{"minor":3,"major":0,"patch":0},"references":{"doc://MarvelService/documentation/MarvelService/AuthMiddleware":{"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AuthMiddleware"}],"role":"symbol","url":"\/documentation\/marvelservice\/authmiddleware","kind":"symbol","type":"topic","title":"AuthMiddleware","abstract":[{"type":"text","text":"A middleware that attaches the necessary authentication parameters to the path of the request."}],"identifier":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware","navigatorTitle":[{"kind":"identifier","text":"AuthMiddleware"}]},"doc://MarvelService/documentation/MarvelService":{"kind":"symbol","identifier":"doc:\/\/MarvelService\/documentation\/MarvelService","role":"collection","abstract":[{"type":"text","text":"A library that allows the developer to interact with the "},{"type":"strong","inlineContent":[{"type":"text","text":"Marvel Comics API"}]},{"type":"text","text":" backend service."}],"url":"\/documentation\/marvelservice","type":"topic","title":"MarvelService"},"https://developer.marvel.com/documentation/authorization":{"titleInlineContent":[{"type":"text","text":"Marvel API documentation"}],"url":"https:\/\/developer.marvel.com\/documentation\/authorization","identifier":"https:\/\/developer.marvel.com\/documentation\/authorization","title":"Marvel API documentation","type":"link"},"doc://MarvelService/documentation/MarvelService/AuthMiddleware/init(apiKey:)":{"url":"\/documentation\/marvelservice\/authmiddleware\/init(apikey:)","role":"symbol","identifier":"doc:\/\/MarvelService\/documentation\/MarvelService\/AuthMiddleware\/init(apiKey:)","abstract":[{"type":"text","text":"Initializes this middleware with an api key."}],"fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"apiKey","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"String","kind":"typeIdentifier","preciseIdentifier":"s:SS"},{"text":")","kind":"text"}],"kind":"symbol","type":"topic","title":"init(apiKey:)"}}}
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More