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

@asyncapi/converter

Package Overview
Dependencies
Maintainers
3
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@asyncapi/converter

Convert AsyncAPI documents from older to newer versions.

  • 0.6.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20K
increased by5.11%
Maintainers
3
Weekly downloads
 
Created
Source

AsyncAPI Converter

Convert AsyncAPI documents older to newer versions.

Installation

npm i -g @asyncapi/converter

Usage

From CLI

Minimal example:

asyncapi-converter streetlights.yml

# Result:
asyncapi: '2.0.0'
channels:
...

Specify the application id:

asyncapi-converter --id=urn:com.asynapi.streetlights streetlights.yml

# Result:
asyncapi: '2.0.0'
id: 'urn:com.asynapi.streetlights'
...

Save the result in a file:

asyncapi-converter streetlights.yml > streetlights2.yml

As a package

const { convert } = require('@asyncapi/converter')

try {
  const asyncapi = fs.readFileSync('streetlights.yml', 'utf-8')
  console.log(convert(asyncapi, '2.0.0', {
      id: 'urn:com.asyncapi.streetlights'
  }))
} catch (e) {
  console.error(e)
}

Known missing features

  • When converting from 1.x to 2.x, Streaming APIs (those using stream instead of topics or events) are converted correctly but information about framing type and delimiter is missing until a protocolInfo for that purpose is created.

Keywords

FAQs

Package last updated on 12 Jan 2022

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