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
16 KiB
JSON
1 line
16 KiB
JSON
{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/components\/schemas\/community"]}],"abstract":[{"type":"text","text":"A type that represents a community of users, in relationship to a release."}],"primaryContentSections":[{"declarations":[{"languages":["swift"],"tokens":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Community","kind":"identifier"}],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"type":"heading","text":"Overview","level":2,"anchor":"overview"},{"type":"aside","style":"note","name":"Remark","content":[{"inlineContent":[{"text":"Generated from ","type":"text"},{"code":"#\/components\/schemas\/Community","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"}]}],"kind":"content"}],"kind":"symbol","metadata":{"symbolKind":"struct","title":"Components.Schemas.Community","navigatorTitle":[{"text":"Community","kind":"identifier"}],"roleHeading":"Structure","externalID":"s:14DiscogsService10ComponentsO7SchemasO9CommunityV","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Community","kind":"identifier"}],"modules":[{"name":"DiscogsService"}],"role":"symbol"},"sections":[],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community"},"topicSections":[{"generated":true,"title":"Initializers","anchor":"Initializers","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/init(from:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/init(have:want:rating:submitter:contributors:data_quality:status:)"]},{"generated":true,"title":"Instance Properties","anchor":"Instance-Properties","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/contributors","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/data_quality","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/have","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/rating","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/status","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/submitter","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/want"]},{"generated":true,"title":"Enumerations","anchor":"Enumerations","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/CodingKeys"]},{"generated":true,"title":"Default Implementations","anchor":"Default-Implementations","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/Equatable-Implementations"]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"relationshipsSections":[{"identifiers":["doc:\/\/DiscogsService\/Se","doc:\/\/DiscogsService\/SE","doc:\/\/DiscogsService\/SQ","doc:\/\/DiscogsService\/SH","doc:\/\/DiscogsService\/s8SendableP","doc:\/\/DiscogsService\/s16SendableMetatypeP"],"type":"conformsTo","title":"Conforms To","kind":"relationships"}],"references":{"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Community/contributors":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/contributors","abstract":[{"text":"A list of references of users that contributed data of a release into the database.","type":"text"}],"title":"contributors","url":"\/documentation\/discogsservice\/components\/schemas\/community\/contributors","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"contributors","kind":"identifier"},{"text":": [","kind":"text"},{"text":"Components","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO"},{"text":".","kind":"text"},{"text":"Schemas","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO"},{"text":".","kind":"text"},{"text":"UserId","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO6UserIdV"},{"text":"]?","kind":"text"}],"type":"topic","role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Community/CodingKeys":{"title":"Components.Schemas.Community.CodingKeys","navigatorTitle":[{"text":"CodingKeys","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/CodingKeys","kind":"symbol","abstract":[],"role":"symbol","type":"topic","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"CodingKeys","kind":"identifier"}],"url":"\/documentation\/discogsservice\/components\/schemas\/community\/codingkeys"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Community/data_quality":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/data_quality","abstract":[{"type":"text","text":"An explanation for the data quality related to a community."}],"title":"data_quality","url":"\/documentation\/discogsservice\/components\/schemas\/community\/data_quality","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"data_quality","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:SS","text":"String","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"type":"topic","role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Community/have":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/have","kind":"symbol","type":"topic","role":"symbol","abstract":[{"type":"text","text":"A number of users that have a release."}],"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"have","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Int","preciseIdentifier":"s:Si","kind":"typeIdentifier"}],"title":"have","url":"\/documentation\/discogsservice\/components\/schemas\/community\/have"},"doc://DiscogsService/SH":{"identifier":"doc:\/\/DiscogsService\/SH","type":"unresolvable","title":"Swift.Hashable"},"doc://DiscogsService/SQ":{"identifier":"doc:\/\/DiscogsService\/SQ","type":"unresolvable","title":"Swift.Equatable"},"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/Se":{"identifier":"doc:\/\/DiscogsService\/Se","type":"unresolvable","title":"Swift.Decodable"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Community/Equatable-Implementations":{"url":"\/documentation\/discogsservice\/components\/schemas\/community\/equatable-implementations","title":"Equatable Implementations","abstract":[],"kind":"article","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/Equatable-Implementations","role":"collectionGroup"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Community":{"title":"Components.Schemas.Community","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community","abstract":[{"type":"text","text":"A type that represents a community of users, in relationship to a release."}],"navigatorTitle":[{"text":"Community","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"kind":"text","text":" "},{"kind":"identifier","text":"Community"}],"role":"symbol","type":"topic","url":"\/documentation\/discogsservice\/components\/schemas\/community"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Community/want":{"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/want","abstract":[{"text":"A number of users that want a release.","type":"text"}],"type":"topic","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"want","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:Si","text":"Int","kind":"typeIdentifier"}],"title":"want","url":"\/documentation\/discogsservice\/components\/schemas\/community\/want"},"doc://DiscogsService/s8SendableP":{"identifier":"doc:\/\/DiscogsService\/s8SendableP","type":"unresolvable","title":"Swift.Sendable"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Community/init(have:want:rating:submitter:contributors:data_quality:status:)":{"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/init(have:want:rating:submitter:contributors:data_quality:status:)","abstract":[{"text":"Creates a new ","type":"text"},{"code":"Community","type":"codeVoice"},{"text":".","type":"text"}],"type":"topic","kind":"symbol","fragments":[{"kind":"identifier","text":"init"},{"kind":"text","text":"("},{"kind":"externalParam","text":"have"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Si","kind":"typeIdentifier","text":"Int"},{"kind":"text","text":", "},{"kind":"externalParam","text":"want"},{"kind":"text","text":": "},{"preciseIdentifier":"s:Si","kind":"typeIdentifier","text":"Int"},{"kind":"text","text":", "},{"kind":"externalParam","text":"rating"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14DiscogsService10ComponentsO","kind":"typeIdentifier","text":"Components"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO","kind":"typeIdentifier","text":"Schemas"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO6RatingV","kind":"typeIdentifier","text":"Rating"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"submitter"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14DiscogsService10ComponentsO","kind":"typeIdentifier","text":"Components"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO","kind":"typeIdentifier","text":"Schemas"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO6UserIdV","kind":"typeIdentifier","text":"UserId"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"contributors"},{"kind":"text","text":": ["},{"preciseIdentifier":"s:14DiscogsService10ComponentsO","kind":"typeIdentifier","text":"Components"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO","kind":"typeIdentifier","text":"Schemas"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO6UserIdV","kind":"typeIdentifier","text":"UserId"},{"kind":"text","text":"]?, "},{"kind":"externalParam","text":"data_quality"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":"?, "},{"kind":"externalParam","text":"status"},{"kind":"text","text":": "},{"preciseIdentifier":"s:SS","kind":"typeIdentifier","text":"String"},{"kind":"text","text":"?)"}],"title":"init(have:want:rating:submitter:contributors:data_quality:status:)","url":"\/documentation\/discogsservice\/components\/schemas\/community\/init(have:want:rating:submitter:contributors:data_quality:status:)"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Community/rating":{"fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"rating","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":"Rating","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO6RatingV"},{"text":"?","kind":"text"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/rating","kind":"symbol","title":"rating","role":"symbol","url":"\/documentation\/discogsservice\/components\/schemas\/community\/rating","type":"topic","abstract":[]},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Community/init(from:)":{"type":"topic","title":"init(from:)","abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/init(from:)","role":"symbol","url":"\/documentation\/discogsservice\/components\/schemas\/community\/init(from:)","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"}],"kind":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Community/submitter":{"url":"\/documentation\/discogsservice\/components\/schemas\/community\/submitter","type":"topic","title":"submitter","kind":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"submitter","kind":"identifier"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10ComponentsO","text":"Components","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO","text":"Schemas","kind":"typeIdentifier"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10ComponentsO7SchemasO6UserIdV","text":"UserId","kind":"typeIdentifier"},{"text":"?","kind":"text"}],"abstract":[{"type":"text","text":"A reference of a user that submitted the release into the database."}],"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/submitter"},"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/SE":{"identifier":"doc:\/\/DiscogsService\/SE","type":"unresolvable","title":"Swift.Encodable"},"doc://DiscogsService/documentation/DiscogsService/Components/Schemas/Community/status":{"url":"\/documentation\/discogsservice\/components\/schemas\/community\/status","title":"status","abstract":[{"type":"text","text":"An explanation for the stat status of a community."}],"kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Components\/Schemas\/Community\/status","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"status"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:SS","text":"String"},{"kind":"text","text":"?"}],"role":"symbol"},"doc://DiscogsService/s16SendableMetatypeP":{"identifier":"doc:\/\/DiscogsService\/s16SendableMetatypeP","type":"unresolvable","title":"Swift.SendableMetatype"}}} |