Skip to content

Commit

Permalink
Merge branch 'master' into scala-generator
Browse files Browse the repository at this point in the history
  • Loading branch information
artur-ciocanu authored Dec 23, 2023
2 parents 0132393 + 1237a8c commit 9287ec4
Show file tree
Hide file tree
Showing 18 changed files with 119 additions and 40 deletions.
14 changes: 13 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -782,7 +782,19 @@
"profile": "https://jaisarita.vercel.app/",
"contributions": [
"code",
"design"
"design",
"doc",
"maintenance"
]
},
{
"login": "Harshil-Jani",
"name": "Harshil Jani",
"avatar_url": "https://avatars.githubusercontent.com/u/79367883?v=4",
"profile": "http://harshil.prose.sh",
"contributions": [
"code",
"test"
]
}
],
Expand Down
14 changes: 14 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## Description
<!-- Provide a brief description of the changes introduced by this pull request. -->

## Related Issue
<!-- If this pull request is related to any existing issue, mention it here. -->

## Checklist
- [ ] The code follows the project's coding standards and is properly linted (`npm run lint`).
- [ ] Tests have been added or updated to cover the changes.
- [ ] Documentation has been updated to reflect the changes.
- [ ] All tests pass successfully locally.(`npm run test`).

## Additional Notes
<!-- Add any additional information or context that might be relevant to reviewers. -->
4 changes: 4 additions & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
# Core Champions that does a little of everything
* @magicmatatjahu @jonaslagoni @kennethaasan @asyncapi-bot-eve


# Website Champions
/modelina-website @devilkiller-ag

# Documentation champions
/docs

Expand Down
5 changes: 3 additions & 2 deletions 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-72-orange.svg?style=flat-square)](#contributors-)
[![All Contributors](https://img.shields.io/badge/all_contributors-73-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 @@ -417,7 +417,8 @@ Thanks go out to these wonderful people ([emoji key](https://allcontributors.org
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/nilkanth987"><img src="https://avatars.githubusercontent.com/u/12413581?v=4?s=100" width="100px;" alt="Nilkanth Parmar"/><br /><sub><b>Nilkanth Parmar</b></sub></a><br /><a href="https://github.com/asyncapi/modelina/commits?author=nilkanth987" title="Code">💻</a> <a href="https://github.com/asyncapi/modelina/commits?author=nilkanth987" title="Tests">⚠️</a> <a href="#example-nilkanth987" title="Examples">💡</a> <a href="https://github.com/asyncapi/modelina/commits?author=nilkanth987" title="Documentation">📖</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://jaisarita.vercel.app/"><img src="https://avatars.githubusercontent.com/u/43639341?v=4?s=100" width="100px;" alt="Ashmit JaiSarita Gupta"/><br /><sub><b>Ashmit JaiSarita Gupta</b></sub></a><br /><a href="https://github.com/asyncapi/modelina/commits?author=devilkiller-ag" title="Code">💻</a> <a href="#design-devilkiller-ag" title="Design">🎨</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://jaisarita.vercel.app/"><img src="https://avatars.githubusercontent.com/u/43639341?v=4?s=100" width="100px;" alt="Ashmit JaiSarita Gupta"/><br /><sub><b>Ashmit JaiSarita Gupta</b></sub></a><br /><a href="https://github.com/asyncapi/modelina/commits?author=devilkiller-ag" title="Code">💻</a> <a href="#design-devilkiller-ag" title="Design">🎨</a> <a href="https://github.com/asyncapi/modelina/commits?author=devilkiller-ag" title="Documentation">📖</a> <a href="#maintenance-devilkiller-ag" title="Maintenance">🚧</a></td>
<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>
</tr>
</tbody>
</table>
Expand Down
6 changes: 3 additions & 3 deletions docs/constraints/CSharp.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
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](../constraints.md#Customization).
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|
|---|---|---|
Expand All @@ -14,7 +14,7 @@ These are the constraints that is applied to model naming. The `Rule key` is wha
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal 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](../constraints.md#Customization).
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 csharp `_` and `$` are an exception to this rule. |
Expand All @@ -26,7 +26,7 @@ These are the constraints that is applied to object properties and the naming of


## 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](../constraints.md#Customization).
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|
|---|---|---|
Expand Down
6 changes: 3 additions & 3 deletions docs/constraints/Dart.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
These are the Dart 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](../constraints.md#Customization).
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|
|---|---|---|
Expand All @@ -14,7 +14,7 @@ These are the constraints that is applied to model naming. The `Rule key` is wha
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal 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](../constraints.md#Customization).
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 dart `_` and `$` are an exception to this rule. |
Expand All @@ -26,7 +26,7 @@ These are the constraints that is applied to object properties and the naming of


## 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](../constraints.md#Customization).
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|
|---|---|---|
Expand Down
6 changes: 3 additions & 3 deletions docs/constraints/Go.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
These are the Go 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](../constraints.md#Customization).
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|
|---|---|---|
Expand All @@ -14,7 +14,7 @@ These are the constraints that is applied to model naming. The `Rule key` is wha
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal 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](../constraints.md#Customization).
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 go `_` and `$` are an exception to this rule. |
Expand All @@ -26,7 +26,7 @@ These are the constraints that is applied to object properties and the naming of


## 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](../constraints.md#Customization).
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|
|---|---|---|
Expand Down
6 changes: 3 additions & 3 deletions docs/constraints/Java.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
These are the Java 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](../constraints.md#Customization).
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|
|---|---|---|
Expand All @@ -14,7 +14,7 @@ These are the constraints that is applied to model naming. The `Rule key` is wha
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal 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](../constraints.md#Customization).
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 java `_` and `$` are an exception to this rule. |
Expand All @@ -26,7 +26,7 @@ These are the constraints that is applied to object properties and the naming of


## 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](../constraints.md#Customization).
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|
|---|---|---|
Expand Down
6 changes: 3 additions & 3 deletions docs/constraints/JavaScript.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
These are the JavaScript 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](../constraints.md#Customization).
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|
|---|---|---|
Expand All @@ -14,7 +14,7 @@ These are the constraints that is applied to model naming. The `Rule key` is wha
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal 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](../constraints.md#Customization).
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 javascript `_` and `$` are an exception to this rule. |
Expand All @@ -26,7 +26,7 @@ These are the constraints that is applied to object properties and the naming of


## 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](../constraints.md#Customization).
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|
|---|---|---|
Expand Down
41 changes: 41 additions & 0 deletions docs/constraints/Python.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
# Python Constraints

These are the Python 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 python `_` is 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|Python has a list of reserved keywords ([see the full list here](../../src/generators/python/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Model name is formatted using pascal 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 python `_` is 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|Python has a list of reserved keywords ([see the full list here](../../src/generators/python/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Property name is formatted using camel 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 python `_` is 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|Python has a list of reserved keywords ([see the full list here](../../src/generators/python/Constants.ts))|
|NAMING_FORMATTER|Must be formatted equally|Enum name is formatted using constant 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.
Loading

0 comments on commit 9287ec4

Please sign in to comment.