428eedd89d
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>
1 line
13 KiB
JSON
1 line
13 KiB
JSON
{"schemaVersion":{"minor":3,"patch":0,"major":0},"sections":[],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol"]]},"variants":[{"traits":[{"interfaceLanguage":"swift"}],"paths":["\/documentation\/discogsservice\/apiprotocol\/getreleasestats(path:headers:)"]}],"abstract":[{"text":"Get information about statistics of release.","type":"text"}],"primaryContentSections":[{"declarations":[{"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getReleaseStats","kind":"identifier"},{"text":"(","kind":"text"},{"text":"path","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"getReleaseStats","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Path","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input\/Path-swift.struct","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV4PathV","kind":"typeIdentifier"},{"text":", ","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"getReleaseStats","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"Headers","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input\/Headers-swift.struct","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV7HeadersV","kind":"typeIdentifier"},{"text":" = .init()) ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO","text":"getReleaseStats","kind":"typeIdentifier"},{"text":".","kind":"text"},{"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Output","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO6OutputO","text":"Output","kind":"typeIdentifier"}],"platforms":["macOS"],"languages":["swift"]}],"kind":"declarations"},{"content":[{"level":2,"anchor":"discussion","text":"Discussion","type":"heading"},{"inlineContent":[{"type":"text","text":"Retrieves the total number of “haves” (in the community’s collections) and “wants” (in the community’s wantlists) for a given release."}],"type":"paragraph"},{"name":"Remark","style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"HTTP "},{"code":"GET \/releases\/{release_id}\/stats","type":"codeVoice"},{"type":"text","text":"."}]}],"type":"aside"},{"name":"Remark","style":"note","content":[{"type":"paragraph","inlineContent":[{"type":"text","text":"Generated from "},{"code":"#\/paths\/\/releases\/{release_id}\/stats\/get(getReleaseStats)","type":"codeVoice"},{"type":"text","text":"."}]}],"type":"aside"}],"kind":"content"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getReleaseStats(path:headers:)"},"kind":"symbol","metadata":{"title":"getReleaseStats(path:headers:)","modules":[{"name":"DiscogsService"}],"externalID":"s:14DiscogsService11APIProtocolPAAE15getReleaseStats4path7headersAA10OperationsOADO6OutputOAI5InputV4PathV_AM7HeadersVtYaKF","symbolKind":"method","extendedModule":"DiscogsService","fragments":[{"kind":"keyword","text":"func"},{"text":" ","kind":"text"},{"text":"getReleaseStats","kind":"identifier"},{"text":"(","kind":"text"},{"text":"path","kind":"externalParam"},{"text":": ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"text":".","kind":"text"},{"text":"getReleaseStats","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO","kind":"typeIdentifier"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Path","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV4PathV"},{"kind":"text","text":", "},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"getReleaseStats","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV"},{"text":".","kind":"text"},{"kind":"typeIdentifier","text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV7HeadersV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO","text":"Operations","kind":"typeIdentifier"},{"kind":"text","text":"."},{"kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO","text":"getReleaseStats"},{"text":".","kind":"text"},{"preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO6OutputO","text":"Output","kind":"typeIdentifier"}],"role":"symbol","roleHeading":"Instance Method"},"references":{"doc://DiscogsService/documentation/DiscogsService/APIProtocol/getReleaseStats(path:headers:)":{"role":"symbol","type":"topic","abstract":[{"text":"Get information about statistics of release.","type":"text"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/APIProtocol\/getReleaseStats(path:headers:)","title":"getReleaseStats(path:headers:)","url":"\/documentation\/discogsservice\/apiprotocol\/getreleasestats(path:headers:)","kind":"symbol","fragments":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"getReleaseStats","kind":"identifier"},{"text":"(","kind":"text"},{"text":"path","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"getReleaseStats","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO"},{"text":".","kind":"text"},{"text":"Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV"},{"text":".","kind":"text"},{"text":"Path","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV4PathV"},{"text":", ","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"getReleaseStats","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO"},{"text":".","kind":"text"},{"text":"Input","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV"},{"text":".","kind":"text"},{"text":"Headers","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO5InputV7HeadersV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"getReleaseStats","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO"},{"text":".","kind":"text"},{"text":"Output","kind":"typeIdentifier","preciseIdentifier":"s:14DiscogsService10OperationsO15getReleaseStatsO6OutputO"}]},"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/getReleaseStats":{"type":"topic","url":"\/documentation\/discogsservice\/operations\/getreleasestats","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats","kind":"symbol","title":"Operations.getReleaseStats","navigatorTitle":[{"kind":"identifier","text":"getReleaseStats"}],"abstract":[{"text":"Get information about statistics of release.","type":"text"}],"fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"getReleaseStats"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseStats/Input/Headers-swift.struct":{"navigatorTitle":[{"text":"Headers","kind":"identifier"}],"abstract":[],"role":"symbol","type":"topic","title":"Operations.getReleaseStats.Input.Headers","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Headers"}],"kind":"symbol","url":"\/documentation\/discogsservice\/operations\/getreleasestats\/input\/headers-swift.struct","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input\/Headers-swift.struct"},"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/getReleaseStats/Input":{"type":"topic","url":"\/documentation\/discogsservice\/operations\/getreleasestats\/input","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input","kind":"symbol","title":"Operations.getReleaseStats.Input","navigatorTitle":[{"text":"Input","kind":"identifier"}],"abstract":[],"fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"Input"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseStats/Output":{"navigatorTitle":[{"kind":"identifier","text":"Output"}],"abstract":[],"role":"symbol","type":"topic","title":"Operations.getReleaseStats.Output","fragments":[{"kind":"keyword","text":"enum"},{"kind":"text","text":" "},{"kind":"identifier","text":"Output"}],"kind":"symbol","url":"\/documentation\/discogsservice\/operations\/getreleasestats\/output","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Output"},"doc://DiscogsService/documentation/DiscogsService/Operations/getReleaseStats/Input/Path-swift.struct":{"navigatorTitle":[{"text":"Path","kind":"identifier"}],"abstract":[],"title":"Operations.getReleaseStats.Input.Path","role":"symbol","type":"topic","url":"\/documentation\/discogsservice\/operations\/getreleasestats\/input\/path-swift.struct","kind":"symbol","fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Path","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/getReleaseStats\/Input\/Path-swift.struct"},"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"}}} |