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-example - A basic example of how to use Modelina and output a TypeScript class with an example function.
- typescript-generate-marshalling - A basic example of how to use the un/marshalling functionality of the typescript class.
- typescript-generate-comments - A basic example of how to generate TypeScript interfaces with comments from description and example fields.
- 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-files - 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
- csharp-overwrite-enum-naming - A basic example on how to generate enum value names.
- csharp-use-inheritance - A basic example that shows how to introduce inheritance to classes
- 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.
- javascript-generate-marshalling - A basic example of how to use the un/marshalling functionality of the javascript class.
- javascript-generate-example - A basic example of how to use Modelina and output a JavaScript class with an example function.
- 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.
- java-generate-equals - A basic example that shows how to generate models that overwrite the
equal
method - generate-csharp-models - A basic example to generate C# data models
- java-change-collection-type - An example to render collections as List in Java.
- java-generate-hashcode - A basic example that shows how to generate models that overwrite the
hashCode
method - java-from-typescript-type - A basic example that shows how to generate a Java model from a TypeScript type input file.
- java-generate-marshalling - A basic example of how to use the un/marshalling functionality of the java class.
- java-from-typescript-type-with-options - A basic example that shows how to generate a Java model from a TypeScript type input file along with user provided options.