Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add JSON Type definition support #1740

Open
jonaslagoni opened this issue Jan 12, 2024 · 4 comments
Open

Add JSON Type definition support #1740

jonaslagoni opened this issue Jan 12, 2024 · 4 comments
Labels
area/typescript Specify what technical area given issue relates to. Its goal is to ease filtering good first issues. enhancement New feature or request good first issue Good for newcomers

Comments

@jonaslagoni
Copy link
Sponsor Member

jonaslagoni commented Jan 12, 2024

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 ✌️

@jonaslagoni jonaslagoni added enhancement New feature or request good first issue Good for newcomers area/typescript Specify what technical area given issue relates to. Its goal is to ease filtering good first issues. labels Jan 12, 2024
@sagarkori143
Copy link
Contributor

sagarkori143 commented Jan 19, 2024

Hi @jonaslagoni I was going through the modelina .readme and I think in this code:

image

  • This code for (const model in models) should be this for (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!

@jonaslagoni
Copy link
Sponsor Member Author

You are right @sagarkori143 👍

@moritzkalwa
Copy link
Contributor

@jonaslagoni Is this still relevant? The website for jsontypedef is currently offline 😅

@jonaslagoni
Copy link
Sponsor Member Author

https://github.com/jsontypedef still gets updates, so I am sure it is just a fluke 😄

So yea I would say it is 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/typescript Specify what technical area given issue relates to. Its goal is to ease filtering good first issues. enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

3 participants