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
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
{"kind":"article","schemaVersion":{"major":0,"minor":3,"patch":0},"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/Equatable-Implementations","interfaceLanguage":"swift"},"metadata":{"title":"Equatable Implementations","modules":[{"name":"DiscogsService"}],"roleHeading":"API Collection","role":"collectionGroup"},"variants":[{"paths":["\/documentation\/discogsservice\/operations\/getreleaserating\/output\/equatable-implementations"],"traits":[{"interfaceLanguage":"swift"}]}],"sections":[],"topicSections":[{"title":"Operators","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/!=(_:_:)"],"anchor":"Operators","generated":true}],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output"]]},"references":{"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating/Output/!=(_:_:)":{"abstract":[{"type":"text","text":"Returns a Boolean value indicating whether two values are not equal."}],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/!=(_:_:)","role":"symbol","title":"!=(_:_:)","type":"topic","url":"\/documentation\/discogsservice\/operations\/getreleaserating\/output\/!=(_:_:)","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Bool","preciseIdentifier":"s:Sb","kind":"typeIdentifier"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating/Output":{"abstract":[],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output","role":"symbol","title":"Operations.getReleaseRating.Output","navigatorTitle":[{"text":"Output","kind":"identifier"}],"type":"topic","url":"\/documentation\/discogsservice\/operations\/getreleaserating\/output","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}]},"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/Operations":{"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Operations","kind":"identifier"}],"role":"symbol","navigatorTitle":[{"text":"Operations","kind":"identifier"}],"title":"Operations","abstract":[{"text":"API operations, with input and output types, generated from ","type":"text"},{"type":"codeVoice","code":"#\/paths"},{"type":"text","text":" in the OpenAPI document."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"symbol","type":"topic","url":"\/documentation\/discogsservice\/operations"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating":{"abstract":[{"text":"Get information about a rating of release.","type":"text"}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"getReleaseRating"}],"url":"\/documentation\/discogsservice\/operations\/getreleaserating","title":"Operations.getReleaseRating","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"getReleaseRating"}]}}}
|
||||
{"metadata":{"modules":[{"name":"DiscogsService"}],"roleHeading":"API Collection","title":"Equatable Implementations","role":"collectionGroup"},"schemaVersion":{"major":0,"minor":3,"patch":0},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output"]]},"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/Equatable-Implementations"},"topicSections":[{"identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/!=(_:_:)"],"generated":true,"title":"Operators","anchor":"Operators"}],"kind":"article","variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/operations\/getreleaserating\/output\/equatable-implementations"]}],"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/Operations":{"type":"topic","title":"Operations","navigatorTitle":[{"text":"Operations","kind":"identifier"}],"abstract":[{"type":"text","text":"API operations, with input and output types, generated from "},{"type":"codeVoice","code":"#\/paths"},{"type":"text","text":" in the OpenAPI document."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","role":"symbol","url":"\/documentation\/discogsservice\/operations","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Operations","kind":"identifier"}],"kind":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating/Output/!=(_:_:)":{"title":"!=(_:_:)","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/!=(_:_:)","abstract":[{"type":"text","text":"Returns a Boolean value indicating whether two values are not equal."}],"fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"text":" ","kind":"text"},{"text":"(","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"preciseIdentifier":"s:Sb","text":"Bool","kind":"typeIdentifier"}],"role":"symbol","type":"topic","url":"\/documentation\/discogsservice\/operations\/getreleaserating\/output\/!=(_:_:)"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating":{"type":"topic","kind":"symbol","navigatorTitle":[{"text":"getReleaseRating","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating","abstract":[{"type":"text","text":"Get information about a rating of release."}],"role":"symbol","url":"\/documentation\/discogsservice\/operations\/getreleaserating","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getReleaseRating","kind":"identifier"}],"title":"Operations.getReleaseRating"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating/Output":{"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output","type":"topic","url":"\/documentation\/discogsservice\/operations\/getreleaserating\/output","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"Output","kind":"identifier"}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"title":"Operations.getReleaseRating.Output"}}}
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
@@ -1 +1 @@
|
||||
{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/operations\/getreleaserating\/output\/ok-swift.struct\/equatable-implementations"]}],"schemaVersion":{"minor":3,"patch":0,"major":0},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/Ok-swift.struct\/Equatable-Implementations"},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/Ok-swift.struct"]]},"sections":[],"topicSections":[{"title":"Operators","generated":true,"anchor":"Operators","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/Ok-swift.struct\/!=(_:_:)"]}],"kind":"article","metadata":{"title":"Equatable Implementations","role":"collectionGroup","roleHeading":"API Collection","modules":[{"name":"DiscogsService"}]},"references":{"doc://DiscogsService/documentation/DiscogsService/Operations":{"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Operations","kind":"identifier"}],"role":"symbol","navigatorTitle":[{"text":"Operations","kind":"identifier"}],"title":"Operations","abstract":[{"text":"API operations, with input and output types, generated from ","type":"text"},{"type":"codeVoice","code":"#\/paths"},{"type":"text","text":" in the OpenAPI document."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"symbol","type":"topic","url":"\/documentation\/discogsservice\/operations"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating/Output":{"abstract":[],"kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output","role":"symbol","title":"Operations.getReleaseRating.Output","navigatorTitle":[{"text":"Output","kind":"identifier"}],"type":"topic","url":"\/documentation\/discogsservice\/operations\/getreleaserating\/output","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}]},"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/Operations/getReleaseRating":{"abstract":[{"text":"Get information about a rating of release.","type":"text"}],"fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"getReleaseRating"}],"url":"\/documentation\/discogsservice\/operations\/getreleaserating","title":"Operations.getReleaseRating","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"getReleaseRating"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating/Output/Ok-swift.struct":{"abstract":[],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Ok","kind":"identifier"}],"url":"\/documentation\/discogsservice\/operations\/getreleaserating\/output\/ok-swift.struct","title":"Operations.getReleaseRating.Output.Ok","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/Ok-swift.struct","kind":"symbol","type":"topic","navigatorTitle":[{"text":"Ok","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating/Output/Ok-swift.struct/!=(_:_:)":{"title":"!=(_:_:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/Ok-swift.struct\/!=(_:_:)","abstract":[{"text":"Returns a Boolean value indicating whether two values are not equal.","type":"text"}],"type":"topic","fragments":[{"kind":"keyword","text":"static"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"!="},{"kind":"text","text":" "},{"kind":"text","text":"("},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":", "},{"kind":"typeIdentifier","text":"Self"},{"kind":"text","text":") -> "},{"kind":"typeIdentifier","preciseIdentifier":"s:Sb","text":"Bool"}],"role":"symbol","url":"\/documentation\/discogsservice\/operations\/getreleaserating\/output\/ok-swift.struct\/!=(_:_:)","kind":"symbol"}}}
|
||||
{"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/Ok-swift.struct"]]},"metadata":{"roleHeading":"API Collection","role":"collectionGroup","title":"Equatable Implementations","modules":[{"name":"DiscogsService"}]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/operations\/getreleaserating\/output\/ok-swift.struct\/equatable-implementations"]}],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/Ok-swift.struct\/Equatable-Implementations","interfaceLanguage":"swift"},"topicSections":[{"generated":true,"identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/Ok-swift.struct\/!=(_:_:)"],"anchor":"Operators","title":"Operators"}],"sections":[],"schemaVersion":{"patch":0,"major":0,"minor":3},"kind":"article","references":{"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating/Output/Ok-swift.struct/!=(_:_:)":{"abstract":[{"type":"text","text":"Returns a Boolean value indicating whether two values are not equal."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/Ok-swift.struct\/!=(_:_:)","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice\/operations\/getreleaserating\/output\/ok-swift.struct\/!=(_:_:)","role":"symbol","fragments":[{"text":"static","kind":"keyword"},{"text":" ","kind":"text"},{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"!=","kind":"identifier"},{"text":" ","kind":"text"},{"kind":"text","text":"("},{"text":"Self","kind":"typeIdentifier"},{"kind":"text","text":", "},{"text":"Self","kind":"typeIdentifier"},{"text":") -> ","kind":"text"},{"text":"Bool","kind":"typeIdentifier","preciseIdentifier":"s:Sb"}],"title":"!=(_:_:)"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating/Output/Ok-swift.struct":{"role":"symbol","title":"Operations.getReleaseRating.Output.Ok","kind":"symbol","type":"topic","abstract":[],"navigatorTitle":[{"text":"Ok","kind":"identifier"}],"url":"\/documentation\/discogsservice\/operations\/getreleaserating\/output\/ok-swift.struct","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output\/Ok-swift.struct","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Ok","kind":"identifier"}]},"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/Operations/getReleaseRating/Output":{"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating\/Output","type":"topic","url":"\/documentation\/discogsservice\/operations\/getreleaserating\/output","kind":"symbol","role":"symbol","navigatorTitle":[{"text":"Output","kind":"identifier"}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"title":"Operations.getReleaseRating.Output"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseRating":{"type":"topic","kind":"symbol","navigatorTitle":[{"text":"getReleaseRating","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseRating","abstract":[{"type":"text","text":"Get information about a rating of release."}],"role":"symbol","url":"\/documentation\/discogsservice\/operations\/getreleaserating","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getReleaseRating","kind":"identifier"}],"title":"Operations.getReleaseRating"},"doc://DiscogsService/documentation/DiscogsService/Operations":{"type":"topic","title":"Operations","navigatorTitle":[{"text":"Operations","kind":"identifier"}],"abstract":[{"type":"text","text":"API operations, with input and output types, generated from "},{"type":"codeVoice","code":"#\/paths"},{"type":"text","text":" in the OpenAPI document."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","role":"symbol","url":"\/documentation\/discogsservice\/operations","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Operations","kind":"identifier"}],"kind":"symbol"}}}
|
||||
+1
-1
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user