Skip to content

Commit

Permalink
docs: remove outdated generator docs (#1951)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaslagoni authored Apr 25, 2024
1 parent fb44842 commit 60d71e4
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 175 deletions.
3 changes: 0 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,6 @@ Contains many advanced ways to integrate Modelina _(i.e. websites)_.
### [Development](./development.md)
Explains how to setup the project for development.

### [Generators](./generators.md)
Details which different generator options are supported.

### [Presets](./presets.md)
Goes more in-depth into how the preset system works, which enables full customization of generators.

Expand Down
167 changes: 0 additions & 167 deletions docs/generators.md

This file was deleted.

6 changes: 3 additions & 3 deletions docs/languages/TypeScript.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ There are special use-cases that each language supports; this document pertains

## Generate an interface instead of classes

Sometimes you don't care about classes, but rather have interfaces generated. This can be changed through the [modelType configuration](https://github.com/asyncapi/modelina/blob/master/docs/generators.md#typescript).
Sometimes you don't care about classes, but rather have interfaces generated. This can be changed through the `modelType` configuration

Check out this [example out for a live demonstration](../../examples/typescript-interface).

## Generate different `mapType`s for an `object`

Typescript offers different `mapType`s which can simplify the use based on the needs. This behavior can be changed through the [`mapType` configuration](https://github.com/asyncapi/modelina/blob/master/docs/generators.md#typescript).
Typescript offers different `mapType`s which can simplify the use based on the needs. This behavior can be changed through the `mapType` configuration.

- Use `map` when you need a dynamic collection of key-value pairs with built-in methods for manipulation.
- Use `record` when you want to define an object with specific keys and their corresponding value types.
Expand All @@ -53,7 +53,7 @@ Also, check out this [example for a live demonstration](../../examples/typescrip

## Generate union types instead of enums

Typescript offers union types which can simplify the use as no keywords are needed and the values can be set directly. This behavior can be changed through the [modelType configuration](https://github.com/asyncapi/modelina/blob/master/docs/generators.md#typescript). An example of the generated code can be seen below:
Typescript offers union types which can simplify the use as no keywords are needed and the values can be set directly. This behavior can be changed through the `modelType` configuration. An example of the generated code can be seen below:

```ts
// enumType = 'enum'
Expand Down
2 changes: 1 addition & 1 deletion docs/usage.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ generator.render(model, inputModel, { ...options });

The output format is designed for you to use the generated models in further contexts. It might be part of a larger code generation such as AsyncAPI templates. This means that you can glue multiple models together into one large file, or split it out as you see fit.

All [generate functions](./generators.md) return an array of `OutputModel`s, which contains the following properties.
All `generate` functions return an array of `OutputModel`s, which contains the following properties.

| Property | Type | Description |
|---|---|---|
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@
"lint:modelina": "eslint --max-warnings 0 --config .eslintrc .",
"lint:cli": "cd modelina-cli && npm run lint",
"lint:fix": "eslint --max-warnings 0 --config .eslintrc . --fix",
"generate:readme:toc": "markdown-toc -i README.md && markdown-toc -i ./docs/other-tools.md && markdown-toc -i ./docs/languages/Scala.md && markdown-toc -i ./docs/languages/Php.md && markdown-toc -i ./docs/languages/Cplusplus.md && markdown-toc -i ./examples/README.md && markdown-toc -i ./docs/languages/Python.md && markdown-toc -i ./docs/usage.md && markdown-toc -i ./docs/integration.md && markdown-toc -i ./docs/advanced.md && markdown-toc -i ./docs/languages/Dart.md && markdown-toc -i ./docs/languages/TypeScript.md && markdown-toc -i ./docs/languages/Java.md && markdown-toc -i ./docs/languages/JavaScript.md && markdown-toc -i ./docs/languages/Csharp.md && markdown-toc -i ./docs/README.md && markdown-toc -i ./docs/generators.md && markdown-toc -i ./docs/presets.md",
"generate:readme:toc": "markdown-toc -i README.md && markdown-toc -i ./docs/other-tools.md && markdown-toc -i ./docs/languages/Scala.md && markdown-toc -i ./docs/languages/Php.md && markdown-toc -i ./docs/languages/Cplusplus.md && markdown-toc -i ./examples/README.md && markdown-toc -i ./docs/languages/Python.md && markdown-toc -i ./docs/usage.md && markdown-toc -i ./docs/integration.md && markdown-toc -i ./docs/advanced.md && markdown-toc -i ./docs/languages/Dart.md && markdown-toc -i ./docs/languages/TypeScript.md && markdown-toc -i ./docs/languages/Java.md && markdown-toc -i ./docs/languages/JavaScript.md && markdown-toc -i ./docs/languages/Csharp.md && markdown-toc -i ./docs/README.md && markdown-toc -i ./docs/presets.md",
"generate:assets": "npm run generate:assets:modelina && npm run generate:assets:cli",
"generate:assets:modelina": "npm run build:prod && npm run docs && npm run generate:readme:toc && npm run format",
"generate:assets:cli": "cd modelina-cli && npm run generate:assets",
Expand Down

0 comments on commit 60d71e4

Please sign in to comment.