/modelina

Library for generating data models based on inputs such as AsyncAPI, OpenAPI, or JSON Schema documents.

Primary LanguageTypeScriptApache License 2.0Apache-2.0


AsyncAPI logo
Modelina

Modelina is the official AsyncAPI SDK used to generate different data models (i.e. Java/TypeScript classes, Go Structs, etc) for AsyncAPI documents, among other supported inputs.

Coverage Status

All Contributors


πŸ“’ ATTENTION:

This package is still under development and has not reached version 1.0.0 yet. This means that its API may contain breaking changes until we're able to deploy the first stable version and begin semantic versioning. Please use tests to ensure expected outputs or to hardcode the version.


Requirements

Feel free to submit an issue if you require this project in other use-cases.

Installation

Run this command to install Modelina in your project:

npm install @asyncapi/modelina

Once you've successfully installed Modelina in your project, it's time to select your generator. Check out the examples for the specific code.

Features

The following table provides a short summary of available features for supported output languages.

To see the complete feature list for each language, please click the individual links for each language.

Supported inputs description
AsyncAPI We support the following AsyncAPI versions: 2.0.0, 2.1.0 and 2.2.0, which generates models for all the defined message payloads.
JSON Schema We support the following JSON Schema versions: Draft-4, Draft-6 and Draft-7
OpenAPI We support the following OpenAPI versions: Swagger 2.0 and OpenAPI 3.0, which generates models for all the defined path request and responses.

Supported outputs Features
Java Class and enum generation: generation of equals, hashCode, toString, Jackson annotation, custom indentation type and size, etc
TypeScript Class, interface and enum generation: generation of example code, un/marshal functions, custom indentation type and size, etc
C# Class and enum generation: generation of example code, serializer and deserializer functions, custom indentation type and size, etc
Go Struct and enum generation: custom indentation type and size, etc
JavaScript Class generation: custom indentation type and size, etc

Roadmap

Documentation

The documentation for this library can all be found under the documentation README.

Examples

We have gathered all the examples, in a separate folder to ensure consistency, they can be found under the example folder.

Development

To setup your development environment please read the development document.

Contributing

Read our contributor guide.

Contributors ✨

Thanks goes to these wonderful people (emoji key):


Maciej UrbaΕ„czyk

πŸ› πŸ’» πŸ“– πŸ€” 🚧 πŸ’¬ ⚠️ πŸ‘€

czlowiek488

πŸ› πŸ‘€ πŸ€”

Sergio Moya

πŸ› πŸ’» ⚠️ πŸ“– πŸ‘€

Jonas Lagoni

πŸ› πŸ’» πŸ“– πŸ€” 🚧 πŸ’¬ ⚠️ πŸ‘€

Lukasz Gornicki

πŸ‘€ πŸ› πŸ’»

Arjun Garg

πŸ’»

Fran MΓ©ndez

πŸ‘€

Kanwal Singh

πŸ’»

Alejandra Quetzalli

πŸ‘€ πŸ“–

MD SAIF HUSAIN

πŸ’‘ ⚠️ πŸ“– πŸ’»

Sudipto Ghosh

πŸ’‘ ⚠️ πŸ“–

panwauu

πŸ’» ⚠️ πŸ’‘ πŸ“– πŸ›

Stefan E. Mayer

πŸ›

Talmiz Ahmed

πŸ“– ⚠️ πŸ’‘

Marco

πŸ›

This project follows the all-contributors specification. Contributions of any kind welcome!