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

Java POJO generation #159

Closed
typekpb opened this issue Nov 7, 2019 · 12 comments
Closed

Java POJO generation #159

typekpb opened this issue Nov 7, 2019 · 12 comments

Comments

@typekpb
Copy link

typekpb commented Nov 7, 2019

I'd be interested in using the generator for generating the Java POJOs based on the payload definition in the particular messages.

@fmvilas
Copy link
Member

fmvilas commented Nov 8, 2019

Us too! If we could have something like this in Node.js, that'd be perfect.

@nickspacek
Copy link

I started a bit of work on this, might have more later this week.

@nickspacek
Copy link

I wonder if it would be possible to leverage https://github.com/quicktype/quicktype for JSON Schema messages? OpenAPI has a similar need for this as well, but leveraging existing code generation for JSON Schema messages seems like it would make a lot of sense instead of rebuilding from scratch.

@fmvilas
Copy link
Member

fmvilas commented Dec 2, 2019

Totally agree. Quicktype seems to be perfect but I've seen they lack a stable/public API. Also, it seems the company behind is not interested in maintaining it beyond their needs. Maybe a good chance for a fork? 🤔

@nickspacek
Copy link

I threw together a prototype using a Quicktype filter that spits out Java mappings but haven't played around to see how robust the results are. I wondered about exploring the use of hooks or some other plugin-like approach to allow a project like generator-quicktype-models, but I haven't given it a lot of thought!

@fmvilas
Copy link
Member

fmvilas commented Dec 3, 2019

Can you share this prototype code? I'm curious.

@nickspacek
Copy link

Have a gander: nickspacek/generator@08520bc

@fmvilas
Copy link
Member

fmvilas commented Dec 24, 2019

Nice! It looks easy! I see we can probably expose the parsed AsyncAPI document in the generate:after hook so you don't have to parse it again.

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale because it has not had recent activity 😴
It will be closed in 30 days if no further activity occurs. To unstale this issue, add a comment with detailed explanation.
Thank you for your contributions ❤️

@derberg
Copy link
Member

derberg commented Jun 4, 2020

@typekpb @nickspacek @bbrenne hi folks, you might be interested in #216. It would be awesome to hear your opinion.

@github-actions github-actions bot added the stale label Oct 5, 2021
@asyncapi asyncapi deleted a comment from github-actions bot Oct 5, 2021
@derberg derberg removed the stale label Oct 5, 2021
@derberg
Copy link
Member

derberg commented Oct 5, 2021

Folks, have a look at https://www.asyncapi.com/tools/modelina

@derberg
Copy link
Member

derberg commented Jul 5, 2023

closing as modelina is doing it already https://github.com/asyncapi/modelina

@derberg derberg closed this as completed Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants