
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@nock/openapi
Advanced tools
`@nock/openapi` is a library for mocking HTTP requests based on OpenAPI 3.x specifications. It simplifies testing by ensuring your mocks align with your API contract.
@nock/openapi is a library for mocking HTTP requests based on OpenAPI 3.x specifications. It simplifies testing by ensuring your mocks align with your API contract.
Inspired by OpenAPI-msw
pnpm install @nock/openapi
import { loadOpenApiSpec } from "@nock/openapi";
import type { paths } from './fixtures/schema.ts'; // Generated wit openapi-typescript
it('should mock a response body according to OpenAPI spec', async () => {
const spec = await loadOpenApiSpec<paths>(exampleSwagger, 'https://petstore3.swagger.io')
spec.get('/store/order/123')
.reply(200, { id: 123 }, {
'Content-Type': 'application/json'
});
const response = await fetch('https://petstore3.swagger.io/store/order/123')
expect(response.status).toBe(200)
expect(await response.json()).toEqual({
id: 123,
petId: 198772,
quantity: 7,
shipDate: "2019-08-24T14:15:22Z",
status: "approved",
complete: true,
})
})
This project is licensed under the MIT License.
FAQs
`@nock/openapi` is a library for mocking HTTP requests based on OpenAPI 3.x specifications. It simplifies testing by ensuring your mocks align with your API contract.
We found that @nock/openapi demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.