Skip to content

Commit c8f5278

Browse files
authored
Merge branch 'master' into feat-2114-add-required-field-management-c-sharp
2 parents 7bf5f90 + e101bb6 commit c8f5278

File tree

25 files changed

+239
-76
lines changed

25 files changed

+239
-76
lines changed

.all-contributorsrc

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1023,6 +1023,35 @@
10231023
"code",
10241024
"test"
10251025
]
1026+
},
1027+
{
1028+
"login": "maxplatov",
1029+
"name": "maxplatov",
1030+
"avatar_url": "https://avatars.githubusercontent.com/u/14889696?v=4",
1031+
"profile": "https://github.com/maxplatov",
1032+
"contributions": [
1033+
"review"
1034+
]
1035+
},
1036+
{
1037+
"login": "emmanuel-ferdman",
1038+
"name": "Emmanuel Ferdman",
1039+
"avatar_url": "https://avatars.githubusercontent.com/u/35470921?v=4",
1040+
"profile": "https://github.com/emmanuel-ferdman",
1041+
"contributions": [
1042+
"doc"
1043+
]
1044+
},
1045+
{
1046+
"login": "jonjomckay",
1047+
"name": "Jonjo McKay",
1048+
"avatar_url": "https://avatars.githubusercontent.com/u/456645?v=4",
1049+
"profile": "https://jonjomckay.com",
1050+
"contributions": [
1051+
"code",
1052+
"bug",
1053+
"test"
1054+
]
10261055
}
10271056
],
10281057
"contributorsPerLine": 7,
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# This action is centrally managed in https://github.com/asyncapi/.github/
2+
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo
3+
4+
name: Trigger MAINTAINERS.yaml file update
5+
6+
on:
7+
push:
8+
branches: [ master ]
9+
paths:
10+
# Check all valid CODEOWNERS locations:
11+
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-file-location
12+
- 'CODEOWNERS'
13+
- '.github/CODEOWNERS'
14+
- '.docs/CODEOWNERS'
15+
16+
jobs:
17+
trigger-maintainers-update:
18+
name: Trigger updating MAINTAINERS.yaml because of CODEOWNERS change
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Repository Dispatch
23+
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # https://github.com/peter-evans/repository-dispatch/releases/tag/v3.0.0
24+
with:
25+
# The PAT with the 'public_repo' scope is required
26+
token: ${{ secrets.GH_TOKEN }}
27+
repository: ${{ github.repository_owner }}/community
28+
event-type: trigger-maintainers-update

