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
6.8 KiB
JSON
1 line
6.8 KiB
JSON
{"metadata":{"symbolKind":"init","modules":[{"name":"DiscogsService"}],"roleHeading":"Initializer","role":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"body","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Components","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO"},{"text":".","kind":"text"},{"text":"Responses","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO"},{"text":".","kind":"text"},{"text":"Unauthorized","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO12UnauthorizedV"},{"text":".","kind":"text"},{"text":"Body","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO12UnauthorizedV4BodyO"},{"text":")","kind":"text"}],"externalID":"s:14DiscogsService10ComponentsO9ResponsesO12UnauthorizedV4bodyA2G4BodyO_tcfc","title":"init(body:)"},"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/Unauthorized\/init(body:)","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Creates a new "},{"type":"codeVoice","code":"Unauthorized"},{"type":"text","text":"."}],"variants":[{"paths":["\/documentation\/discogsservice\/components\/responses\/unauthorized\/init(body:)"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","sections":[],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/Unauthorized"]]},"primaryContentSections":[{"declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"body","kind":"externalParam"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","text":"Components","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses","text":"Responses","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/Unauthorized","text":"Unauthorized","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO12UnauthorizedV"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/Unauthorized\/Body-swift.enum","text":"Body","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO12UnauthorizedV4BodyO"},{"text":")","kind":"text"}]}],"kind":"declarations"},{"parameters":[{"name":"body","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Received HTTP response body"}]}]}],"kind":"parameters"}],"references":{"doc://DiscogsService/documentation/DiscogsService/Components/Responses/Unauthorized/Body-swift.enum":{"url":"\/documentation\/discogsservice\/components\/responses\/unauthorized\/body-swift.enum","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Body","kind":"identifier"}],"navigatorTitle":[{"text":"Body","kind":"identifier"}],"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/Unauthorized\/Body-swift.enum","title":"Components.Responses.Unauthorized.Body","type":"topic","kind":"symbol","role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Components/Responses":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Responses"}],"url":"\/documentation\/discogsservice\/components\/responses","type":"topic","role":"symbol","abstract":[{"type":"text","text":"Types generated from the "},{"type":"codeVoice","code":"#\/components\/responses"},{"type":"text","text":" section of the OpenAPI document."}],"title":"Components.Responses","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Responses"}]},"doc://DiscogsService/documentation/DiscogsService/Components/Responses/Unauthorized/init(body:)":{"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/Unauthorized\/init(body:)","abstract":[{"type":"text","text":"Creates a new "},{"type":"codeVoice","code":"Unauthorized"},{"type":"text","text":"."}],"type":"topic","kind":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"body","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Components","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO"},{"text":".","kind":"text"},{"text":"Responses","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO"},{"text":".","kind":"text"},{"text":"Unauthorized","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO12UnauthorizedV"},{"text":".","kind":"text"},{"text":"Body","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO12UnauthorizedV4BodyO"},{"text":")","kind":"text"}],"title":"init(body:)","url":"\/documentation\/discogsservice\/components\/responses\/unauthorized\/init(body:)"},"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/Responses/Unauthorized":{"url":"\/documentation\/discogsservice\/components\/responses\/unauthorized","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Unauthorized","kind":"identifier"}],"navigatorTitle":[{"text":"Unauthorized","kind":"identifier"}],"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/Unauthorized","title":"Components.Responses.Unauthorized","type":"topic","kind":"symbol","role":"symbol"},"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"}]}}} |