Skip to content

Commit

Permalink
Config Doc - Use tooltip for default values
Browse files Browse the repository at this point in the history
  • Loading branch information
gsmet committed Aug 9, 2024
1 parent 75cccfd commit 21f4edf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ String formatTypeDescription(ConfigProperty configProperty) {
String formatDefaultValue(ConfigProperty configProperty) {
String defaultValue = configProperty.getDefaultValue();

if (defaultValue == null) {
return null;
}

if (configProperty.isEnum()) {
Optional<String> enumConstant = configProperty.getEnumAcceptedValues().values().entrySet().stream()
.filter(e -> e.getValue().configValue().equals(defaultValue))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ a|{#if configProperty.phase.fixedAtBuildTime}icon:lock[title=Fixed at build time
{#envVar configProperty /}
--
{#if configProperty.enum}a{/if}|{configProperty.formatTypeDescription.escapeCellContent.or("")}
|{#if configProperty.defaultValue}`{configProperty.defaultValue.escapeCellContent}`{#else if !configProperty.optional}required icon:exclamation-circle[title=Configuration property is required]{/if}
|{#if configProperty.defaultValue}{configProperty.formatDefaultValue.escapeCellContent}{#else if !configProperty.optional}required icon:exclamation-circle[title=Configuration property is required]{/if}

0 comments on commit 21f4edf

Please sign in to comment.