diff --git a/plugins/autodoc/autodoc-processor/src/main/java/org/eclipse/edc/plugins/autodoc/core/processor/introspection/ExtensionIntrospector.java b/plugins/autodoc/autodoc-processor/src/main/java/org/eclipse/edc/plugins/autodoc/core/processor/introspection/ExtensionIntrospector.java index 3500c7e..020ebb7 100644 --- a/plugins/autodoc/autodoc-processor/src/main/java/org/eclipse/edc/plugins/autodoc/core/processor/introspection/ExtensionIntrospector.java +++ b/plugins/autodoc/autodoc-processor/src/main/java/org/eclipse/edc/plugins/autodoc/core/processor/introspection/ExtensionIntrospector.java @@ -32,6 +32,7 @@ import java.util.Collections; import java.util.List; import java.util.Objects; +import java.util.Optional; import java.util.stream.Stream; import javax.lang.model.element.Element; import javax.lang.model.element.VariableElement; @@ -153,7 +154,8 @@ private ConfigurationSetting createConfigurationSetting(VariableElement settingE return ConfigurationSetting.Builder.newInstance() .key(keyValue) - .description(attributeValue(String.class, "value", settingMirror, elementUtils)) + .description(Optional.ofNullable(attributeValue(String.class, "description", settingMirror, elementUtils)) + .orElseGet(() -> attributeValue(String.class, "value", settingMirror, elementUtils))) .type(attributeValue(String.class, "type", settingMirror, elementUtils)) .required(attributeValue(Boolean.class, "required", settingMirror, elementUtils)) .maximum(attributeValue(Long.class, "max", settingMirror, elementUtils))