0.1.0 • Published 1 year ago

@impart-security/spec-linter v0.1.0

Weekly downloads
-
License
Apache-2.0
Repository
-
Last release
1 year ago

spec-linter

Lint a specification against a set of security-oriented rules.

Example usage

import { specLinter } from "@impart-security/spec-linter";

const spec = {
  openapi: "3.0.0",
  info: {
    title: "Test",
    version: "1.0.0",
  },
  paths: {
    "/test": {
      get: {
        responses: {
          "200": {
            description: "OK",
          },
        },
      },
    },
  },
};

const { results, output } = await specLinter(spec);

console.log(results);
console.log(output);