Skip to content

Commit

Permalink
feat: add diagnostics for incorrect specs
Browse files Browse the repository at this point in the history
  • Loading branch information
nikhilkalburgi committed May 10, 2024
2 parents c98c736 + 940e6e1 commit 8c7b1ed
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 5 deletions.
38 changes: 37 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 0 additions & 4 deletions src/PreviewMarkdown.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as vscode from 'vscode';
import * as path from 'path';
import { isAsyncAPIFile } from './PreviewWebPanel';

import { Parser, fromFile, AsyncAPIDocumentInterface } from '@asyncapi/parser';
import Asyncapi from './Asyncapi';
import { ISpectralDiagnostic } from '@stoplight/spectral-core';
Expand All @@ -13,7 +12,6 @@ const parser = new Parser();

async function buildMarkdown(document:AsyncAPIDocumentInterface | undefined, diagnostics: ISpectralDiagnostic[], context: vscode.ExtensionContext){


let content = '';

if(document !== undefined){
Expand All @@ -24,7 +22,6 @@ async function buildMarkdown(document:AsyncAPIDocumentInterface | undefined, dia
}

return content;

}

export function previewMarkdown(context: vscode.ExtensionContext) {
Expand Down Expand Up @@ -63,7 +60,6 @@ export async function openAsyncAPIMarkdown(context: vscode.ExtensionContext, uri
console.log(diagnostics);
let result = await buildMarkdown(document, diagnostics, context);


panel.title = path.basename(uri.fsPath);
panel.webview.html = getWebviewContent(context, panel.webview, uri, result);

Expand Down

0 comments on commit 8c7b1ed

Please sign in to comment.