
Security News
gem.coop Tests Dependency Cooldowns as Package Ecosystems Move to Slow Down Attacks
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.
@asyncapi/openapi-schema-parser
Advanced tools
An AsyncAPI schema parser for OpenAPI 3.0.x and Swagger 2.x schemas.
An AsyncAPI schema parser for OpenAPI 3.0.x and Swagger 2.x schemas.
Note Version >=
3.0.0of package is only supported by@asyncapi/parserversion >=2.0.0.
npm install @asyncapi/openapi-schema-parser
// OR
yarn add @asyncapi/openapi-schema-parser
import { Parser } from '@asyncapi/parser';
import { OpenAPISchemaParser } from '@asyncapi/openapi-schema-parser';
const parser = new Parser();
parser.registerSchemaParser(OpenAPISchemaParser());
const asyncapiWithOpenAPI = `
asyncapi: 2.0.0
info:
title: Example with OpenAPI
version: 0.1.0
channels:
example:
publish:
message:
schemaFormat: 'application/vnd.oai.openapi;version=3.0.0'
payload: # The following is an OpenAPI schema
type: object
properties:
title:
type: string
nullable: true
author:
type: string
example: Jack Johnson
`;
const { document } = await parser.parse(asyncapiWithOpenAPI);
const { Parser } = require('@asyncapi/parser');
const { OpenAPISchemaParser } = require('@asyncapi/openapi-schema-parser');
const parser = new Parser();
parser.registerSchemaParser(OpenAPISchemaParser());
const asyncapiWithOpenAPI = `
asyncapi: 2.0.0
info:
title: Example with OpenAPI
version: 0.1.0
channels:
example:
publish:
message:
schemaFormat: 'application/vnd.oai.openapi;version=3.0.0'
payload: # The following is an OpenAPI schema
type: object
properties:
title:
type: string
nullable: true
author:
type: string
example: Jack Johnson
`;
const { document } = await parser.parse(asyncapiWithOpenAPI);
It also supports referencing remote OpenAPI schemas:
import { Parser } from '@asyncapi/parser';
import { OpenAPISchemaParser } from '@asyncapi/openapi-schema-parser';
const parser = new Parser();
parser.registerSchemaParser(OpenAPISchemaParser());
const asyncapiWithOpenAPI = `
asyncapi: 2.0.0
info:
title: Example with OpenAPI
version: 0.1.0
channels:
example:
publish:
message:
schemaFormat: 'application/vnd.oai.openapi;version=3.0.0'
payload:
$ref: 'yourserver.com/schemas#/Book'
`;
const { document } = await parser.parse(asyncapiWithOpenAPI);
FAQs
An AsyncAPI schema parser for OpenAPI 3.0.x and Swagger 2.x schemas.
The npm package @asyncapi/openapi-schema-parser receives a total of 168,485 weekly downloads. As such, @asyncapi/openapi-schema-parser popularity was classified as popular.
We found that @asyncapi/openapi-schema-parser demonstrated a not healthy version release cadence and project activity because the last version was released 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
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.

Security News
Following multiple malicious extension incidents, Open VSX outlines new safeguards designed to catch risky uploads earlier.

Research
/Security News
Threat actors compromised four oorzc Open VSX extensions with more than 22,000 downloads, pushing malicious versions that install a staged loader, evade Russian-locale systems, pull C2 from Solana memos, and steal macOS credentials and wallets.