generator
generator copied to clipboard
Java POJO generation
I'd be interested in using the generator for generating the Java POJOs based on the payload definition in the particular messages.
Us too! If we could have something like this in Node.js, that'd be perfect.
I started a bit of work on this, might have more later this week.
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.
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? 🤔
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!
Can you share this prototype code? I'm curious.
Have a gander: nickspacek/generator@08520bc
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.
This issue has been automatically marked as stale because it has not had recent activity :sleeping: 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 :heart:
@typekpb @nickspacek @bbrenne hi folks, you might be interested in https://github.com/asyncapi/generator/issues/216. It would be awesome to hear your opinion.
Folks, have a look at https://www.asyncapi.com/tools/modelina
closing as modelina is doing it already https://github.com/asyncapi/modelina