Skip to content

Is there a way to automate the process of creating the main adoc file #657

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

Closed
chadmalla-unity opened this issue Nov 7, 2019 · 1 comment

Comments

@chadmalla-unity
Copy link

I am migrating from springfox to spring rest docs so I can move forward with the spring boot 2.2 upgrade. The thing is I don't want to constantly update the adoc file to add include::{snippets}/directory/curl-request.adoc[] or operation::directory[] when more tests are added. Is there a more automated way like including wildcards to include recursively all snippets in generated-snippets directory?

Also a bonus question, I have in my configuration alwaysDo(document("{class-name}/{method-name}") but the method names include a -when the method name has a word with all caps likeGIVENbecomesg-i-v-e-n. I would like it to be given`.

Thanks!

@wilkinsona
Copy link
Member

Is there a more automated way like including wildcards to include recursively all snippets in generated-snippets directory?

Not as part of REST Docs itself. I believe that you can't automate this as you'll have to manually write some documentation to explain the purpose of the new endpoint. If you disagree with that, you could write something yourself that generates the main doc file based on what snippets REST Docs has generated.

Also a bonus question, I have in my configuration alwaysDo(document("{class-name}/{method-name}") but the method names include a - when the method name has a word with all caps like GIVEN becomes g-i-v-e-n. I would like it to be given.

This isn't possible at the moment. Please open a separate issue and I'll have a think about whether the current behaviour should be considered a bug, a plug-point is needed, or both.

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

3 participants