Modelina
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.
Installation & Usage
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
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
import { JavaGenerator, JAVA_COMMON_PRESET } from '@asyncapi/modelina' const generator = new JavaGenerator({ collectionType: "List", presets: [ { preset: JAVA_COMMON_PRESET, options: { classToString: true } } ] }); // const input = ...AsyncAPI document const models = await generator.generate(input)