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
{"metadata":{"modules":[{"name":"DiscogsService"}],"title":"json","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"},{"text":".","kind":"text"},{"text":"ServiceError","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO0B5ErrorV","kind":"typeIdentifier"}],"roleHeading":"Instance Property","externalID":"s:14DiscogsService10ComponentsO9ResponsesO8NotFoundV4BodyO4jsonAC7SchemasO0B5ErrorVvp","role":"symbol","symbolKind":"property"},"kind":"symbol","schemaVersion":{"patch":0,"major":0,"minor":3},"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":"."}],"sections":[],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/NotFound","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/NotFound\/Body-swift.enum"]]},"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"tokens":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"json","kind":"identifier"},{"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":"ServiceError","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO0B5ErrorV","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/ServiceError"},{"text":" { ","kind":"text"},{"text":"get","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" }","kind":"text"}],"platforms":["macOS"]}]},{"kind":"content","content":[{"type":"heading","text":"Discussion","anchor":"discussion","level":2},{"type":"aside","name":"Throws","style":"note","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":"See Also","style":"note","content":[{"inlineContent":[{"type":"text","text":""},{"code":".json","type":"codeVoice"},{"type":"text","text":"."}],"type":"paragraph"}]}]}],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/NotFound\/Body-swift.enum\/json","interfaceLanguage":"swift"},"variants":[{"paths":["\/documentation\/discogsservice\/components\/responses\/notfound\/body-swift.enum\/json"],"traits":[{"interfaceLanguage":"swift"}]}],"references":{"doc://DiscogsService/documentation/DiscogsService/Components/Responses/NotFound":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/NotFound","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"NotFound"}],"url":"\/documentation\/discogsservice\/components\/responses\/notfound","type":"topic","role":"symbol","abstract":[],"title":"Components.Responses.NotFound","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"NotFound"}]},"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":{"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/NotFound/Body-swift.enum":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/NotFound\/Body-swift.enum","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Body"}],"url":"\/documentation\/discogsservice\/components\/responses\/notfound\/body-swift.enum","type":"topic","role":"symbol","abstract":[],"title":"Components.Responses.NotFound.Body","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Body"}]},"doc://DiscogsService/documentation/DiscogsService/Components/Responses/NotFound/Body-swift.enum/json":{"url":"\/documentation\/discogsservice\/components\/responses\/notfound\/body-swift.enum\/json","title":"json","type":"topic","kind":"symbol","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"},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO","text":"Schemas"},{"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 "},{"type":"codeVoice","code":".json"},{"type":"text","text":"."}],"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Responses\/NotFound\/Body-swift.enum\/json"},"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/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/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"}}} |