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
12 KiB
JSON
1 line
12 KiB
JSON
{"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/operations\/searchdatabase\/output\/ok-swift.struct"]}],"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Ok"}],"platforms":["macOS"],"languages":["swift"]}]}],"kind":"symbol","metadata":{"title":"Operations.searchDatabase.Output.Ok","navigatorTitle":[{"kind":"identifier","text":"Ok"}],"roleHeading":"Structure","symbolKind":"struct","role":"symbol","modules":[{"name":"DiscogsService"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Ok"}],"externalID":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO2OkV"},"sections":[],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output"]]},"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct"},"topicSections":[{"identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct\/Headers-swift.struct"],"generated":true,"title":"Structures","anchor":"Structures"},{"identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct\/init(headers:body:)"],"generated":true,"title":"Initializers","anchor":"Initializers"},{"identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct\/body-swift.property","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct\/headers-swift.property"],"generated":true,"title":"Instance Properties","anchor":"Instance-Properties"},{"identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct\/Body-swift.enum"],"generated":true,"title":"Enumerations","anchor":"Enumerations"},{"identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct\/Equatable-Implementations"],"generated":true,"title":"Default Implementations","anchor":"Default-Implementations"}],"schemaVersion":{"minor":3,"patch":0,"major":0},"relationshipsSections":[{"kind":"relationships","identifiers":["doc:\/\/DiscogsService\/SQ","doc:\/\/DiscogsService\/SH","doc:\/\/DiscogsService\/s8SendableP","doc:\/\/DiscogsService\/s16SendableMetatypeP"],"type":"conformsTo","title":"Conforms To"}],"references":{"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output/Ok-swift.struct/headers-swift.property":{"abstract":[{"type":"text","text":"Received HTTP response headers"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct\/headers-swift.property","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/ok-swift.struct\/headers-swift.property","role":"symbol","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"headers","kind":"identifier"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"searchDatabase","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO"},{"text":".","kind":"text"},{"text":"Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO"},{"text":".","kind":"text"},{"text":"Ok","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO2OkV"},{"text":".","kind":"text"},{"text":"Headers","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO2OkV7HeadersV"}],"title":"headers"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output/Ok-swift.struct/Body-swift.enum":{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct\/Body-swift.enum","abstract":[],"navigatorTitle":[{"text":"Body","kind":"identifier"}],"title":"Operations.searchDatabase.Output.Ok.Body","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/ok-swift.struct\/body-swift.enum","kind":"symbol","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Body","kind":"identifier"}],"type":"topic","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/searchDatabase/Output/Ok-swift.struct/Equatable-Implementations":{"url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/ok-swift.struct\/equatable-implementations","title":"Equatable Implementations","abstract":[],"kind":"article","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct\/Equatable-Implementations","role":"collectionGroup"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output/Ok-swift.struct/Headers-swift.struct":{"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct\/Headers-swift.struct","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/ok-swift.struct\/headers-swift.struct","role":"symbol","navigatorTitle":[{"text":"Headers","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Headers","kind":"identifier"}],"title":"Operations.searchDatabase.Output.Ok.Headers"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output/Ok-swift.struct":{"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/ok-swift.struct","role":"symbol","navigatorTitle":[{"text":"Ok","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Ok","kind":"identifier"}],"title":"Operations.searchDatabase.Output.Ok"},"doc://DiscogsService/SQ":{"identifier":"doc:\/\/DiscogsService\/SQ","type":"unresolvable","title":"Swift.Equatable"},"doc://DiscogsService/s16SendableMetatypeP":{"identifier":"doc:\/\/DiscogsService\/s16SendableMetatypeP","type":"unresolvable","title":"Swift.SendableMetatype"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase":{"abstract":[{"type":"text","text":"Search any information from the database."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice\/operations\/searchdatabase","role":"symbol","navigatorTitle":[{"text":"searchDatabase","kind":"identifier"}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"searchDatabase","kind":"identifier"}],"title":"Operations.searchDatabase"},"doc://DiscogsService/SH":{"identifier":"doc:\/\/DiscogsService\/SH","type":"unresolvable","title":"Swift.Hashable"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output/Ok-swift.struct/body-swift.property":{"url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/ok-swift.struct\/body-swift.property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"body"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","text":"searchDatabase"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO","text":"Output"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO2OkV","text":"Ok"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO2OkV4BodyO","text":"Body"}],"abstract":[{"type":"text","text":"Received HTTP response body"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct\/body-swift.property","title":"body","type":"topic","kind":"symbol","role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output/Ok-swift.struct/init(headers:body:)":{"role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct\/init(headers:body:)","abstract":[{"type":"text","text":"Creates a new "},{"type":"codeVoice","code":"Ok"},{"type":"text","text":"."}],"type":"topic","kind":"symbol","fragments":[{"text":"init","kind":"identifier"},{"text":"(","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","kind":"typeIdentifier","text":"searchDatabase"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO","kind":"typeIdentifier","text":"Output"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO2OkV","kind":"typeIdentifier","text":"Ok"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO2OkV7HeadersV","kind":"typeIdentifier","text":"Headers"},{"kind":"text","text":", "},{"kind":"externalParam","text":"body"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","text":"searchDatabase"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO","text":"Output"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO2OkV","text":"Ok"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO2OkV4BodyO","text":"Body"},{"kind":"text","text":")"}],"title":"init(headers:body:)","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/ok-swift.struct\/init(headers:body:)"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output":{"abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output","role":"symbol","navigatorTitle":[{"text":"Output","kind":"identifier"}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"title":"Operations.searchDatabase.Output"},"doc://DiscogsService/s8SendableP":{"identifier":"doc:\/\/DiscogsService\/s8SendableP","type":"unresolvable","title":"Swift.Sendable"},"doc://DiscogsService/documentation/DiscogsService":{"title":"DiscogsService","role":"collection","abstract":[],"kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","url":"\/documentation\/discogsservice"}}} |