Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
devilkiller-ag committed Dec 28, 2023
2 parents 6684c77 + 37a5306 commit 78b78ed
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 17 deletions.
9 changes: 9 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -817,6 +817,15 @@
"contributions": [
"doc"
]
},
{
"login": "officialasishkumar",
"name": "Asish Kumar",
"avatar_url": "https://avatars.githubusercontent.com/u/87874775?v=4",
"profile": "https://github.com/officialasishkumar",
"contributions": [
"doc"
]
}
],
"contributorsPerLine": 7,
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
[![Discussions](https://img.shields.io/github/discussions/asyncapi/modelina)](https://github.com/asyncapi/modelina/discussions)
[![Website](https://img.shields.io/website?label=website&url=https%3A%2F%2Fwww.modelina.org)](https://www.modelina.org)
[![Playground](https://img.shields.io/website?label=playground&url=https%3A%2F%2Fwww.modelina.org%2Fplayground)](https://www.modelina.org/playground) <!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
[![All Contributors](https://img.shields.io/badge/all_contributors-75-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-76-orange.svg?style=flat-square)](#contributors-)
<!-- ALL-CONTRIBUTORS-BADGE:END -->

Your one-stop tool for generating accurate and well-tested models for representing the message payloads. Use it as a tool in your development workflow, or a library in a larger integrations, entirely in your control.
Expand Down Expand Up @@ -419,6 +419,7 @@ Thanks go out to these wonderful people ([emoji key](https://allcontributors.org
<td align="center" valign="top" width="14.28%"><a href="http://harshil.prose.sh"><img src="https://avatars.githubusercontent.com/u/79367883?v=4?s=100" width="100px;" alt="Harshil Jani"/><br /><sub><b>Harshil Jani</b></sub></a><br /><a href="https://github.com/asyncapi/modelina/commits?author=Harshil-Jani" title="Code">💻</a> <a href="https://github.com/asyncapi/modelina/commits?author=Harshil-Jani" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://mintu-portfolio.netlify.app/"><img src="https://avatars.githubusercontent.com/u/127925465?v=4?s=100" width="100px;" alt="Mintu Gogoi"/><br /><sub><b>Mintu Gogoi</b></sub></a><br /><a href="https://github.com/asyncapi/modelina/commits?author=Min2who" title="Tests">⚠️</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/devansh-m12"><img src="https://avatars.githubusercontent.com/u/86195162?v=4?s=100" width="100px;" alt="Devansh Mahant"/><br /><sub><b>Devansh Mahant</b></sub></a><br /><a href="https://github.com/asyncapi/modelina/commits?author=devansh-m12" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/officialasishkumar"><img src="https://avatars.githubusercontent.com/u/87874775?v=4?s=100" width="100px;" alt="Asish Kumar"/><br /><sub><b>Asish Kumar</b></sub></a><br /><a href="https://github.com/asyncapi/modelina/commits?author=officialasishkumar" title="Documentation">📖</a></td>
</tr>
</tbody>
</table>
Expand Down
4 changes: 2 additions & 2 deletions docs/constraints/CSharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ These are the constraints that is applied to object properties and the naming of
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|C# has a list of reserved keywords ([see the full list here](../../src/generators/csharp/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal case|
|NAMING_FORMATTER|Must be formatted equally|Property name is formatted using pascal case|
|NO_DUPLICATE_PROPERTIES|No duplicate properties|If any of the above constraints changes the property name, we must make sure that no duplicates exist within the same object. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|


Expand All @@ -34,7 +34,7 @@ These are the constraints that is applied to enum keys. The `Rule key` is what y
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|C# has a list of reserved keywords ([see the full list here](../../src/generators/csharp/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal case|
|NAMING_FORMATTER|Must be formatted equally|Enum name is formatted using pascal case|
|NO_DUPLICATE_KEYS|No duplicate enum keys|If any of the above constraints changes the enum key, we must make sure that no duplicates exist within the same enum. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|

## Constant
Expand Down
41 changes: 41 additions & 0 deletions docs/constraints/Cplusplus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# C++ Constraints

These are the C++ specific constraints applied to the MetaModel before reaching the presets. [Read here to get a more general idea on the overall process](../input-processing.md) of converting a MetaModel to a ConstrainedMetaModel.

## Model Naming
These are the constraints that is applied to model naming. The `Rule key` is what you can use in the options to overwrite the default behavior. See [constraint customization](./README.md#Customization).

|Rule key|Rule|Resolution|
|---|---|---|
|NO_SPECIAL_CHAR|No special characters| Special characters are replaced by their name, for example `!` is replaced with `exclamation`. For C++ `_` are an exception to this rule. |
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|C++ has a list of reserved keywords ([see the full list here](../../src/generators/cplusplus/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using snake case|

## Property naming
These are the constraints that is applied to object properties and the naming of them. The `Rule key` is what you can use in the options to overwrite the default behavior. See [constraint customization](./README.md#Customization).
|Rule key|Rule|Resolution|
|---|---|---|
|NO_SPECIAL_CHAR|No special characters| Special characters are replaced by their name, for example `!` is replaced with `exclamation`. For C++ `_` are an exception to this rule. |
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|C++ has a list of reserved keywords ([see the full list here](../../src/generators/cplusplus/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Property naming is formatted using snake case|
|NO_DUPLICATE_PROPERTIES|No duplicate properties|If any of the above constraints changes the property name, we must make sure that no duplicates exist within the same object. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|


## Enum key constraints
These are the constraints that is applied to enum keys. The `Rule key` is what you can use in the options to overwrite the default behavior. See [constraint customization](./README.md#Customization).

|Rule key|Rule|Resolution|
|---|---|---|
|NO_SPECIAL_CHAR|No special characters| Special characters are replaced by their name, for example `!` is replaced with `exclamation`. For C++ `_` are an exception to this rule. |
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|C++ has a list of reserved keywords ([see the full list here](../../src/generators/cplusplus/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Enum key is formatted using snake case|
|NO_DUPLICATE_KEYS|No duplicate enum keys|If any of the above constraints changes the enum key, we must make sure that no duplicates exist within the same enum. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|

## Constant
These are the constraints that are applied to constants. Currently, there are no hooks one can overwrite inside it.
4 changes: 2 additions & 2 deletions docs/constraints/Dart.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ These are the constraints that is applied to object properties and the naming of
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|Dart has a list of reserved keywords ([see the full list here](../../src/generators/dart/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal case|
|NAMING_FORMATTER|Must be formatted equally|Property name is formatted using pascal case|
|NO_DUPLICATE_PROPERTIES|No duplicate properties|If any of the above constraints changes the property name, we must make sure that no duplicates exist within the same object. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|


Expand All @@ -34,7 +34,7 @@ These are the constraints that is applied to enum keys. The `Rule key` is what y
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|Dart has a list of reserved keywords ([see the full list here](../../src/generators/dart/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal case|
|NAMING_FORMATTER|Must be formatted equally|Enum name is formatted using pascal case|
|NO_DUPLICATE_KEYS|No duplicate enum keys|If any of the above constraints changes the enum key, we must make sure that no duplicates exist within the same enum. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|

## Constant
Expand Down
4 changes: 2 additions & 2 deletions docs/constraints/Go.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ These are the constraints that is applied to object properties and the naming of
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|Go has a list of reserved keywords ([see the full list here](../../src/generators/go/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal case|
|NAMING_FORMATTER|Must be formatted equally|Property name is formatted using pascal case|
|NO_DUPLICATE_PROPERTIES|No duplicate properties|If any of the above constraints changes the property name, we must make sure that no duplicates exist within the same object. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|


Expand All @@ -34,7 +34,7 @@ These are the constraints that is applied to enum keys. The `Rule key` is what y
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|Go has a list of reserved keywords ([see the full list here](../../src/generators/go/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal case|
|NAMING_FORMATTER|Must be formatted equally|Enum name is formatted using pascal case|
|NO_DUPLICATE_KEYS|No duplicate enum keys|If any of the above constraints changes the enum key, we must make sure that no duplicates exist within the same enum. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|

## Constant
Expand Down
4 changes: 2 additions & 2 deletions docs/constraints/Java.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ These are the constraints that is applied to object properties and the naming of
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|Java has a list of reserved keywords ([see the full list here](../../src/generators/java/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal case|
|NAMING_FORMATTER|Must be formatted equally|Property name is formatted using pascal case|
|NO_DUPLICATE_PROPERTIES|No duplicate properties|If any of the above constraints changes the property name, we must make sure that no duplicates exist within the same object. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|


Expand All @@ -34,7 +34,7 @@ These are the constraints that is applied to enum keys. The `Rule key` is what y
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|Java has a list of reserved keywords ([see the full list here](../../src/generators/java/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal case|
|NAMING_FORMATTER|Must be formatted equally|Enum name is formatted using pascal case|
|NO_DUPLICATE_KEYS|No duplicate enum keys|If any of the above constraints changes the enum key, we must make sure that no duplicates exist within the same enum. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|

## Constant
Expand Down
4 changes: 2 additions & 2 deletions docs/constraints/JavaScript.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ These are the constraints that is applied to object properties and the naming of
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|JavaScript has a list of reserved keywords ([see the full list here](../../src/generators/javascript/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal case|
|NAMING_FORMATTER|Must be formatted equally|Property name is formatted using pascal case|
|NO_DUPLICATE_PROPERTIES|No duplicate properties|If any of the above constraints changes the property name, we must make sure that no duplicates exist within the same object. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|


Expand All @@ -34,7 +34,7 @@ These are the constraints that is applied to enum keys. The `Rule key` is what y
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|JavaScript has a list of reserved keywords ([see the full list here](../../src/generators/javascript/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal case|
|NAMING_FORMATTER|Must be formatted equally|Enum name is formatted using pascal case|
|NO_DUPLICATE_KEYS|No duplicate enum keys|If any of the above constraints changes the enum key, we must make sure that no duplicates exist within the same enum. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|

## Constant
Expand Down
2 changes: 1 addition & 1 deletion docs/constraints/Rust.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ These are the constraints that is applied to enum keys. The `Rule key` is what y
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|Rust has a list of reserved keywords ([see the full list here](../../src/generators/rust/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal case|
|NAMING_FORMATTER|Must be formatted equally|Enum name is formatted using pascal case|
|NO_DUPLICATE_KEYS|No duplicate enum keys|If any of the above constraints changes the enum key, we must make sure that no duplicates exist within the same enum. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|

## Constant
Expand Down
4 changes: 2 additions & 2 deletions docs/constraints/TypeScript.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ These are the constraints that is applied to object properties and the naming of
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|TypeScript has a list of reserved keywords ([see the full list here](../../src/generators/typescript/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal case|
|NAMING_FORMATTER|Must be formatted equally|Property name is formatted using pascal case|
|NO_DUPLICATE_PROPERTIES|No duplicate properties|If any of the above constraints changes the property name, we must make sure that no duplicates exist within the same object. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|


Expand All @@ -34,7 +34,7 @@ These are the constraints that is applied to enum keys. The `Rule key` is what y
|NO_NUMBER_START_CHAR|No numbers as starting characters|Default behavior is pre pending `number_` in front of the first character|
|NO_EMPTY_VALUE|No empty values|Default behavior is to use `empty` as name. |
|NO_RESERVED_KEYWORDS|No reserved keywords|TypeScript has a list of reserved keywords ([see the full list here](../../src/generators/typescript/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal case|
|NAMING_FORMATTER|Must be formatted equally|Enum name is formatted using pascal case|
|NO_DUPLICATE_KEYS|No duplicate enum keys|If any of the above constraints changes the enum key, we must make sure that no duplicates exist within the same enum. If any is encountered `reserved_` is pre-pended. This is done recursively until no duplicates are found.|

## Constant
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@asyncapi/modelina",
"version": "2.1.0",
"version": "2.1.1",
"description": "Library for generating data models based on inputs such as AsyncAPI, OpenAPI, or JSON Schema documents",
"license": "Apache-2.0",
"homepage": "https://www.modelina.org",
Expand Down

0 comments on commit 78b78ed

Please sign in to comment.