What is the approach to include other properties in the documentation #30
-
I am evaluating the Spring Configuration Property Documenter and it works well. Although our application has a lot of properties to configure, which are required from Spring itself and components, provided by Spring. These properties are not included in any of my configuration classes. What is the best way to include them in the generated documentation? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments
-
Hello @obfischer , I'm so sorry to reply so late, I got no notification or just missed it. Let me think about it and come back to you with that soon. |
Beta Was this translation helpful? Give feedback.
-
Hello @obfischer , I'm back with some news. I thought about your question so much before I started the project, and the whole file location techniques and the ability to add multiple input files for the Let me show you an example how you can utilize it: <execution>
<id>aggregate-docs-markdown-with-spring-related-configurations</id>
<goals>
<goal>generate-and-aggregate-documents</goal>
</goals>
<phase>package</phase>
<configuration>
<type>ADOC</type>
<inputs>
<input>
<name>Multi Module A</name>
<description>Multi Module A properties with a folder input</description>
<input>../multi-module-a</input>
</input>
<input>
<name>Sprint Boot 2.7.8</name>
<description>Sprint Boot 2.7.8 related properties</description>
<input>${user.home}/.m2/repository/org/springframework/boot/spring-boot/2.7.8/spring-boot-2.7.8.jar</input>
</input>
<input>
<name>Multi Module C</name>
<description>Multi Module C properties with a specific file input</description>
<input>../multi-module-c/target/classes/META-INF/spring-configuration-metadata.json</input>
</input>
</inputs>
<outputFile>target/with-spring-related-stuff.adoc</outputFile>
</configuration>
</execution> In this XML snippet, you can see that there are at least 3 ways to refer a metadata json file:
For more information please check this documentation section: https://github.com/rodnansol/spring-configuration-property-documenter/blob/master/docs/maven-plugin.adoc#multi-module In this case, the final document will contains all 3 inputs in the order they were specified. One thing for sure, the Spring Boot based JSON files are full of with properties, and you are not able to just include or exclude specific keys (YET, because a few weeks back this idea was born, I planned it for the 0.3.0 release, but due to lack of time, I was not able to make the implementation, but right now it is at least created as an issue and you can follow its progress here: #39) If you have time, please try it out and let me know about your experiences, if you have additional questions please feel free to ask, I will be paying more attention to my notifications on the topic :) |
Beta Was this translation helpful? Give feedback.
-
Hello @obfischer With the release of the 0.4.0 version (https://github.com/rodnansol/spring-configuration-property-documenter/releases/tag/v0.4.0) property groups and simple properties can be excluded from the final document and the list can be configured in the Maven plugin setup. I hope it can help you deal with bigger metadata json files. Sample configuration can be found here: |
Beta Was this translation helpful? Give feedback.
-
I'm closing this discussion, let me know if you need more information about the topic, the two earlier comments are still relevant. |
Beta Was this translation helpful? Give feedback.
Hello @obfischer ,
I'm back with some news. I thought about your question so much before I started the project, and the whole file location techniques and the ability to add multiple input files for the
generate-and-aggregate-documents
goal has been already created.Let me show you an example how you can utilize it: