rodnansol / spring-configuration-property-documenter

Tool to document Spring Configuration Properties - Leave us a feedback: https://github.com/rodnansol/spring-configuration-property-documenter/discussions/74
Apache License 2.0
39 stars 5 forks source link

feat: add as_env Mustache helper that transform properties to ENV_VARIABLE #37 #43

Closed nandorholozsnyak closed 1 year ago

nandorholozsnyak commented 1 year ago

Original PR: https://github.com/rodnansol/spring-configuration-property-documenter/pull/37

Linked to #36

This PR adds the as_env helper, allowing users to transform properties to their ENV_VARIABLE form: spring.application.name to SPRING_APPLICATION_NAME .

The expected usage:

-[cols="2,1,3,1,1"]
+[cols="2,1,3,1,1,3"]
|===
-|Key |Type |Description |Default value |Deprecation
+|Key |Type |Description |Default value |Deprecation |Environment variable
{{#each properties}}
|{{key}}
|{{type}}
|{{description}}
|{{defaultValue}}
|{{propertyDeprecation}}
+|{{as_env fqName}}
{{/each}}

If you want I can open another PR that will add this to the default ADOC/MARKDOWN/XML/HTML output (behind a flag ? by default ?)