791ebf4f78
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>
1 line
9.4 KiB
JSON
1 line
9.4 KiB
JSON
{"schemaVersion":{"minor":3,"patch":0,"major":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/components\/schemas\/artistresult\/init(value1:value2:)"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/ArtistResult\/init(value1:value2:)"},"kind":"symbol","metadata":{"externalID":"s:14DiscogsService10ComponentsO7SchemasO12ArtistResultV6value16value2AgE06SearchF0V_AG13Value2PayloadVtcfc","symbolKind":"init","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"value1","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Components","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO"},{"text":".","kind":"text"},{"text":"Schemas","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO"},{"text":".","kind":"text"},{"text":"SearchResult","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO12SearchResultV"},{"text":", ","kind":"text"},{"text":"value2","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Components","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO"},{"text":".","kind":"text"},{"text":"Schemas","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO"},{"text":".","kind":"text"},{"text":"ArtistResult","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO12ArtistResultV"},{"text":".","kind":"text"},{"text":"Value2Payload","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO12ArtistResultV13Value2PayloadV"},{"text":")","kind":"text"}],"title":"init(value1:value2:)","roleHeading":"Initializer","role":"symbol","modules":[{"name":"DiscogsService"}]},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/ArtistResult"]]},"abstract":[{"type":"text","text":"Creates a new "},{"type":"codeVoice","code":"ArtistResult"},{"type":"text","text":"."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"value1","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Components","preciseIdentifier":"s:14DiscogsService10ComponentsO","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components"},{"text":".","kind":"text"},{"text":"Schemas","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas"},{"text":".","kind":"text"},{"text":"SearchResult","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO12SearchResultV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/SearchResult"},{"text":", ","kind":"text"},{"text":"value2","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Components","preciseIdentifier":"s:14DiscogsService10ComponentsO","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components"},{"text":".","kind":"text"},{"text":"Schemas","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas"},{"text":".","kind":"text"},{"text":"ArtistResult","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO12ArtistResultV","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/ArtistResult"},{"text":".","kind":"text"},{"text":"Value2Payload","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO12ArtistResultV13Value2PayloadV","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/ArtistResult\/Value2Payload"},{"text":")","kind":"text"}],"platforms":["macOS"],"languages":["swift"]}]},{"parameters":[{"content":[{"inlineContent":[{"type":"text","text":""}],"type":"paragraph"}],"name":"value1"},{"content":[{"inlineContent":[{"type":"text","text":""}],"type":"paragraph"}],"name":"value2"}],"kind":"parameters"}],"sections":[],"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/Schemas/SearchResult":{"navigatorTitle":[{"text":"SearchResult","kind":"identifier"}],"role":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"SearchResult","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/SearchResult","title":"Components.Schemas.SearchResult","abstract":[{"type":"text","text":"A type that represents a search result."}],"type":"topic","kind":"symbol","url":"\/documentation\/discogsservice\/components\/schemas\/searchresult"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/ArtistResult/init(value1:value2:)":{"role":"symbol","title":"init(value1:value2:)","kind":"symbol","type":"topic","abstract":[{"text":"Creates a new ","type":"text"},{"code":"ArtistResult","type":"codeVoice"},{"type":"text","text":"."}],"url":"\/documentation\/discogsservice\/components\/schemas\/artistresult\/init(value1:value2:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/ArtistResult\/init(value1:value2:)","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"text":"value1","kind":"externalParam"},{"kind":"text","text":": "},{"text":"Components","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO"},{"text":".","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO","text":"Schemas"},{"kind":"text","text":"."},{"text":"SearchResult","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO12SearchResultV"},{"text":", ","kind":"text"},{"kind":"externalParam","text":"value2"},{"text":": ","kind":"text"},{"text":"Components","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO"},{"text":".","kind":"text"},{"text":"Schemas","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO"},{"text":".","kind":"text"},{"text":"ArtistResult","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO12ArtistResultV"},{"text":".","kind":"text"},{"text":"Value2Payload","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO12ArtistResultV13Value2PayloadV"},{"kind":"text","text":")"}]},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas":{"navigatorTitle":[{"text":"Schemas","kind":"identifier"}],"role":"symbol","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Schemas"}],"title":"Components.Schemas","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas","abstract":[{"type":"text","text":"Types generated from the "},{"type":"codeVoice","code":"#\/components\/schemas"},{"type":"text","text":" section of the OpenAPI document."}],"type":"topic","url":"\/documentation\/discogsservice\/components\/schemas","kind":"symbol"},"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/Components/Schemas/ArtistResult/Value2Payload":{"role":"symbol","title":"Components.Schemas.ArtistResult.Value2Payload","kind":"symbol","type":"topic","abstract":[],"navigatorTitle":[{"text":"Value2Payload","kind":"identifier"}],"url":"\/documentation\/discogsservice\/components\/schemas\/artistresult\/value2payload","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/ArtistResult\/Value2Payload","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Value2Payload","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/ArtistResult":{"role":"symbol","title":"Components.Schemas.ArtistResult","kind":"symbol","type":"topic","abstract":[{"type":"text","text":"A type that represents an artist search result."}],"navigatorTitle":[{"text":"ArtistResult","kind":"identifier"}],"url":"\/documentation\/discogsservice\/components\/schemas\/artistresult","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/ArtistResult","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"ArtistResult","kind":"identifier"}]}}} |