How to avoid generate the same java file with swagger gen #11883
Unanswered
davideferrari
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Let us suppose we have some yaml files like following:
Order.yml
I generate the Java classes from the Order.yml with swagger gen and specify the destination package, let's say 'com.test.order' After this operation I have two classes in com.test.order, EnglishArticleDto.java and GenericArticleDto.java
If I have another yml file with a dto that point to the same object GenericArticleDto
Proposal.yml
I generate the Java classes from the Proposal.yml and specify the destination package, let's say 'com.test.proposal'. If I run the swagger script I have two classes in com.test.proposal, CustomerArticleDto.java and GenericArticleDto.java
My doubt is: Is there a way with swagger gen to specify to avoid the creation of another Java class for GenericArticleDto and to REUSE the same present under the package com.test.order?
Swagger gen version: 2.2
Thanks a lot!
Beta Was this translation helpful? Give feedback.
All reactions