Files
discogs-service/docs/data/documentation/discogsservice/authmiddleware/clientmiddleware-implementations.json
T
javier 791ebf4f78 Implemented the User Agent middleware (#6)
This PR contains the work done to implement the `UserAgentMiddleware` middleware that includes user agent information into a header of the requests sent by the `Client` type, as defined in the [Discogs documentation](https://www.discogs.com/developers/#page:home,header:home-general-information). For this purpose, the `CamelCaseValidationRule`, `SemanticVersionValidationRule` and `URLValidationRule` types were implemented and integrated into the existing `ValidateInputUseCase` type.

Reviewed-on: #6
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-13 00:54:17 +00:00

1 line
4.1 KiB
JSON

{"metadata":{"modules":[{"name":"DiscogsService"}],"roleHeading":"API Collection","title":"ClientMiddleware Implementations","role":"collectionGroup"},"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthMiddleware\/ClientMiddleware-Implementations","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/discogsservice\/authmiddleware\/clientmiddleware-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"article","sections":[],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthMiddleware"]]},"topicSections":[{"generated":true,"anchor":"Instance-Methods","title":"Instance Methods","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthMiddleware\/intercept(_:body:baseURL:operationID:next:)"]}],"references":{"doc://DiscogsService/documentation/DiscogsService/AuthMiddleware":{"abstract":[{"type":"text","text":"A middleware that attaches any defined authentication credentials into the requests to the service."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthMiddleware","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice\/authmiddleware","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"AuthMiddleware"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AuthMiddleware"}],"title":"AuthMiddleware"},"doc://DiscogsService/documentation/DiscogsService":{"title":"DiscogsService","role":"collection","abstract":[],"kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","url":"\/documentation\/discogsservice"},"doc://DiscogsService/documentation/DiscogsService/AuthMiddleware/intercept(_:body:baseURL:operationID:next:)":{"type":"topic","title":"intercept(_:body:baseURL:operationID:next:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/AuthMiddleware\/intercept(_:body:baseURL:operationID:next:)","abstract":[],"role":"symbol","url":"\/documentation\/discogsservice\/authmiddleware\/intercept(_:body:baseurl:operationid:next:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"intercept"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","text":"HTTPRequest"},{"kind":"text","text":", "},{"kind":"externalParam","text":"body"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"baseURL"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation3URLV","text":"URL"},{"kind":"text","text":", "},{"kind":"externalParam","text":"operationID"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":", "},{"kind":"externalParam","text":"next"},{"kind":"text","text":": ("},{"kind":"typeIdentifier","preciseIdentifier":"s:9HTTPTypes11HTTPRequestV","text":"HTTPRequest"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody"},{"kind":"text","text":"?, "},{"kind":"typeIdentifier","preciseIdentifier":"s:10Foundation3URLV","text":"URL"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ("},{"kind":"typeIdentifier","preciseIdentifier":"s:9HTTPTypes12HTTPResponseV","text":"HTTPResponse"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody"},{"kind":"text","text":"?)) "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> ("},{"kind":"typeIdentifier","preciseIdentifier":"s:9HTTPTypes12HTTPResponseV","text":"HTTPResponse"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:14OpenAPIRuntime8HTTPBodyC","text":"HTTPBody"},{"kind":"text","text":"?)"}],"kind":"symbol"}}}