Skip to content

kravetsone/asyncapi-types

Repository files navigation

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published