-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(language-apidom): enable linting for OpenAPI 2.0 (#4647)
OpenAPI 2.0 linting currently contains single linting rule. More rules will come with time.
- Loading branch information
Showing
1 changed file
with
0 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; | ||
|
@@ -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()) { | ||
|