README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
[![Discussions](https://img.shields.io/github/discussions/asyncapi/modelina)](https://github.com/asyncapi/modelina/discussions)
1010
[![Website](https://img.shields.io/website?label=website&url=https%3A%2F%2Fwww.modelina.org)](https://www.modelina.org)
1111
[![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 -->
12-
[![All Contributors](https://img.shields.io/badge/all_contributors-94-orange.svg?style=flat-square)](#contributors-)
12+
[![All Contributors](https://img.shields.io/badge/all_contributors-97-orange.svg?style=flat-square)](#contributors-)
1313
<!-- ALL-CONTRIBUTORS-BADGE:END -->
1414

1515
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.
@@ -109,7 +109,7 @@ for (const model in models) {
109109
</td>
110110
</tr>
111111
<tr>
112-
<td><b>Easily modify how models are <a href="./docs/constraints.md">constrained</a> into the output</b></td>
112+
<td><b>Easily modify how models are <a href="./docs/constraints/README.md">constrained</a> into the output</b></td>
113113

114114
<td>
115115

@@ -444,6 +444,9 @@ Thanks go out to these wonderful people ([emoji key](https://allcontributors.org
444444
<td align="center" valign="top" width="14.28%"><a href="https://pike.github.io/"><img src="https://avatars.githubusercontent.com/u/43494?v=4?s=100" width="100px;" alt="Axel Hecht"/><br /><sub><b>Axel Hecht</b></sub></a><br /><a href="https://github.com/asyncapi/modelina/commits?author=Pike" title="Code">💻</a> <a href="https://github.com/asyncapi/modelina/commits?author=Pike" title="Tests">⚠️</a></td>
445445
<td align="center" valign="top" width="14.28%"><a href="https://github.com/tomdevroomen"><img src="https://avatars.githubusercontent.com/u/4637986?v=4?s=100" width="100px;" alt="Tom de Vroomen"/><br /><sub><b>Tom de Vroomen</b></sub></a><br /><a href="https://github.com/asyncapi/modelina/commits?author=tomdevroomen" title="Code">💻</a> <a href="#example-tomdevroomen" title="Examples">💡</a> <a href="https://github.com/asyncapi/modelina/commits?author=tomdevroomen" title="Documentation">📖</a> <a href="https://github.com/asyncapi/modelina/commits?author=tomdevroomen" title="Tests">⚠️</a></td>
446446
<td align="center" valign="top" width="14.28%"><a href="https://github.com/memdal"><img src="https://avatars.githubusercontent.com/u/77838566?v=4?s=100" width="100px;" alt="memdal"/><br /><sub><b>memdal</b></sub></a><br /><a href="https://github.com/asyncapi/modelina/commits?author=memdal" title="Code">💻</a> <a href="https://github.com/asyncapi/modelina/commits?author=memdal" title="Tests">⚠️</a></td>
447+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/maxplatov"><img src="https://avatars.githubusercontent.com/u/14889696?v=4?s=100" width="100px;" alt="maxplatov"/><br /><sub><b>maxplatov</b></sub></a><br /><a href="https://github.com/asyncapi/modelina/pulls?q=is%3Apr+reviewed-by%3Amaxplatov" title="Reviewed Pull Requests">👀</a></td>
448+
<td align="center" valign="top" width="14.28%"><a href="https://github.com/emmanuel-ferdman"><img src="https://avatars.githubusercontent.com/u/35470921?v=4?s=100" width="100px;" alt="Emmanuel Ferdman"/><br /><sub><b>Emmanuel Ferdman</b></sub></a><br /><a href="https://github.com/asyncapi/modelina/commits?author=emmanuel-ferdman" title="Documentation">📖</a></td>
449+
<td align="center" valign="top" width="14.28%"><a href="https://jonjomckay.com"><img src="https://avatars.githubusercontent.com/u/456645?v=4?s=100" width="100px;" alt="Jonjo McKay"/><br /><sub><b>Jonjo McKay</b></sub></a><br /><a href="https://github.com/asyncapi/modelina/commits?author=jonjomckay" title="Code">💻</a> <a href="https://github.com/asyncapi/modelina/issues?q=author%3Ajonjomckay" title="Bug reports">🐛</a> <a href="https://github.com/asyncapi/modelina/commits?author=jonjomckay" title="Tests">⚠️</a></td>
447450
</tr>
448451
</tbody>
449452
</table>

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Details which different generator options are supported.
4848
### [Presets](./presets.md)
4949
Goes more in-depth into how the preset system works, which enables full customization of generators.
5050

51-
### [Interpretation of JSON Schema](./inputs/json_schema.md)
51+
### [Interpretation of JSON Schema](./inputs/JSON_Schema.md)
5252
Explains how a JSON Schema is interpreted to a data model.
5353

5454
### [Migration](./migrations/README.md)

docs/advanced.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ This document contains many of the advanced use-cases that you may stumble upon
2323

2424
This example shows us how to generate each model in the same file
2525

26-
Check out this [example out for a live demonstration](../examples/generate-all-models-within-same-file).
26+
Check out this [example out for a live demonstration](../examples/generate-all-models-within-the-same-file).
2727

2828
## Generate models to separate files
2929

@@ -97,7 +97,7 @@ Check out this [example out for a live demonstration](../examples/change-type-ma
9797

9898
## Changing the constrain rules
9999

100-
When moving from a [MetaModel](./internal-model.md#the-meta-model) to a [ConstrainedMetaModel](./internal-model.md#the-constrained-meta-model) it means we bind the input to a specific output. That output has specific constraints that the input MUST adhere to, [read more about this here](constraints.md).
100+
When moving from a [MetaModel](./internal-model.md#the-meta-model) to a [ConstrainedMetaModel](./internal-model.md#the-constrained-meta-model) it means we bind the input to a specific output. That output has specific constraints that the input MUST adhere to, [read more about this here](constraints/README.md).
101101

102102
There can be multiple reasons why you want to change the default constrain rules, and therefore you can form them to your needs.
103103

docs/constraints/README.md

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Constraints
2-
Because we cannot control what is provided as input, we must constrain the internal model to be valid for the output ([read more about the process here](./internal-model.md)). What is considered valid entirely depends on the output so each have their own set of rules.
2+
Because we cannot control what is provided as input, we must constrain the internal model to be valid for the output ([read more about the process here](../internal-model.md)). What is considered valid entirely depends on the output so each have their own set of rules.
33

44
As an example lets consider TypeScript as an output. Consider the model name, which are a simple string, but a string which can contain ANY characters and formats. Some of the constraints we have found for the naming of a model are:
55

@@ -16,18 +16,18 @@ class 1name {}
1616

1717
There are many rules as such, but to get the full description about the default constraints here:
1818

19-
- [C++](./constraints/Csplusplus.md)
20-
- [C#](./constraints/CSharp.md)
21-
- [Dart](./constraints/Dart.md)
22-
- [Go](./constraints/Go.md)
23-
- [Java](./constraints/Java.md)
24-
- [JavaScript](./constraints/JavaScript.md)
25-
- [Kotlin](./constraints/Kotlin.md)
26-
- [PHP](./constraints/PHP.md)
27-
- [Python](./constraints/Python.md)
28-
- [Rust](./constraints/Rust.md)
29-
- [Scala](./constraints/Scala.md)
30-
- [TypeScript](./constraints/TypeScript.md)
19+
- [C++](./Cplusplus.md)
20+
- [C#](./CSharp.md)
21+
- [Dart](./Dart.md)
22+
- [Go](./Go.md)
23+
- [Java](./Java.md)
24+
- [JavaScript](./JavaScript.md)
25+
- [Kotlin](./Kotlin.md)
26+
- [PHP](./PHP.md)
27+
- [Python](./Python.md)
28+
- [Rust](./Rust.md)
29+
- [Scala](./Scala.md)
30+
- [TypeScript](./TypeScript.md)
3131

3232
Even though there are many of these constraints, there might be reasons you want to customize the behavior to make it suit your use-case. Therefore each of the constraint rules can be overwritten completely and allow for you to implement your own behavior.
3333

docs/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ To make it easier to contribute a new generator, and to avoid focusing too much
118118
4. Add your [generator to the generator index file](../src/generators/index.ts).
119119

120120
Now it's time to adapt the template into what ever it is you are generating:
121-
1. Adapt the [constraint logic](../src/generators/template/constrainer) and the [type constraints](../src/generators/template/TemplateConstrainer.ts) based on what is allowed within your output. Read more about the constraint logic [here](./constraints.md).
121+
1. Adapt the [constraint logic](../src/generators/template/constrainer) and the [type constraints](../src/generators/template/TemplateConstrainer.ts) based on what is allowed within your output. Read more about the constraint logic [here](./constraints/README.md).
122122
2. Add all of the reserved keywords that the models must never generate in the [Constant file](../src/generators/template/Constants.ts).
123123
3. Adapt/create the first renderers. The template by default include two renderers, one for rendering enums and one for classes, but you can create what ever renderers makes sense. For example in Rust it's not called class but struct, so therefore its called a `StructRenderer`.
124124
4. Adapt the file generator and the rendering of the complete models to fit your generator.

docs/internal-model.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ This means that if you accessed `EnumValueModel.key` you would get `something% s
148148

149149
How and what are constrained?
150150

151-
The answer to this question is not straightforward, cause each output has unique constraints that the meta models must adhere to. You can read more about [the constraint behavior here](./constraints.md).
151+
The answer to this question is not straightforward, cause each output has unique constraints that the meta models must adhere to. You can read more about [the constraint behavior here](./constraints/README.md).
152152

153153
```mermaid
154154
---

docs/other-tools.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Here is some of the noticeable differences with Modelina that is nice to know be
2323
1. Modelina does not care much about the input, and support a range of them with no real limitation. I.e. supporting AsyncAPI, OpenAPI, ..., etc, see [supported inputs for more information](../README.md#features).
2424
2. Modelina does not care about output language, i.e. it's not only Java that is supported, see the full list of [supported outputs here](../README.md#features).
2525
3. Modelina does not hardcode specific features such as serialization libraries i.e. Jackson, Gson, ..., or validation annotations. Instead we use [presets](./presets.md) to control what is being generated to never be limited by hardcoding. Read more about which [serialization libraries we support for Java here](./languages/Java.md#generate-serializer-and-deserializer-functionality).
26-
4. Modelina does not care which types you want generated (primitive types, long integers, etc), this can be [controlled by the constrainer](./constraints.md). Read more about how to [change the type mapping](./constraints.md#type-mapping).
26+
4. Modelina does not care which types you want generated (primitive types, long integers, etc), this can be [controlled by the constrainer](./constraints/README.md). Read more about how to [change the type mapping](./constraints/README.md#type-mapping).
2727
5. Modelina is part of Linux Foundation and is therefore a neutral ground for collaboration.
2828

2929

examples/integrate-with-next/package-lock.json

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)