39e9dc5d53
This PR contains the rock done to securize the /GET `/oauth/identity` endpoints on the OpenAPI specification document, plus it also improves the endpoints ordering in the *Database* section. Reviewed-on: #10 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
{"primaryContentSections":[{"kind":"declarations","declarations":[{"languages":["swift"],"platforms":["macOS"],"tokens":[{"text":"func","kind":"keyword"},{"text":" ","kind":"text"},{"text":"postAccessToken","kind":"identifier"},{"text":"(","kind":"text"},{"text":"headers","kind":"externalParam"},{"text":": ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"PostAccessToken","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"text":".","kind":"text"},{"text":"Input","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV"},{"text":".","kind":"text"},{"text":"Headers","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input\/Headers-swift.struct","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV7HeadersV"},{"text":") ","kind":"text"},{"text":"async","kind":"keyword"},{"text":" ","kind":"text"},{"text":"throws","kind":"keyword"},{"text":" -> ","kind":"text"},{"text":"Operations","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"text":".","kind":"text"},{"text":"PostAccessToken","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"text":".","kind":"text"},{"text":"Output","kind":"typeIdentifier","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO"}]}]},{"content":[{"level":2,"anchor":"discussion","type":"heading","text":"Discussion"},{"inlineContent":[{"type":"text","text":"Provide to the service some required credentials details to obtain an access token at the end of the "},{"type":"emphasis","inlineContent":[{"text":"OAuth","type":"text"}]},{"type":"text","text":" process."}],"type":"paragraph"},{"inlineContent":[{"type":"text","text":"This endpoint represents the "},{"type":"reference","isActive":true,"identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url"},{"type":"text","text":", thus it requires to configure an "},{"type":"emphasis","inlineContent":[{"text":"Authorization","type":"text"}]},{"type":"text","text":" header to have a value like this:"}],"type":"paragraph"},{"type":"codeListing","syntax":null,"code":["OAuth oauth_consumer_key=\"your_consumer_key\", oauth_nonce=\"random_string_or_timestamp\", oauth_token=\"oauth_token_received_from_step_2\" oauth_signature=\"your_consumer_secret&\", oauth_signature_method=\"PLAINTEXT\", oauth_timestamp=\"current_timestamp\", oauth_verifier=\"users_verifier\""]},{"inlineContent":[{"type":"text","text":"For further details about this process, please refer to the "},{"type":"reference","isActive":true,"identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow"},{"type":"text","text":" section in the "},{"type":"reference","isActive":true,"identifier":"https:\/\/www.discogs.com\/developers#page:authentication"},{"type":"text","text":" documentation."}],"type":"paragraph"},{"type":"aside","name":"Remark","content":[{"type":"paragraph","inlineContent":[{"text":"HTTP ","type":"text"},{"code":"POST \/oauth\/access_token","type":"codeVoice"},{"text":".","type":"text"}]}],"style":"note"},{"type":"aside","name":"Remark","content":[{"type":"paragraph","inlineContent":[{"text":"Generated from ","type":"text"},{"code":"#\/paths\/\/oauth\/access_token\/post(postAccessToken)","type":"codeVoice"},{"text":".","type":"text"}]}],"style":"note"}],"kind":"content"}],"identifier":{"interfaceLanguage":"swift","url":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(headers:)"},"variants":[{"paths":["\/documentation\/discogsservice\/client\/postaccesstoken(headers:)"],"traits":[{"interfaceLanguage":"swift"}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"hierarchy":{"paths":[["doc:\/\/DiscogsService\/documentation\/DiscogsService","doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client"]]},"metadata":{"modules":[{"name":"DiscogsService"}],"symbolKind":"method","title":"postAccessToken(headers:)","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV7HeadersV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO"}],"roleHeading":"Instance Method","externalID":"s:14DiscogsService11APIProtocolPAAE15postAccessToken7headersAA10OperationsO04PosteF0O6OutputOAI5InputV7HeadersV_tYaKF::SYNTHESIZED::s:14DiscogsService6ClientV","extendedModule":"DiscogsService","role":"symbol"},"kind":"symbol","abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"references":{"doc://DiscogsService/documentation/DiscogsService":{"type":"topic","role":"collection","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService","title":"DiscogsService","abstract":[],"url":"\/documentation\/discogsservice","kind":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations":{"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Operations","kind":"identifier"}],"title":"Operations","navigatorTitle":[{"text":"Operations","kind":"identifier"}],"identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations","kind":"symbol","url":"\/documentation\/discogsservice\/operations","abstract":[{"text":"API operations, with input and output types, generated from ","type":"text"},{"type":"codeVoice","code":"#\/paths"},{"text":" in the OpenAPI document.","type":"text"}],"role":"symbol","type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken":{"title":"Operations.PostAccessToken","kind":"symbol","abstract":[{"text":"Provide required credentials data to obtain an access token.","type":"text"}],"navigatorTitle":[{"text":"PostAccessToken","kind":"identifier"}],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"PostAccessToken","kind":"identifier"}],"url":"\/documentation\/discogsservice\/operations\/postaccesstoken","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken","type":"topic","role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Input":{"title":"Operations.PostAccessToken.Input","kind":"symbol","abstract":[],"navigatorTitle":[{"text":"Input","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Input","kind":"identifier"}],"url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/input","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input","type":"topic","role":"symbol"},"https://www.discogs.com/developers#page:authentication,header:authentication-oauth-flow":{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","title":"OAuth flow","url":"https:\/\/www.discogs.com\/developers#page:authentication,header:authentication-oauth-flow","type":"link","titleInlineContent":[{"type":"text","text":"OAuth flow"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Output":{"kind":"symbol","role":"symbol","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Output","title":"Operations.PostAccessToken.Output","abstract":[],"fragments":[{"text":"enum","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Output","kind":"identifier"}],"navigatorTitle":[{"text":"Output","kind":"identifier"}],"url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/output","type":"topic"},"doc://DiscogsService/documentation/DiscogsService/Client":{"title":"Client","kind":"symbol","abstract":[{"type":"text","text":"The Discogs API v2.0 is a RESTful interface to Discogs data. You can access JSON-formatted information about Database objects such as "},{"type":"emphasis","inlineContent":[{"text":"Artists","type":"text"}]},{"type":"text","text":", "},{"type":"emphasis","inlineContent":[{"text":"Releases","type":"text"}]},{"type":"text","text":", and "},{"type":"emphasis","inlineContent":[{"text":"Labels","type":"text"}]},{"type":"text","text":". Your application can also manage "},{"type":"emphasis","inlineContent":[{"text":"User Collections","type":"text"}]},{"type":"text","text":" and "},{"type":"emphasis","inlineContent":[{"text":"Wantlists","type":"text"}]},{"type":"text","text":", create "},{"type":"emphasis","inlineContent":[{"text":"Marketplace","type":"text"}]},{"type":"text","text":" listings, and more."}],"navigatorTitle":[{"text":"Client","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Client","kind":"identifier"}],"url":"\/documentation\/discogsservice\/client","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client","type":"topic","role":"symbol"},"https://www.discogs.com/developers#page:authentication":{"identifier":"https:\/\/www.discogs.com\/developers#page:authentication","title":"Discogs API authentication","url":"https:\/\/www.discogs.com\/developers#page:authentication","type":"link","titleInlineContent":[{"type":"text","text":"Discogs API authentication"}]},"https://www.discogs.com/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url":{"identifier":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","title":"4th step of the OAuth flow process","url":"https:\/\/www.discogs.com\/developers#header-4.-send-a-post-request-to-the-discogs-access-token-url","type":"link","titleInlineContent":[{"type":"text","text":"4th step of the OAuth flow process"}]},"doc://DiscogsService/documentation/DiscogsService/Operations/PostAccessToken/Input/Headers-swift.struct":{"title":"Operations.PostAccessToken.Input.Headers","kind":"symbol","abstract":[],"navigatorTitle":[{"text":"Headers","kind":"identifier"}],"fragments":[{"text":"struct","kind":"keyword"},{"text":" ","kind":"text"},{"text":"Headers","kind":"identifier"}],"url":"\/documentation\/discogsservice\/operations\/postaccesstoken\/input\/headers-swift.struct","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Operations\/PostAccessToken\/Input\/Headers-swift.struct","type":"topic","role":"symbol"},"doc://DiscogsService/documentation/DiscogsService/Client/postAccessToken(headers:)":{"kind":"symbol","title":"postAccessToken(headers:)","abstract":[{"type":"text","text":"Provide required credentials data to obtain an access token."}],"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"postAccessToken"},{"kind":"text","text":"("},{"kind":"externalParam","text":"headers"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Input","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Headers","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO5InputV7HeadersV"},{"kind":"text","text":") "},{"kind":"keyword","text":"async"},{"kind":"text","text":" "},{"kind":"keyword","text":"throws"},{"kind":"text","text":" -> "},{"kind":"typeIdentifier","text":"Operations","preciseIdentifier":"s:14DiscogsService10OperationsO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"PostAccessToken","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO"},{"kind":"text","text":"."},{"kind":"typeIdentifier","text":"Output","preciseIdentifier":"s:14DiscogsService10OperationsO15PostAccessTokenO6OutputO"}],"type":"topic","identifier":"doc:\/\/DiscogsService\/documentation\/DiscogsService\/Client\/postAccessToken(headers:)","url":"\/documentation\/discogsservice\/client\/postaccesstoken(headers:)","role":"symbol"}}} |