ScaCap / spring-auto-restdocs

Spring Auto REST Docs is an extension to Spring REST Docs
https://scacap.github.io/spring-auto-restdocs/
Apache License 2.0
312 stars 86 forks source link

SectionSnippet: add an option to skip empty sections #63

Closed ddrozdov closed 7 years ago

ddrozdov commented 7 years ago

Two cases here.

1) For example, I don't use AuthorizationSnippet at all, but Authorization section is still generated and gives an error since authorization.adoc is missing.

2) I use RequestParametersSnippet and add it to MockMvc defaults, but in fact there are only a couple of methods that have request parameters. Currently "Query parameters" section is generated for each resource and just takes place in the documentation.

jmisur commented 7 years ago

Hi, sorry for late response, we have been working on it actually. We'll release new version soon and you can test if it works for you. If you want you can build master and test even now. The documentation contains new description of Section snippet https://scacap.github.io/spring-auto-restdocs/#snippets-section

jmisur commented 7 years ago

@ddrozdov We just released version 1.0.6 which adds support to your requested features.

ddrozdov commented 7 years ago

Thank you!