Sometimes you just want to generate data models for your payload. Modelina is a library for generating data models based on inputs such as AsyncAPI, OpenAPI, or JSON Schema documents.
Start using Modelina really quickly. Select one of the available languages we offer and start generating models from your AsyncAPI document in a few seconds.
npm install @asyncapi/modelina
1import { JavaGenerator, JAVA_COMMON_PRESET } from '@asyncapi/modelina'
2
3const generator = new JavaGenerator({
4 collectionType: "List",
5 presets: [
6 {
7 preset: JAVA_COMMON_PRESET,
8 options: {
9 classToString: true
10 }
11 }
12 ]
13});
14
15// const input = ...AsyncAPI document
16const models = await generator.generate(input)
Modelina Playground works only on the desktop devices.