Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
manuelprinz opened this issue Jun 6, 2023 · 1 comment
Open

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

manuelprinz opened this issue Jun 6, 2023 · 1 comment

Comments

@manuelprinz
Copy link

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
Copy link
Contributor

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):

  • Copy all the snippet directories from generated-snippets to a single generated-snippetsdirectory
  • Apply the gradle plugin, configure and run the tasks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants