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:
@@ -1 +1 @@
|
||||
{"abstract":[{"type":"text","text":"A number of items to return per page."}],"schemaVersion":{"patch":0,"major":0,"minor":3},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Parameters\/PerPage"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"kind":"identifier","text":"PerPage"},{"kind":"text","text":" = "},{"preciseIdentifier":"s:Si","kind":"typeIdentifier","text":"Int"}],"platforms":["macOS"],"languages":["swift"]}]},{"kind":"content","content":[{"level":2,"anchor":"discussion","type":"heading","text":"Discussion"},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Generated from "},{"code":"#\/components\/parameters\/PerPage","type":"codeVoice"},{"type":"text","text":"."}]}],"type":"aside","style":"note","name":"Remark"}]}],"sections":[],"kind":"symbol","hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Parameters"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/components\/parameters\/perpage"]}],"metadata":{"roleHeading":"Type Alias","role":"symbol","title":"Components.Parameters.PerPage","navigatorTitle":[{"kind":"identifier","text":"PerPage"}],"modules":[{"name":"DiscogsService"}],"externalID":"s:14DiscogsService10ComponentsO10ParametersO7PerPagea","symbolKind":"typealias","fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"PerPage","kind":"identifier"}]},"references":{"doc://DiscogsService/documentation/DiscogsService":{"role":"collection","title":"DiscogsService","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","abstract":[],"type":"topic","url":"\/documentation\/discogsservice"},"doc://DiscogsService/documentation/DiscogsService/Components/Parameters/PerPage":{"title":"Components.Parameters.PerPage","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Parameters\/PerPage","role":"symbol","navigatorTitle":[{"kind":"identifier","text":"PerPage"}],"kind":"symbol","type":"topic","url":"\/documentation\/discogsservice\/components\/parameters\/perpage","fragments":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"kind":"identifier","text":"PerPage"}],"abstract":[{"text":"A number of items to return per page.","type":"text"}]},"doc://DiscogsService/documentation/DiscogsService/Components/Parameters":{"kind":"symbol","role":"symbol","url":"\/documentation\/discogsservice\/components\/parameters","navigatorTitle":[{"text":"Parameters","kind":"identifier"}],"title":"Components.Parameters","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Parameters","kind":"identifier"}],"abstract":[{"type":"text","text":"Types generated from the "},{"code":"#\/components\/parameters","type":"codeVoice"},{"text":" section of the OpenAPI document.","type":"text"}],"type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Parameters"},"doc://DiscogsService/documentation/DiscogsService/Components":{"title":"Components","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","navigatorTitle":[{"text":"Components","kind":"identifier"}],"abstract":[{"type":"text","text":"Types generated from the components section of the OpenAPI document."}],"type":"topic","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Components","kind":"identifier"}],"role":"symbol","url":"\/documentation\/discogsservice\/components","kind":"symbol"}}}
|
||||
{"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Parameters"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"kind":"identifier","text":"PerPage"},{"kind":"text","text":" = "},{"kind":"typeIdentifier","text":"Int","preciseIdentifier":"s:Si"}],"platforms":["macOS"]}]},{"kind":"content","content":[{"anchor":"discussion","type":"heading","text":"Discussion","level":2},{"content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Generated from "},{"type":"codeVoice","code":"#\/components\/parameters\/PerPage"},{"type":"text","text":"."}]}],"style":"note","name":"Remark","type":"aside"}]}],"metadata":{"symbolKind":"typealias","navigatorTitle":[{"text":"PerPage","kind":"identifier"}],"modules":[{"name":"DiscogsService"}],"roleHeading":"Type Alias","role":"symbol","fragments":[{"text":"typealias","kind":"keyword"},{"text":" ","kind":"text"},{"text":"PerPage","kind":"identifier"}],"externalID":"s:14DiscogsService10ComponentsO10ParametersO7PerPagea","title":"Components.Parameters.PerPage"},"variants":[{"paths":["\/documentation\/discogsservice\/components\/parameters\/perpage"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Parameters\/PerPage"},"abstract":[{"type":"text","text":"A number of items to return per page."}],"sections":[],"schemaVersion":{"minor":3,"major":0,"patch":0},"kind":"symbol","references":{"doc://DiscogsService/documentation/DiscogsService/Components":{"role":"symbol","title":"Components","kind":"symbol","type":"topic","abstract":[{"type":"text","text":"Types generated from the components section of the OpenAPI document."}],"navigatorTitle":[{"kind":"identifier","text":"Components"}],"url":"\/documentation\/discogsservice\/components","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Components"}]},"doc://DiscogsService/documentation/DiscogsService/Components/Parameters":{"type":"topic","title":"Components.Parameters","navigatorTitle":[{"text":"Parameters","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Parameters","abstract":[{"text":"Types generated from the ","type":"text"},{"code":"#\/components\/parameters","type":"codeVoice"},{"text":" section of the OpenAPI document.","type":"text"}],"role":"symbol","url":"\/documentation\/discogsservice\/components\/parameters","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Parameters","kind":"identifier"}],"kind":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Components/Parameters/PerPage":{"title":"Components.Parameters.PerPage","navigatorTitle":[{"text":"PerPage","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Parameters\/PerPage","kind":"symbol","abstract":[{"text":"A number of items to return per page.","type":"text"}],"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"typealias"},{"kind":"text","text":" "},{"kind":"identifier","text":"PerPage"}],"url":"\/documentation\/discogsservice\/components\/parameters\/perpage"},"doc://DiscogsService/documentation/DiscogsService":{"title":"DiscogsService","role":"collection","abstract":[],"kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","url":"\/documentation\/discogsservice"}}}
|
||||
Reference in New Issue
Block a user