Files
discogs-service/docs/data/documentation/discogsservice/apiprotocol/searchdatabase(query:headers:).json
T
javier 428eedd89d Implemented the Services and Database GET endpoints (#2)
This PR contains the work done to include the define the information sections of the `OpenAPI` specification document and all the `GET` endpoints of the _Service_ and _Database_ categories.

The following endpoints have been defined in the document, and also tested manually with `Swift`:
* GET `/`
* GET `/artists/{artist_id}`
* GET `/artists/{artist_id}/releases`
* GET `/labels/{label_id}`
* GET `/labels/{label_id}/releases`
* GET `/masters/{master_id}`
* GET `/masters/{master_id}/versions`
* GET `/releases/{release_id}`
* GET `/releases/{release_id}/rating`
* GET `/releases/{release_id}/rating/{username}`
* GET `/releases/{release_id}/stats`
* GET `/database/search`

In addition, a first version of the _Github Pages_ documentation has been generated from the `DocC` documentation catalog, and the generated Swift code from the `openapi.yaml` file.

Reviewed-on: #2
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
2025-10-09 23:51:39 +00:00

1 line
13 KiB
JSON

{"schemaVersion":{"patch":0,"major":0,"minor":3},"metadata":{"symbolKind":"method","roleHeading":"Instance Method","title":"searchDatabase(query:headers:)","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"searchDatabase","kind":"identifier"},{"text":"(","kind":"text"},{"text":"query","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"searchDatabase","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Query","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV5QueryV","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"searchDatabase","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV7HeadersV","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":"searchDatabase","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO","kind":"typeIdentifier"}],"externalID":"s:14DiscogsService11APIProtocolPAAE14searchDatabase5query7headersAA10OperationsOADO6OutputOAI5InputV5QueryV_AM7HeadersVtYaKF","extendedModule":"DiscogsService","role":"symbol","modules":[{"name":"DiscogsService"}]},"abstract":[{"type":"text","text":"Search any information from the database."}],"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/apiprotocol\/searchdatabase(query:headers:)"]}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/searchDatabase(query:headers:)"},"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol"]]},"sections":[],"primaryContentSections":[{"declarations":[{"tokens":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"searchDatabase"},{"kind":"text","text":"("},{"kind":"externalParam","text":"query"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","kind":"typeIdentifier","text":"searchDatabase","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV","kind":"typeIdentifier","text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV5QueryV","kind":"typeIdentifier","text":"Query","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input\/Query-swift.struct"},{"kind":"text","text":" = .init(), "},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","kind":"typeIdentifier","text":"searchDatabase","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV","kind":"typeIdentifier","text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV7HeadersV","kind":"typeIdentifier","text":"Headers","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input\/Headers-swift.struct"},{"kind":"text","text":" = .init()) "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier","text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","kind":"typeIdentifier","text":"searchDatabase","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase"},{"kind":"text","text":"."},{"preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO","kind":"typeIdentifier","text":"Output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output"}],"languages":["swift"],"platforms":["macOS"]}],"kind":"declarations"},{"content":[{"type":"heading","text":"Discussion","anchor":"discussion","level":2},{"type":"paragraph","inlineContent":[{"type":"text","text":"Issue a search query to the Discogs database."}]},{"type":"paragraph","inlineContent":[{"type":"text","text":"This endpoint supports pagination and also, it requires authentication."}]},{"type":"aside","style":"note","name":"Remark","content":[{"inlineContent":[{"text":"HTTP ","type":"text"},{"code":"GET \/database\/search","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"}]},{"type":"aside","style":"note","name":"Remark","content":[{"inlineContent":[{"text":"Generated from ","type":"text"},{"code":"#\/paths\/\/database\/search\/get(searchDatabase)","type":"codeVoice"},{"text":".","type":"text"}],"type":"paragraph"}]}],"kind":"content"}],"kind":"symbol","references":{"doc://DiscogsService/documentation/DiscogsService/APIProtocol":{"navigatorTitle":[{"kind":"identifier","text":"APIProtocol"}],"fragments":[{"kind":"keyword","text":"protocol"},{"kind":"text","text":" "},{"kind":"identifier","text":"APIProtocol"}],"url":"\/documentation\/discogsservice\/apiprotocol","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol","abstract":[{"type":"text","text":"A type that performs HTTP operations defined by the OpenAPI document."}],"title":"APIProtocol"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Output":{"navigatorTitle":[{"kind":"identifier","text":"Output"}],"fragments":[{"kind":"keyword","text":"enum"},{"text":" ","kind":"text"},{"kind":"identifier","text":"Output"}],"url":"\/documentation\/discogsservice\/operations\/searchdatabase\/output","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Output","abstract":[],"title":"Operations.searchDatabase.Output"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Input/Headers-swift.struct":{"role":"symbol","type":"topic","abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input\/Headers-swift.struct","url":"\/documentation\/discogsservice\/operations\/searchdatabase\/input\/headers-swift.struct","title":"Operations.searchDatabase.Input.Headers","kind":"symbol","navigatorTitle":[{"kind":"identifier","text":"Headers"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Headers"}]},"doc://DiscogsService/documentation/DiscogsService":{"url":"\/documentation\/discogsservice","abstract":[],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","kind":"symbol","role":"collection","type":"topic","title":"DiscogsService"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Input":{"navigatorTitle":[{"kind":"identifier","text":"Input"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Input"}],"url":"\/documentation\/discogsservice\/operations\/searchdatabase\/input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input","title":"Operations.searchDatabase.Input","kind":"symbol","role":"symbol","abstract":[],"type":"topic"},"doc://DiscogsService/documentation/DiscogsService/APIProtocol/searchDatabase(query:headers:)":{"role":"symbol","type":"topic","abstract":[{"type":"text","text":"Search any information from the database."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/searchDatabase(query:headers:)","title":"searchDatabase(query:headers:)","url":"\/documentation\/discogsservice\/apiprotocol\/searchdatabase(query:headers:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"searchDatabase","kind":"identifier"},{"text":"(","kind":"text"},{"text":"query","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"searchDatabase","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Query","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV5QueryV","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"searchDatabase","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO5InputV7HeadersV","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":"searchDatabase","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO14searchDatabaseO6OutputO","kind":"typeIdentifier"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase":{"url":"\/documentation\/discogsservice\/operations\/searchdatabase","abstract":[{"type":"text","text":"Search any information from the database."}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase","kind":"symbol","role":"symbol","title":"Operations.searchDatabase","type":"topic","fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"searchDatabase","kind":"identifier"}],"navigatorTitle":[{"text":"searchDatabase","kind":"identifier"}]},"doc://DiscogsService/documentation/DiscogsService/Operations":{"navigatorTitle":[{"kind":"identifier","text":"Operations"}],"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Operations"}],"url":"\/documentation\/discogsservice\/operations","role":"symbol","type":"topic","kind":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","abstract":[{"text":"API operations, with input and output types, generated from ","type":"text"},{"code":"#\/paths","type":"codeVoice"},{"text":" in the OpenAPI document.","type":"text"}],"title":"Operations"},"doc://DiscogsService/documentation/DiscogsService/Operations/searchDatabase/Input/Query-swift.struct":{"navigatorTitle":[{"kind":"identifier","text":"Query"}],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Query"}],"url":"\/documentation\/discogsservice\/operations\/searchdatabase\/input\/query-swift.struct","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/searchDatabase\/Input\/Query-swift.struct","title":"Operations.searchDatabase.Input.Query","kind":"symbol","role":"symbol","abstract":[],"type":"topic"}}}