ePages-de / restdocs-api-spec

Adds API specification support to Spring REST Docs
MIT License
388 stars 102 forks source link

How to join documentation from multi-project build? #241

Open manuelprinz opened 1 year ago

manuelprinz commented 1 year ago

Sorry for using the issues for questions, but I did not find an answer myself. I may be missing something, or it may be a bug, so...

I tried to apply the project in a Gradle multi-project build, that contains subprojects with their own set of controllers. In Restdocs, the API documentation can be built by "joining" the snippets in the "generated-snippets" directories into one directory, and generating the documentation from there. While applying restdoc-api-spec works fine in each subproject, there does not seem a way to provide multiple JSON files as input. Manually joining them into one did not work. (Most likely because my crude hacks to achieve that were buggy.)

Is there a supported way to use restdoc-api-spec in a multi-project build? If now, what would be the general approach?

ozscheyge commented 1 year ago

Hey,

we don't use it in a multi-project build. However, the approach you mentioned should work (we are doing the same to join documentation across multiple microservices):