-
-
Notifications
You must be signed in to change notification settings - Fork 241
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 generator #134
Comments
hi @AlexTwX can you please share your specification or some part of it so I can test. I'm happy to help you here |
You can try with the example in the java-spring readme. |
any news here? this is pretty much unusable at the moment.. |
Not yet. We'll soon work on this but can't tell you what soon exactly means yet. In any case, any contribution would be greatly appreciated :) |
Running into the same issue, going to have a peek at the code and see if anything obvious is happening to muck with the templates. |
Converts previous mapping of AsyncApi 1.0.0 topics to AsyncApi 2.0.0 channels in some basic form for the PublisherService.java template. Bug: asyncapi#134
Converts previous mapping of AsyncApi 1.0.0 topics to AsyncApi 2.0.0 channels in some basic form for the PublisherService.java template. Bug: asyncapi#134
Ah so I think the root of it is that the Java generator was not updated for the 2.0.0 schema. I'll share my work over here as I go: nickspacek/generator@02c2d1a |
So I'm mostly finished what I wanted to accomplish; the templates that exist are turning into Java code now. Would like to do a round of cleanup with lessons learned as I went through. What is supposed to be happening with server definitions and server variables when processed by the templates? For example, a URL that has a port, and the port exists as a server variable. Is that supposed to remain a placeholder in the template, or should the generator itself or the templating code be filling in the port with the defaultValue()? |
Converts previous mapping of AsyncApi 1.0.0 topics to AsyncApi 2.0.0 channels in some basic form for the PublisherService.java template. Bug: asyncapi#134
Hey @nickspacek! This is great stuff. Currently, we're not processing server variables yet. It's been reported here. A good first step would be to just connect to the raw As a later improvement, we can implement support for multiple servers and protocols and server variables. What do you think? |
Ah cool, I hadn't seen that ticket but that is the same thing the Java template currently does. I did mandate the server param, presently the generated code doesn't build/successfully test because the Spring framework for Java is trying to initialize the application using the generated configuration file and one class or another chokes on the strange connection strings that are being generated with {port} inside. I may build in a .hook for now that cleans it up conditionally when present in the URL and leave it in the template so that if it is addressed in the core down the road it will (maybe) Just Work. |
I understand. That sounds good 👍 |
@wolfey I'd be interested to see it generate something besides the example schema so if you find time to take it for a spin I'd appreciate your feedback. |
Hi guys! I'm taking a look at this issue. I'll come up with a PR to discuss the approach in the coming weeks. |
Hey thread, i'm glad to say that java-spring-template is now support spec 2.0 and also has some lovely features. |
Indeed! I also closed #188. Thanks, @Tenischev! 🙌 |
I'm trying to use the java generator.
I converted my yaml to 2.0, it works with html & markedown but when i try to generate with java-spring, the files generated are juste an empty template.
Something is wrong with the generator ?
The text was updated successfully, but these errors were encountered: