Lint a specification against a set of security-oriented rules.
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);