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
7.8 KiB
JSON
1 line
7.8 KiB
JSON
{"schemaVersion":{"minor":3,"patch":0,"major":0},"primaryContentSections":[{"declarations":[{"tokens":[{"text":"init","kind":"keyword"},{"text":"(","kind":"text"},{"text":"accept","kind":"externalParam"},{"text":": [","kind":"text"},{"text":"AcceptHeaderContentType","kind":"typeIdentifier","preciseIdentifier":"s:14OpenAPIRuntime23AcceptHeaderContentTypeV"},{"text":"<","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"text":".","kind":"text"},{"text":"getReleaseStats","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats"},{"text":".","kind":"text"},{"text":"AcceptableContentType","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO21AcceptableContentTypeO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/AcceptableContentType"},{"text":">] = .defaultValues())","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"parameters":[{"content":[{"type":"paragraph","inlineContent":[{"text":"","type":"text"}]}],"name":"accept"}],"kind":"parameters"}],"sections":[],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input\/Headers-swift.struct\/init(accept:)","interfaceLanguage":"swift"},"metadata":{"title":"init(accept:)","roleHeading":"Initializer","symbolKind":"init","role":"symbol","modules":[{"name":"DiscogsService"}],"fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"accept","kind":"externalParam"},{"text":": [","kind":"text"},{"text":"AcceptHeaderContentType","kind":"typeIdentifier","preciseIdentifier":"s:14OpenAPIRuntime23AcceptHeaderContentTypeV"},{"text":"<","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"getReleaseStats","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO"},{"text":".","kind":"text"},{"text":"AcceptableContentType","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO21AcceptableContentTypeO"},{"text":">])","kind":"text"}],"externalID":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV7HeadersV6acceptAISay14OpenAPIRuntime23AcceptHeaderContentTypeVyAE010AcceptablenO0OGG_tcfc"},"kind":"symbol","abstract":[{"text":"Creates a new ","type":"text"},{"code":"Headers","type":"codeVoice"},{"text":".","type":"text"}],"variants":[{"paths":["\/documentation\/discogsservice\/operations\/getreleasestats\/input\/headers-swift.struct\/init(accept:)"],"traits":[{"interfaceLanguage":"swift"}]}],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input\/Headers-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/getReleaseStats/AcceptableContentType":{"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/AcceptableContentType","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice\/operations\/getreleasestats\/acceptablecontenttype","role":"symbol","navigatorTitle":[{"text":"AcceptableContentType","kind":"identifier"}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"AcceptableContentType","kind":"identifier"}],"title":"Operations.getReleaseStats.AcceptableContentType"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseStats/Input/Headers-swift.struct":{"title":"Operations.getReleaseStats.Input.Headers","navigatorTitle":[{"text":"Headers","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input\/Headers-swift.struct","kind":"symbol","abstract":[],"role":"symbol","type":"topic","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Headers","kind":"identifier"}],"url":"\/documentation\/discogsservice\/operations\/getreleasestats\/input\/headers-swift.struct"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseStats/Input/Headers-swift.struct/init(accept:)":{"title":"init(accept:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input\/Headers-swift.struct\/init(accept:)","kind":"symbol","abstract":[{"type":"text","text":"Creates a new "},{"code":"Headers","type":"codeVoice"},{"type":"text","text":"."}],"role":"symbol","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"accept","kind":"externalParam"},{"text":": [","kind":"text"},{"text":"AcceptHeaderContentType","kind":"typeIdentifier","preciseIdentifier":"s:14OpenAPIRuntime23AcceptHeaderContentTypeV"},{"text":"<","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"getReleaseStats","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO"},{"text":".","kind":"text"},{"text":"AcceptableContentType","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO21AcceptableContentTypeO"},{"text":">])","kind":"text"}],"url":"\/documentation\/discogsservice\/operations\/getreleasestats\/input\/headers-swift.struct\/init(accept:)"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseStats":{"abstract":[{"type":"text","text":"Get information about statistics of release."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice\/operations\/getreleasestats","role":"symbol","navigatorTitle":[{"text":"getReleaseStats","kind":"identifier"}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getReleaseStats","kind":"identifier"}],"title":"Operations.getReleaseStats"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseStats/Input":{"title":"Operations.getReleaseStats.Input","navigatorTitle":[{"text":"Input","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input","kind":"symbol","abstract":[],"role":"symbol","type":"topic","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Input"}],"url":"\/documentation\/discogsservice\/operations\/getreleasestats\/input"},"doc://DiscogsService/documentation/DiscogsService":{"title":"DiscogsService","role":"collection","abstract":[],"kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","url":"\/documentation\/discogsservice"}}} |