@swagger-api/apidom-ls
TypeScript icon, indicating that this package has built-in type declarations

0.99.1 • Public • Published

ApiDOM Language Service (apidom-ls)

The ApiDOM Language Service (apidom-ls) contains the language smarts powering ApiDOM supported languages processing, specifically editing experience.

ApiDOM Language Service APIs adhere to LSP Protocol and are therefore usable via a LSP Server wrapper in a variety of editors and IDEs.

Installation

After prerequisites for installing this package are satisfied, you can install it via npm CLI by running the following command:

 $ npm install @swagger-api/apidom-ls

Project current status

Please note that ApiDOM Language Service is still in unstable status, with planned APIs changes specifically in terms of "configuration rules" structure.

Quick start (WIP)

Validation

import { getLanguageService } from '@swagger-api/apidom-ls';
import { TextDocument } from 'vscode-languageserver-textdocument';
...

const apidomContext = {};
const languageService = getLanguageService(apidomContext);

const oas31orAsyncapiDoc = 'asyncapi: 2.2.0';
const doc = TextDocument.create('foo://bar/file.yaml', 'apidom', 0, oas31orAsyncapiDoc);
const diagnostics = await languageService.doValidation(document);
console.log(JSON.stringify(diagnostics, null, 2);

Readme

Keywords

none

Package Sidebar

Install

npm i @swagger-api/apidom-ls

Weekly Downloads

1,743

Version

0.99.1

License

Apache-2.0

Unpacked Size

17.6 MB

Total Files

3987

Last publish

Collaborators

  • swagger-api