how do I generate POJOs from XSD without XML annotations?

I need to generate a JSON schema within Java application and I've come across few maven plugins which create JSON schema strings from Java classes. Our code has generated .java classes but they're all generated from XSD using jaxb but with annotations like @XmlElement and using these classes might not yield proper JSON schema. Removing them programmatically using regex and all seems error prone. I want to generate plain and simple POJOs from XSD without any annotations so that they can be used for generating JSON schema. Or better yet, how can I generate Java classes with JSON annotations like @JsonProperty from XSD itself? I couldn't find a solution to this so my previous question still stands. Application is built on Java, Spring boot, Maven, SOAP. The only solution I tried so far is I used jaxb2-maven-plugin with <arguments> -X none but it threw me an error saying couldn't resolve -X and arguments tag is deprecated. Could anyone please help with this? Thank you!!
1 Reply
JavaBot
JavaBot3w ago
This post has been reserved for your question.
Hey @Rinie! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here. 💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server