diff --git a/packages/apidom-ls/src/config/openapi/header/lint/allowed-fields-2-0.ts b/packages/apidom-ls/src/config/openapi/header/lint/allowed-fields-2-0.ts index c0c6d6d1f..d0e0f95db 100644 --- a/packages/apidom-ls/src/config/openapi/header/lint/allowed-fields-2-0.ts +++ b/packages/apidom-ls/src/config/openapi/header/lint/allowed-fields-2-0.ts @@ -13,6 +13,7 @@ const allowedFields2_0Lint: LinterMeta = { linterFunction: 'allowedFields', linterParams: [ [ + 'description', 'type', 'format', 'items', diff --git a/packages/apidom-ls/test/validate-valid.ts b/packages/apidom-ls/test/validate-valid.ts index 0d1c1dad5..ae706895b 100644 --- a/packages/apidom-ls/test/validate-valid.ts +++ b/packages/apidom-ls/test/validate-valid.ts @@ -34,11 +34,18 @@ describe('apidom-ls-validate', function () { const oasPath = path.join(__dirname, 'fixtures', 'validation', 'oas', 'valid'); const asyncPath = path.join(__dirname, 'fixtures', 'validation', 'asyncapi', 'valid'); let dir = await fs.promises.opendir(oasPath); + try { for await (const dirent of dir) { console.log(`expecting ${path.join(dir.path, dirent.name)} to be valid`); + const pathToSpec = path.join(dir.path, dirent.name); const specString = fs.readFileSync(path.join(dir.path, dirent.name)).toString(); - const doc: TextDocument = TextDocument.create('foo://bar/doc.json', 'yaml', 0, specString); + const doc: TextDocument = TextDocument.create( + `foo://bar/${pathToSpec}`, + 'yaml', + 0, + specString, + ); const result = await languageService.doValidation(doc, validationContext); assert.deepEqual(result, [] as Diagnostic[]); }