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
8.2 KiB
JSON
1 line
8.2 KiB
JSON
{"schemaVersion":{"major":0,"minor":3,"patch":0},"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"json","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10ComponentsO","text":"Components","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas","text":"Schemas","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO0B5ErrorV","text":"ServiceError","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/ServiceError","kind":"typeIdentifier"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" }","kind":"text"}]}]},{"kind":"content","content":[{"type":"heading","anchor":"discussion","level":2,"text":"Discussion"},{"content":[{"inlineContent":[{"type":"text","text":"An error if "},{"code":"self","type":"codeVoice"},{"type":"text","text":" is not "},{"code":".json","type":"codeVoice"},{"type":"text","text":"."}],"type":"paragraph"}],"type":"aside","name":"Throws","style":"note"},{"content":[{"inlineContent":[{"type":"text","text":""},{"code":".json","type":"codeVoice"},{"type":"text","text":"."}],"type":"paragraph"}],"type":"aside","name":"See Also","style":"note"}]}],"sections":[],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/Unavailable\/Body-swift.enum\/json"},"kind":"symbol","metadata":{"modules":[{"name":"DiscogsService"}],"role":"symbol","title":"json","externalID":"s:14DiscogsService10ComponentsO9ResponsesO11UnavailableV4BodyO4jsonAC7SchemasO0B5ErrorVvp","symbolKind":"property","roleHeading":"Instance Property","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"json","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Components","preciseIdentifier":"s:14DiscogsService10ComponentsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Schemas","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO0B5ErrorV","text":"ServiceError"}]},"abstract":[{"type":"text","text":"The associated value of the enum case if "},{"code":"self","type":"codeVoice"},{"type":"text","text":" is "},{"code":".json","type":"codeVoice"},{"type":"text","text":"."}],"variants":[{"paths":["\/documentation\/discogsservice\/components\/responses\/unavailable\/body-swift.enum\/json"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/Unavailable","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/Unavailable\/Body-swift.enum"]]},"references":{"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":{"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":{"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/Components/Responses/Unavailable/Body-swift.enum/json":{"title":"json","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/Unavailable\/Body-swift.enum\/json","kind":"symbol","abstract":[{"type":"text","text":"The associated value of the enum case if "},{"type":"codeVoice","code":"self"},{"type":"text","text":" is "},{"type":"codeVoice","code":".json"},{"type":"text","text":"."}],"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"json"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO","text":"Components"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO","text":"Schemas"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO0B5ErrorV","text":"ServiceError"}],"url":"\/documentation\/discogsservice\/components\/responses\/unavailable\/body-swift.enum\/json"},"doc://DiscogsService/documentation/DiscogsService/Components/Responses/Unavailable/Body-swift.enum":{"url":"\/documentation\/discogsservice\/components\/responses\/unavailable\/body-swift.enum","abstract":[],"title":"Components.Responses.Unavailable.Body","navigatorTitle":[{"text":"Body","kind":"identifier"}],"kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/Unavailable\/Body-swift.enum","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Body","kind":"identifier"}],"role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/ServiceError":{"title":"Components.Schemas.ServiceError","navigatorTitle":[{"text":"ServiceError","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/ServiceError","kind":"symbol","abstract":[{"type":"text","text":"A type that contains any error data."}],"role":"symbol","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"ServiceError","kind":"identifier"}],"url":"\/documentation\/discogsservice\/components\/schemas\/serviceerror"},"doc://DiscogsService/documentation/DiscogsService/Components/Responses/Unavailable":{"url":"\/documentation\/discogsservice\/components\/responses\/unavailable","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Unavailable","kind":"identifier"}],"navigatorTitle":[{"text":"Unavailable","kind":"identifier"}],"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/Unavailable","title":"Components.Responses.Unavailable","type":"topic","kind":"symbol","role":"symbol"},"doc://DiscogsService/documentation/DiscogsService":{"title":"DiscogsService","role":"collection","abstract":[],"kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","url":"\/documentation\/discogsservice"}}} |