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
9.2 KiB
JSON
1 line
9.2 KiB
JSON
{"schemaVersion":{"major":0,"minor":3,"patch":0},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/apiprotocol\/getartistreleases(_:)"]}],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getArtistReleases(_:)","interfaceLanguage":"swift"},"kind":"symbol","metadata":{"roleHeading":"Instance Method","role":"symbol","externalID":"s:14DiscogsService11APIProtocolP17getArtistReleasesyAA10OperationsOADO6OutputOAG5InputVYaKF","title":"getArtistReleases(_:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"getArtistReleases"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO17getArtistReleasesO","text":"getArtistReleases"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO17getArtistReleasesO5InputV","text":"Input"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"getArtistReleases","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO17getArtistReleasesO"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO17getArtistReleasesO6OutputO","text":"Output","kind":"typeIdentifier"}],"required":true,"symbolKind":"method","modules":[{"name":"DiscogsService"}]},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol"]]},"abstract":[{"type":"text","text":"Get information about releases of an artist."}],"primaryContentSections":[{"kind":"declarations","declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getArtistReleases","kind":"identifier"},{"text":"(","kind":"text"},{"text":"_","kind":"externalParam"},{"text":" ","kind":"text"},{"text":"input","kind":"internalParam"},{"text":": ","kind":"text"},{"text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO17getArtistReleasesO","text":"getArtistReleases","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtistReleases"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtistReleases\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO17getArtistReleasesO5InputV","text":"Input"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtistReleases","preciseIdentifier":"s:14DiscogsService10OperationsO17getArtistReleasesO","text":"getArtistReleases"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO17getArtistReleasesO6OutputO","text":"Output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtistReleases\/Output"}]}]},{"content":[{"anchor":"discussion","type":"heading","level":2,"text":"Discussion"},{"type":"paragraph","inlineContent":[{"type":"text","text":"Returns a list of releases and masters associated with an artist."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This endpoint supports pagination."}]},{"content":[{"type":"paragraph","inlineContent":[{"text":"HTTP ","type":"text"},{"code":"GET \/artists\/{artist_id}\/releases","type":"codeVoice"},{"text":".","type":"text"}]}],"style":"note","name":"Remark","type":"aside"},{"style":"note","name":"Remark","type":"aside","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Generated from "},{"code":"#\/paths\/\/artists\/{artist_id}\/releases\/get(getArtistReleases)","type":"codeVoice"},{"type":"text","text":"."}]}]}],"kind":"content"}],"sections":[],"references":{"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/APIProtocol/getArtistReleases(_:)":{"fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getArtistReleases","kind":"identifier"},{"text":"(","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"getArtistReleases","preciseIdentifier":"s:14DiscogsService10OperationsO17getArtistReleasesO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO17getArtistReleasesO5InputV","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"getArtistReleases","preciseIdentifier":"s:14DiscogsService10OperationsO17getArtistReleasesO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO17getArtistReleasesO6OutputO","kind":"typeIdentifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getArtistReleases(_:)","kind":"symbol","title":"getArtistReleases(_:)","required":true,"role":"symbol","url":"\/documentation\/discogsservice\/apiprotocol\/getartistreleases(_:)","abstract":[{"type":"text","text":"Get information about releases of an artist."}],"type":"topic"},"doc://DiscogsService/documentation/DiscogsService/APIProtocol":{"role":"symbol","title":"APIProtocol","kind":"symbol","type":"topic","abstract":[{"type":"text","text":"A type that performs HTTP operations defined by the OpenAPI document."}],"navigatorTitle":[{"text":"APIProtocol","kind":"identifier"}],"url":"\/documentation\/discogsservice\/apiprotocol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol","fragments":[{"text":"protocol","kind":"keyword"},{"text":" ","kind":"text"},{"text":"APIProtocol","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/getArtistReleases/Input":{"url":"\/documentation\/discogsservice\/operations\/getartistreleases\/input","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Input","kind":"identifier"}],"navigatorTitle":[{"text":"Input","kind":"identifier"}],"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtistReleases\/Input","title":"Operations.getArtistReleases.Input","type":"topic","kind":"symbol","role":"symbol"},"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/getArtistReleases":{"url":"\/documentation\/discogsservice\/operations\/getartistreleases","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getArtistReleases","kind":"identifier"}],"navigatorTitle":[{"text":"getArtistReleases","kind":"identifier"}],"abstract":[{"type":"text","text":"Get information about releases of an artist."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtistReleases","title":"Operations.getArtistReleases","type":"topic","kind":"symbol","role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations/getArtistReleases/Output":{"kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"Output"}],"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getArtistReleases\/Output","role":"symbol","url":"\/documentation\/discogsservice\/operations\/getartistreleases\/output","fragments":[{"text":"enum","kind":"keyword"},{"kind":"text","text":" "},{"text":"Output","kind":"identifier"}],"title":"Operations.getArtistReleases.Output"}}} |