From 53d395cde51b2226303ad556126a1f2ffc5f00a4 Mon Sep 17 00:00:00 2001 From: Kartik Gupta <84975264+kartik-gupta-ij@users.noreply.github.com> Date: Fri, 9 Aug 2024 14:41:12 +0530 Subject: [PATCH] Update links to documentation (#195) * Update links to documentation * fmt * replace `_` to `-` in `operationId` * fmt --- src/components/EditorCommon/config/Rules.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/EditorCommon/config/Rules.js b/src/components/EditorCommon/config/Rules.js index c64244fa..07a752b2 100644 --- a/src/components/EditorCommon/config/Rules.js +++ b/src/components/EditorCommon/config/Rules.js @@ -2,7 +2,7 @@ import { OpenapiDocs } from 'autocomplete-openapi/src/request-docs'; import openapi from '/openapi.json??url&raw'; const Method = ['POST', 'GET', 'PUT', 'DELETE', 'PATCH', 'HEAD']; -const DOCS_BASE_URL = 'https://qdrant.github.io/qdrant/redoc/index.html#tag/'; +const DOCS_BASE_URL = 'https://api.qdrant.tech/api-reference/'; const apiDocs = new OpenapiDocs(JSON.parse(openapi)); @@ -101,7 +101,8 @@ export function btnconfig(commandId, beutifyCommandId, docsCommandId) { const terminal = apiDocs.getRequestDocs(codeBlocks[i].blockText.split('\n')[0]); if (terminal) { - const docsURL = DOCS_BASE_URL + terminal.tags[0] + '/operation/' + terminal.operationId; + terminal.operationId = terminal.operationId.replace('_', '-'); + const docsURL = DOCS_BASE_URL + terminal.tags[0] + '/' + terminal.operationId; lenses.push({ range, id: 'DOCS',