modelina
modelina copied to clipboard
Add JSON Type definition support
Reason/Context
It would be great to have support for JSON Type definition standard as supported inputs: https://jsontypedef.com/
To support it we need to add a new input processor, which you can read about how to add here: https://github.com/asyncapi/modelina/blob/master/docs/contributing.md#adding-a-new-input-processor
The TLDR; is that we want to convert their structure into our Meta Models. Unless there are tooling available to handle references, the initial implementation might not support this. Feel free to document the limitations of the implementation as needed in an input document: https://github.com/asyncapi/modelina/tree/master/docs/inputs
Happy to help further if you get stuck on something :v:
Hi @jonaslagoni I was going through the modelina .readme and I think in this code:
- This code
for (const model in models)
should be thisfor (const generatedModel in models)
else the whole code should be this:
for (const model in models) {
const generatedCode = model.result;
const dependencies = model.dependencies;
const modeltype = model.type;
const modelName = model.modelName;
...
}```
If I am correct the just let me know and I will raise a PR instantly regarding this. Thanks!
You are right @sagarkori143 👍
@jonaslagoni Is this still relevant? The website for jsontypedef is currently offline 😅
https://github.com/jsontypedef still gets updates, so I am sure it is just a fluke 😄
So yea I would say it is 👍