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.4 KiB
JSON
1 line
8.4 KiB
JSON
{"topicSections":[{"generated":true,"anchor":"Initializers","title":"Initializers","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Currency\/init(from:)"]},{"generated":true,"anchor":"Instance-Properties","title":"Instance Properties","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Currency\/hashValue"]},{"generated":true,"anchor":"Instance-Methods","title":"Instance Methods","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Currency\/encode(to:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Currency\/hash(into:)"]}],"schemaVersion":{"major":0,"patch":0,"minor":3},"sections":[],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Currency\/RawRepresentable-Implementations","interfaceLanguage":"swift"},"kind":"article","metadata":{"roleHeading":"API Collection","title":"RawRepresentable Implementations","modules":[{"name":"DiscogsService"}],"role":"collectionGroup"},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/components\/schemas\/currency\/rawrepresentable-implementations"]}],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Currency"]]},"references":{"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Currency/init(from:)":{"title":"init(from:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Currency\/init(from:)","kind":"symbol","abstract":[{"text":"Creates a new instance by decoding from the given decoder, when the","type":"text"},{"text":" ","type":"text"},{"text":"type’s ","type":"text"},{"type":"codeVoice","code":"RawValue"},{"text":" is ","type":"text"},{"code":"String","type":"codeVoice"},{"type":"text","text":"."}],"role":"symbol","type":"topic","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"from","kind":"externalParam"},{"text":": any ","kind":"text"},{"text":"Decoder","preciseIdentifier":"s:s7DecoderP","kind":"typeIdentifier"},{"text":") ","kind":"text"},{"text":"throws","kind":"keyword"}],"conformance":{"constraints":[{"type":"codeVoice","code":"Self"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"Decodable"},{"text":" and ","type":"text"},{"type":"codeVoice","code":"RawValue"},{"text":" is ","type":"text"},{"code":"String","type":"codeVoice"},{"text":".","type":"text"}],"conformancePrefix":[{"type":"text","text":"Conforms when"}],"availabilityPrefix":[{"text":"Available when","type":"text"}]},"url":"\/documentation\/discogsservice\/components\/schemas\/currency\/init(from:)"},"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/Schemas/Currency/hashValue":{"title":"hashValue","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Currency\/hashValue","kind":"symbol","abstract":[],"role":"symbol","type":"topic","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"hashValue","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Int","kind":"typeIdentifier","preciseIdentifier":"s:Si"}],"conformance":{"constraints":[{"code":"Self","type":"codeVoice"},{"text":" conforms to ","type":"text"},{"code":"Hashable","type":"codeVoice"},{"text":" and ","type":"text"},{"code":"RawValue","type":"codeVoice"},{"text":" conforms to ","type":"text"},{"code":"Hashable","type":"codeVoice"},{"text":".","type":"text"}],"conformancePrefix":[{"text":"Conforms when","type":"text"}],"availabilityPrefix":[{"text":"Available when","type":"text"}]},"url":"\/documentation\/discogsservice\/components\/schemas\/currency\/hashvalue"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Currency/hash(into:)":{"url":"\/documentation\/discogsservice\/components\/schemas\/currency\/hash(into:)","title":"hash(into:)","abstract":[],"kind":"symbol","conformance":{"conformancePrefix":[{"type":"text","text":"Conforms when"}],"availabilityPrefix":[{"type":"text","text":"Available when"}],"constraints":[{"type":"codeVoice","code":"Self"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"Hashable"},{"type":"text","text":" and "},{"type":"codeVoice","code":"RawValue"},{"type":"text","text":" conforms to "},{"type":"codeVoice","code":"Hashable"},{"type":"text","text":"."}]},"type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Currency\/hash(into:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"hash"},{"kind":"text","text":"("},{"kind":"externalParam","text":"into"},{"kind":"text","text":": "},{"kind":"keyword","text":"inout"},{"kind":"text","text":" "},{"kind":"typeIdentifier","preciseIdentifier":"s:s6HasherV","text":"Hasher"},{"kind":"text","text":")"}],"role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Currency/encode(to:)":{"title":"encode(to:)","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Currency\/encode(to:)","kind":"symbol","abstract":[{"text":"Encodes this value into the given encoder, when the type’s ","type":"text"},{"code":"RawValue","type":"codeVoice"},{"text":" ","type":"text"},{"text":"is ","type":"text"},{"code":"String","type":"codeVoice"},{"text":".","type":"text"}],"role":"symbol","type":"topic","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"encode","kind":"identifier"},{"text":"(","kind":"text"},{"text":"to","kind":"externalParam"},{"text":": any ","kind":"text"},{"text":"Encoder","kind":"typeIdentifier","preciseIdentifier":"s:s7EncoderP"},{"text":") ","kind":"text"},{"text":"throws","kind":"keyword"}],"conformance":{"constraints":[{"code":"Self","type":"codeVoice"},{"text":" conforms to ","type":"text"},{"code":"Encodable","type":"codeVoice"},{"text":" and ","type":"text"},{"code":"RawValue","type":"codeVoice"},{"text":" is ","type":"text"},{"code":"String","type":"codeVoice"},{"text":".","type":"text"}],"conformancePrefix":[{"text":"Conforms when","type":"text"}],"availabilityPrefix":[{"text":"Available when","type":"text"}]},"url":"\/documentation\/discogsservice\/components\/schemas\/currency\/encode(to:)"},"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/Currency":{"navigatorTitle":[{"text":"Currency","kind":"identifier"}],"role":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Currency","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Currency","title":"Components.Schemas.Currency","abstract":[{"text":"A list of currency codes defined in the marketplace.","type":"text"}],"type":"topic","kind":"symbol","url":"\/documentation\/discogsservice\/components\/schemas\/currency"}}} |