Forum Discussion

opticyclic's avatar
Occasional Visitor
6 years ago

What Is Best Practice For Keeping Docs In Sync With Code?

I have written a yaml file and generated a Spring Boot server stub.


When I start implementing, during the development cycle certain things change.

e.g. maybe the method returns a different response or I add a global error handler or the example needs to change etc.


How do I make sure that the code and the documentation stays in sync?


It seems like it is easy for the annotations to drift away from the code.


If I update the yaml and regenerate the code I'll have a merging headache.


Is there any best practice here or any way of automating this or is it just a case of having to manually check that any code changes also get updated in the annotations?

No RepliesBe the first to reply