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