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