Types for AsyncAPI in separate package.
npm i asyncapi-types@^3 -d
npm i asyncapi-types@^2 -d
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" },
},
},
},
},
};
- [ ] Add guide how to use both versions of types in one project
- [ ] Improve
bindings
types based on https://github.com/asyncapi/bindings/blob/master
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.
This project is licensed under the Apache 2.0 License.