Skip to content

Commit

Permalink
feat(language-apidom): enable linting for OpenAPI 2.0 (#4647)
Browse files Browse the repository at this point in the history
OpenAPI 2.0 linting currently contains single
linting rule. More rules will come with time.
  • Loading branch information
char0n authored Dec 6, 2023
1 parent 7b66c99 commit bacd968
Showing 1 changed file with 0 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import * as monaco from 'monaco-editor';
import { languages as vscodeLanguages } from 'vscode';
import { detectionRegExp as detectionRegExpOpenAPIJSON20 } from '@swagger-api/apidom-parser-adapter-openapi-json-2';
import { detectionRegExp as detectionRegExpOpenAPIYAML20 } from '@swagger-api/apidom-parser-adapter-openapi-yaml-2';

import Provider from './Provider.js';
import * as apidom from '../apidom.js';
Expand Down Expand Up @@ -79,14 +77,6 @@ class DiagnosticsProvider extends Provider {
}

async #getDiagnostics(model) {
// @TODO([email protected]): this needs to be removed to enable OpenAPI 2.0 linting
if (
detectionRegExpOpenAPIJSON20.test(model.getValue()) ||
detectionRegExpOpenAPIYAML20.test(model.getValue())
) {
return [];
}

const worker = await this.worker(model.uri);

if (model.isDisposed()) {
Expand Down

0 comments on commit bacd968

Please sign in to comment.