Closed randyhbh closed 4 years ago
Hi @RandyHBH,
The contribution guidelines are available here:
Hello @RandyHBH
Thank you for this initiative. Our team is having the same requirement. We just want to have two outputs, (one is a directory under target that will be generated and one in a dedicated folder for history tracking). Could you please show some example on how to do this?
Maybe some kind of comma separated?
Thank you for your help
Hi @patpatpat123, sure I could re-open this PR or create a new one with these changes if this is a useful feature for the community. The reason why I closed it in the first place was that usually, this is is a rare use case.
@bnasslahsen What do you think?
@RandyHBH,
You can propose a PR ofc, if its useful for the community.
Many thanks @RandyHBH @bnasslahsen, looking forward to seeing this!
@patpatpat123 @RandyHBH @bnasslahsen
Instead of comma separated values wouldn't we want something like this?
<configuration>
<outputFileName>myapi.json</outputFileName>
<outputDirs>
<outputDir>${project.build.directory}</outputDir>
<outputDir>${project.build.directory}/testDir</outputDir>
</outputDirs>
</configuration>
@anthropaedic,
You can just use maven-antrun-plugin after springdoc-openapi-maven-plugin, to copy the generated resources in your desired output directories.
@bnasslahsen @anthropaedic Would it be possible not to close?
<configuration>
<outputFileName>myapi.json</outputFileName>
<outputDirs>
<outputDir>${project.build.directory}</outputDir>
<outputDir>${project.build.directory}/testDir</outputDir>
</outputDirs>
</configuration>
This looks very clean, instead of having to "just use maven-antrun-plugin after springdoc-openapi-maven-plugin"
@bnasslahsen But it is achieving it in a rather unfriendly manner.
"maven-antrun-plugin after springdoc-openapi-maven-plugin", Well, I also have a shell job that does a CP command, "it does the job" (and faster than ant) Would it be possible to have a more objective judgement on your close? While it is true there are many ways to achieve the same result, having more descriptive, self explanatory, proper configuration directly on the maven plugin block without extra steps during or after generation might be worth considering.
Thank you
@patpatpat123 ,
The maven-antrun-plugin exists for decades and is very stable. Not sure you will find a much cleaner that it. But for the moment, it doesn't seem relevant, to keep track of this ticket for several months, especially that there are other existing solutions for this kind of functionalities.
Anyway, if you come up with a much cleaner solution, please feel free to propose a PR, and the ticket can be reopened.
@bnasslahsen Still believe (personal opinion)
<outputDirs>
<outputDir>${project.build.directory}</outputDir>
<outputDir>${project.build.directory}/testDir</outputDir>
</outputDirs>
is a bit nicer. But maybe you and I shouldn't take the whole decision.
Meanwhile, I will stick with the shell cp command, much older than ant and "does the job" that can be done from the plugin.
Hi @bnasslahsen, I would like to create a PR for this repo in which I will be including the availability to generate the openapi.json to one, two, or more output directories.
Please could you point me to the guidelines for contributing to this project?
Thanks