
Security News
NVD Quietly Sweeps 100K+ CVEs Into a “Deferred” Black Hole
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
api-smart-diff
Advanced tools
Generate the diff between two API specifications (OpenAPI, AsyncAPI, JsonSchema)
This package provides utils to compute the diff between two API specifications.
npm install api-smart-diff --save
import { apiDiff } from 'api-smart-diff'
const diff = apiDiff(oldSpec, newSpec, { rules: "OpenApi3" })
// {
// action: "add" | "remove" | "replace",
// after: 'value in newSpec',
// before: 'value in oldSpec',
// path: ['path, 'in', 'array', 'format'],
// type: "annotation" | "breaking" | "non-breaking" | "unclassified"
// }
const merge = apiMerge(oldSpec, newSpec, { rules: "OpenApi3" })
A browser version of api-smart-diff
is also available via CDN:
<script src="https://cdn.jsdelivr.net/npm/api-smart-diff@latest/browser/api-smart-diff.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/api-smart-diff@latest/browser/api-smart-diff.js"></script>
Reference api-smart-diff.min.js
in your HTML and use the global variable ApiSmartDiff
.
<script>
var diff = ApiSmartDiff.apiDiff(oldSpec, newSpec, { rules: "OpenApi3" })
var merge = ApiSmartDiff.apiMerge(oldSpec, newSpec, { rules: "OpenApi3" })
</script>
MIT
FAQs
Generate the diff between two API specifications (OpenAPI, AsyncAPI, GraphApi, JsonSchema)
We found that api-smart-diff demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
NVD now marks all pre-2018 CVEs as "Deferred," signaling it will no longer enrich older vulnerabilities, further eroding trust in its data.
Research
Security News
Lazarus-linked threat actors expand their npm malware campaign with new RAT loaders, hex obfuscation, and over 5,600 downloads across 11 packages.
Security News
Safari 18.4 adds support for Iterator Helpers and two other TC39 JavaScript features, bringing full cross-browser coverage to key parts of the ECMAScript spec.