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>
This commit was merged in pull request #6.
This commit is contained in:
2025-10-13 00:54:17 +00:00
committed by Javier Cicchelli
parent 24d703b967
commit 791ebf4f78
1988 changed files with 2882 additions and 2010 deletions
@@ -0,0 +1 @@
{"sections":[],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/InputValidationError"]]},"abstract":[{"text":"An input does not comply with the consumer key requirements.","type":"text"}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/inputvalidationerror\/inputnotconsumerkey"]}],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/InputValidationError\/inputNotConsumerKey","interfaceLanguage":"swift"},"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"symbol","metadata":{"externalID":"s:14DiscogsService20InputValidationErrorO19inputNotConsumerKeyyA2CmF","role":"symbol","symbolKind":"case","roleHeading":"Case","modules":[{"name":"DiscogsService"}],"fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"inputNotConsumerKey","kind":"identifier"}],"title":"InputValidationError.inputNotConsumerKey"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"inputNotConsumerKey","kind":"identifier"}],"platforms":["macOS"],"languages":["swift"]}]}],"references":{"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/InputValidationError/inputNotConsumerKey":{"abstract":[{"text":"An input does not comply with the consumer key requirements.","type":"text"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/InputValidationError\/inputNotConsumerKey","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice\/inputvalidationerror\/inputnotconsumerkey","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"inputNotConsumerKey"}],"title":"InputValidationError.inputNotConsumerKey"},"doc://DiscogsService/documentation/DiscogsService/InputValidationError":{"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/InputValidationError","abstract":[{"type":"text","text":"A representation of all the possible validation error that could be thrown while validating an input."}],"navigatorTitle":[{"text":"InputValidationError","kind":"identifier"}],"type":"topic","kind":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"InputValidationError","kind":"identifier"}],"title":"InputValidationError","url":"\/documentation\/discogsservice\/inputvalidationerror"}}}