This directory contains a series of self-contained examples that you can use as starting points, or as snippets to pull into your existing applications:
- generate-typescript-models - A basic example to generate TypeScript data models
- typescript-interface - A basic TypeScript generator that outputs interfaces.
- typescript-enum-type - A basic example of how to use Modelina can output different types of enums in TypeScript.
- typescript-generate-marshalling - A basic example of how to use the un/marshalling functionality of the typescript class.
- typescript-generate-example - A basic example of how to use Modelina and output a TypeScript class with an example function.
- typescript-use-esm - A basic example that generate the models to use ESM module system.
- typescript-use-cjs - A basic example that generate the models to use CJS module system.
- indentation-type-and-size - This example shows how to change the indentation type and size of the generated model.
- asyncapi-from-object - A basic example where an AsyncAPI JS object is used to generate models.
- asyncapi-from-parser - A basic example where an AsyncAPI JS object from the parser-js is used to generate models.
- json-schema-draft7-from-object - A basic example where a JSON Schema draft 7 JS object is used to generate models.
- swagger2.0-from-object - A basic example where a Swagger 2.0 JS object is used to generate models.
- java-generate-javax-constraint-annotation - A basic example that shows how Java data models having
javax.validation.constraints
annotations can be generated. - java-generate-javadoc - A basic example of how to generate Java models including JavaDocs.
- custom-logging - A basic example where a custom logger is used.
- generate-to-file - A basic example that shows how you can generate the models directly to files.
- TEMPLATE - A basic template used to create new examples.
- java-generate-tostring - A basic example that shows how to generate models that overwrite the
toString
method - csharp-generate-equals-and-hashcode - A basic example on how to generate models that overwrite the
Equal
andGetHashCode
methods - csharp-generate-serializer - A basic example on how to generate models that include function to serialize the data models to JSON
- generate-javascript-models - A basic example to generate JavaScript data models
- javascript-use-esm - A basic example that generate the models to use ESM module system.
- javascript-use-cjs - A basic example that generate the models to use CJS module system.
- generate-java-models - A basic example to generate Java data models.
- generate-go-models - A basic example to generate Go data models
- include-custom-function - A basic example where a custom function is included.
- generate-csharp-models - A basic example to generate C# data models