Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

asyncapi-parser

Package Overview
Dependencies
Maintainers
1
Versions
29
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

asyncapi-parser

JavaScript AsyncAPI parser.

  • 0.6.0
  • npm
  • Socket score

Version published
Weekly downloads
202
increased by5.76%
Maintainers
1
Weekly downloads
 
Created
Source

AsyncAPI logo
JS Parser
Parse and validate AsyncAPI documents

:loudspeaker: ATTENTION:

This package is under development and it has not reached version 1.0.0 yet, what means its API might change without prior notice. Once it reaches its first stable version, we'll follow semantic versioning.


Use this package to parse and validate AsyncAPI documents —either YAML or JSON— in your Node.js or browser application.

This package doesn't support AsyncAPI 1.x.

Install

npm install asyncapi-parser

API

Check out the API page.

Example
const parser = require('asyncapi-parser');

const doc = await parser.parse(`
  asyncapi: '2.0.0-rc1'
  info:
    title: Example
    version: '0.1.0'
  channels:
    example-channel:
      subscribe:
        message:
          payload:
            type: object
            properties:
              exampleField:
                type: string
              exampleNumber:
                type: number
              exampleDate:
                type: string
                format: date-time
`);

console.log(doc.info().title());
// => Example
Example
const parser = require('asyncapi-parser');

const doc = await parser.parseUrl('https://my.server.com/example-asyncapi.yaml');

console.log(doc.info().title());
// => Example

FAQs

Package last updated on 19 Aug 2019

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc