It maybe 4 years overdue, but thanks to issue 7 on swagger-jaxb I have finally released swagger-jaxb 1.5 into Maven Central. You can now all use it in your favourite build tool that supports m2 repositories, or build it yourself from the repository. ( That is, if you use Java 8 )
swagger-jaxb is a jaxb plugin that adds @ApiModel and @ApiModelProperty to your generated classes. You could use it with the jaxb2-maven-plugin, see the repo for information.
Have you ever achieved it in your company? I have worked in a couple companies and yet have to see it done the ultimate way.
Mostly it boils down to a combination of one, if not all, of these problems
not enough resources (invalid manager or lazy peon argument)
to many stakeholders and all use the same environment(s)
data is constantly changing, data is polluted
unstable releases of dependencies wrecking tests
no automation what soever
no integration testing whatsoever (no kidding, it happens)
no build server ( huh what? you still build on your local machine??)
a backward ops team reluctant to do cool stuff
you can probably find some more reasons! feel free to let me know.
So let’s create a situation. Let’s say you have a simple infrastructure:
micro services ( API’s)
front end applications
All of them being built by different teams.
Team DB does databases,
Team MS builds the java backend services
Team FE does some nodejs fronted magic
Let’s also assume you have at least 3 different environments: development, test and production. Each of them a version of all applications on it.
Suppose that you have at least the problem of data consistency and unstable test wrecking dependencies. Then your current scenario could be something like:
Team DB updates a database schema Z to version 2, tries it out on development. “Yay it’s works! Our update scripts are mighty cool! Let’s rollout to test.“
Team MS, sitting close by, quickly noticing the failing build on the CI Server. “Ho Ho Ho! Wait let us update our service Y that uses your update DB X.“. Update done, deploy to development. Runs some tests to verify that implementations correctly use the new database with it’s new functionalities . “Yay it works! Rollout to test!” Run the integration suite all seems fine!
BOOM, front end was just giving a demo to stake holders on the test environment. An angry product owner with on it’s tail 15 nodejs developer storms in the back end room shouting all over the open space. “WTF #$FJIEAÏOXCBVEEEE$HIT# what where you thinking releasing that to test! We search a street name in your service and we get only cities back! And the search name we initially use in our demo isn’t there anymore!! You broke our whole front end! Fubar our demo! AGAIN !”
Frustration, depression, the downfall of the team spirits, the downfall of a company, IMPEDIMENTS.