swagger-api / apidom-ls-client

Demo client for apidom-ls OpenAPI / AsyncAPI ApiDOM validation service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

apidom-ls-client

Demo client for apidom-ls OpenAPI / AsyncAPI ApiDOM validation service

Usage

npm install
npm run process

Providing rules

Add rules to array returned from file src/rules.ts

Field given expects an array of string representing the element items to apply the rules to (e.g. schema, operation) (TBD: jsonpath on the way)

element is a string semantically identifying a node in the document, available elements can be found by:

  1. look at this elements list and pick the this.element value within the file.
  2. additional element values with this query

Several example of rules here

Core functions available in rules are available here TBD: core functions will be exported by apidom-ls e.g. to be usable/extended within custom functions.

run npm run process to execute with the added/updated rules

Providing functions

Custom functions can be provided either "natively" by adding them to the object returned by src/functions.ts or as evaluated functions by adding a <functionName>.js file to functions directory

About

Demo client for apidom-ls OpenAPI / AsyncAPI ApiDOM validation service


Languages

Language:TypeScript 96.4%Language:JavaScript 3.6%