asyncapi-types

3.0.2 • Public • Published

asyncapi-types

npm npm downloads JSR JSR Score

Types for AsyncAPI in separate package.

Installation

Install types for v3 version of spec

npm i asyncapi-types@^3 -d

Install types for v2 version of spec

npm i asyncapi-types@^2 -d

Usage

import type { AsyncAPIObject } from "asyncapi-types";

const asyncapi: AsyncAPIObject = {
    asyncapi: "3.0.0",
    info: {
        title: "My API",
        version: "1.0.0",
    },
    channels: {
        "my-channel": {
            messages: {
                "my-message": {
                    payload: { type: "string" },
                },
            },
        },
    },
};

TODO

Thanks

This package is copy-pasted from @asyncapi/parser-js/spec-types with Apache 2.0 license to use only types and not the whole parser.

License

This project is licensed under the Apache 2.0 License.

Readme

Keywords

none

Package Sidebar

Install

npm i asyncapi-types

Weekly Downloads

5

Version

3.0.2

License

Apache-2.0

Unpacked Size

30.8 kB

Total Files

4

Last publish

Collaborators

  • skravets