GithubHelp home page GithubHelp logo

doc22940 / parser-js Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asyncapi/parser-js

0.0 1.0 0.0 79.35 MB

AsyncAPI parser for Javascript (browser-compatible too).

License: Apache License 2.0

JavaScript 99.97% HTML 0.03%

parser-js's Introduction


AsyncAPI logo
JS Parser

Parse and validate AsyncAPI documents


📢 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

parser-js's People

Contributors

fmvilas avatar jonaslagoni avatar rmelian avatar pchol avatar waleedashraf avatar dependabot[bot] avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.