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.1 KiB
JSON
1 line
8.1 KiB
JSON
{"sections":[],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Output"]]},"abstract":[{"text":"Successfully retrieved release rating details by a given user.","type":"text"}],"variants":[{"paths":["\/documentation\/discogsservice\/operations\/getreleasestats\/output\/ok(_:)"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Output\/ok(_:)"},"schemaVersion":{"major":0,"patch":0,"minor":3},"kind":"symbol","metadata":{"externalID":"s:14DiscogsService10OperationsO15getReleaseStatsO6OutputO2okyA2G2OkVcAGmF","role":"symbol","symbolKind":"case","roleHeading":"Case","modules":[{"name":"DiscogsService"}],"fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"ok","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"getReleaseStats","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO6OutputO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Ok","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO6OutputO2OkV","kind":"typeIdentifier"},{"text":")","kind":"text"}],"title":"Operations.getReleaseStats.Output.ok(_:)"},"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"ok","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"getReleaseStats","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO6OutputO","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Output","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Ok","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO6OutputO2OkV","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Output\/Ok-swift.struct","kind":"typeIdentifier"},{"text":")","kind":"text"}],"languages":["swift"],"platforms":["macOS"]}]},{"kind":"content","content":[{"type":"heading","text":"Discussion","anchor":"discussion","level":2},{"type":"aside","name":"Warning","style":"warning","content":[{"inlineContent":[{"type":"text","text":"There is a discrepancy about this response between was is documented and what the endpoints actually responds. In the "},{"identifier":"https:\/\/www.discogs.com\/developers#page:database,header:database-release-stats","isActive":true,"type":"reference"},{"type":"text","text":", it is defined that a type containing a statistical data would be returned but the actual response returns an object that contains a boolean flag instead."}],"type":"paragraph"}]},{"type":"aside","style":"note","content":[{"inlineContent":[{"text":"Generated from ","type":"text"},{"code":"#\/paths\/\/releases\/{release_id}\/stats\/get(getReleaseStats)\/responses\/200","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"}],"name":"Remark"},{"type":"paragraph","inlineContent":[{"type":"text","text":"HTTP response code: "},{"code":"200 ok","type":"codeVoice"},{"type":"text","text":"."}]}]}],"references":{"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseStats/Output":{"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Output","kind":"symbol","title":"Operations.getReleaseStats.Output","role":"symbol","url":"\/documentation\/discogsservice\/operations\/getreleasestats\/output","type":"topic","abstract":[],"navigatorTitle":[{"text":"Output","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseStats/Output/Ok-swift.struct":{"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Ok","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Output\/Ok-swift.struct","kind":"symbol","title":"Operations.getReleaseStats.Output.Ok","role":"symbol","type":"topic","abstract":[],"url":"\/documentation\/discogsservice\/operations\/getreleasestats\/output\/ok-swift.struct","navigatorTitle":[{"text":"Ok","kind":"identifier"}]},"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/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":{"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/Output/ok(_:)":{"url":"\/documentation\/discogsservice\/operations\/getreleasestats\/output\/ok(_:)","abstract":[{"text":"Successfully retrieved release rating details by a given user.","type":"text"}],"title":"Operations.getReleaseStats.Output.ok(_:)","kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Output\/ok(_:)","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"ok","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"getReleaseStats","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO6OutputO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Ok","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO6OutputO2OkV","kind":"typeIdentifier"},{"text":")","kind":"text"}],"role":"symbol"},"https://www.discogs.com/developers#page:database,header:database-release-stats":{"title":"documentation","type":"link","identifier":"https:\/\/www.discogs.com\/developers#page:database,header:database-release-stats","url":"https:\/\/www.discogs.com\/developers#page:database,header:database-release-stats","titleInlineContent":[{"type":"text","text":"documentation"}]}}} |