Skip to content

Commit

Permalink
Update links to documentation (#195)
Browse files Browse the repository at this point in the history
* Update links to documentation

* fmt

* replace `_` to `-` in `operationId`

* fmt
  • Loading branch information
kartik-gupta-ij authored Aug 9, 2024
1 parent 6e2e2e8 commit 53d395c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/components/EditorCommon/config/Rules.js
Original file line number Diff line number Diff line change
Expand Up @@ -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));

Expand Down Expand Up @@ -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',
Expand Down

0 comments on commit 53d395c

Please sign in to comment.