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
14 KiB
JSON
1 line
14 KiB
JSON
{"metadata":{"modules":[{"name":"DiscogsService"}],"roleHeading":"Enumeration","navigatorTitle":[{"kind":"identifier","text":"Output"}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Output"}],"symbolKind":"enum","externalID":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO","title":"Operations.searchDatabase.Output","role":"symbol"},"primaryContentSections":[{"declarations":[{"platforms":["macOS"],"languages":["swift"],"tokens":[{"kind":"attribute","text":"@frozen"},{"kind":"text","text":" "},{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Output"}]}],"kind":"declarations"}],"sections":[],"identifier":{"url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output","interfaceLanguage":"swift"},"relationshipsSections":[{"kind":"relationships","type":"conformsTo","title":"Conforms To","identifiers":["doc:\/\/DiscogsService\/SQ","doc:\/\/DiscogsService\/SH","doc:\/\/DiscogsService\/s8SendableP","doc:\/\/DiscogsService\/s16SendableMetatypeP"]}],"topicSections":[{"identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Ok-swift.struct"],"title":"Structures","generated":true,"anchor":"Structures"},{"title":"Enumeration Cases","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/internalServerError(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/ok(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/unauthorized(_:)","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/undocumented(statusCode:_:)"],"generated":true,"anchor":"Enumeration-Cases"},{"identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/internalServerError","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/ok-swift.property","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/unauthorized"],"generated":true,"title":"Instance Properties","anchor":"Instance-Properties"},{"generated":true,"title":"Default Implementations","anchor":"Default-Implementations","identifiers":["doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Equatable-Implementations"]}],"variants":[{"paths":["\/documentation\/discogsservice\/operations\/searchdatabase\/output"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"kind":"symbol","hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase"]]},"references":{"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/SH":{"type":"unresolvable","identifier":"doc:\/\/DiscogsService\/SH","title":"Swift.Hashable"},"doc://DiscogsService/documentation/DiscogsService":{"title":"DiscogsService","role":"collection","abstract":[],"kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","url":"\/documentation\/discogsservice"},"doc://DiscogsService/s8SendableP":{"type":"unresolvable","identifier":"doc:\/\/DiscogsService\/s8SendableP","title":"Swift.Sendable"},"doc://DiscogsService/SQ":{"type":"unresolvable","title":"Swift.Equatable","identifier":"doc:\/\/DiscogsService\/SQ"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output/unauthorized":{"url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/unauthorized","fragments":[{"text":"var","kind":"keyword"},{"text":" ","kind":"text"},{"text":"unauthorized","kind":"identifier"},{"text":": ","kind":"text"},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO","text":"Components"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO","text":"Responses"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO12UnauthorizedV","text":"Unauthorized"}],"abstract":[{"type":"text","text":"The associated value of the enum case if "},{"code":"self","type":"codeVoice"},{"type":"text","text":" is "},{"type":"codeVoice","code":".unauthorized"},{"type":"text","text":"."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/unauthorized","title":"unauthorized","type":"topic","kind":"symbol","role":"symbol"},"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/documentation/DiscogsService/Operations/searchDatabase/Output/Equatable-Implementations":{"role":"collectionGroup","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/Equatable-Implementations","title":"Equatable Implementations","abstract":[],"type":"topic","kind":"article","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/equatable-implementations"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output/ok(_:)":{"abstract":[{"text":"Successfully retrieved search results.","type":"text"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/ok(_:)","type":"topic","kind":"symbol","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/ok(_:)","role":"symbol","fragments":[{"text":"case","kind":"keyword"},{"text":" ","kind":"text"},{"text":"ok","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"}],"title":"Operations.searchDatabase.Output.ok(_:)"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output/internalServerError":{"url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/internalservererror","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"internalServerError"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO","text":"Components"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO","text":"Responses"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO13InternalErrorV","text":"InternalError"}],"abstract":[{"text":"The associated value of the enum case if ","type":"text"},{"type":"codeVoice","code":"self"},{"text":" is ","type":"text"},{"type":"codeVoice","code":".internalServerError"},{"type":"text","text":"."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/internalServerError","title":"internalServerError","type":"topic","kind":"symbol","role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output/internalServerError(_:)":{"title":"Operations.searchDatabase.Output.internalServerError(_:)","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"internalServerError"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO","text":"Components"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO","text":"Responses"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO13InternalErrorV","text":"InternalError"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"An Internal Server error was encountered."}],"kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/internalServerError(_:)","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/internalservererror(_:)"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output/ok-swift.property":{"url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/ok-swift.property","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"ok"},{"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"}],"abstract":[{"type":"text","text":"The associated value of the enum case if "},{"type":"codeVoice","code":"self"},{"type":"text","text":" is "},{"type":"codeVoice","code":".ok"},{"type":"text","text":"."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/ok-swift.property","title":"ok","type":"topic","kind":"symbol","role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output/unauthorized(_:)":{"title":"Operations.searchDatabase.Output.unauthorized(_:)","role":"symbol","fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"unauthorized"},{"kind":"text","text":"("},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO","text":"Components"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO","text":"Responses"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10ComponentsO9ResponsesO12UnauthorizedV","text":"Unauthorized"},{"kind":"text","text":")"}],"abstract":[{"type":"text","text":"A requested resource cannot be accessed."}],"kind":"symbol","type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/unauthorized(_:)","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/unauthorized(_:)"},"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/s16SendableMetatypeP":{"identifier":"doc:\/\/DiscogsService\/s16SendableMetatypeP","type":"unresolvable","title":"Swift.SendableMetatype"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output/undocumented(statusCode:_:)":{"title":"Operations.searchDatabase.Output.undocumented(statusCode:_:)","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output\/undocumented(statusCode:_:)","abstract":[{"type":"text","text":"Undocumented response."}],"fragments":[{"kind":"keyword","text":"case"},{"kind":"text","text":" "},{"kind":"identifier","text":"undocumented"},{"kind":"text","text":"("},{"kind":"externalParam","text":"statusCode"},{"kind":"text","text":": "},{"kind":"typeIdentifier","preciseIdentifier":"s:Si","text":"Int"},{"kind":"text","text":", "},{"kind":"typeIdentifier","preciseIdentifier":"s:14OpenAPIRuntime19UndocumentedPayloadV","text":"UndocumentedPayload"},{"kind":"text","text":")"}],"role":"symbol","type":"topic","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output\/undocumented(statuscode:_:)"},"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"}}} |