Many endpoints are autoconfigured as @ConditionalOnMissingBean but they aren't extensible by design, some others aren't configured as @ConditionalOnMissingBean and aren't extensible, still others are contibutors based. I need to override some functionalities and declare new implementations, but I feel a bit confused: 

These are the DTOs returned by the EnvironmentEndpoint that make impossible to override its methods. The same is true for LiquibaseEndpoint, BeansEndpoint, AuditEventsEndpoint, MappingsEndpoint

PropertyValueDescriptor ```java @JsonInclude(JsonInclude.Include.NON_NULL) public static final class PropertyValueDescriptor { private final Object value; private final String origin; private final String[] originParents; private PropertyValueDescriptor(Object value, Origin origin) { this.value = value; this.origin = (origin != null) ? origin.toString() : null; List originParents = Origin.parentsFrom(origin); this.originParents = originParents.isEmpty() ? null : originParents.stream().map(Object::toString).toArray(String[]::new); } public Object getValue() { return this.value; } public String getOrigin() { return this.origin; } public String[] getOriginParents() { return this.originParents; } } ```
PropertySourceEntryDescriptor ```java @JsonInclude(JsonInclude.Include.NON_NULL) public static final class PropertySourceEntryDescriptor { private final String name; private final PropertyValueDescriptor property; private PropertySourceEntryDescriptor(String name, PropertyValueDescriptor property) { this.name = name; this.property = property; } public String getName() { return this.name; } public PropertyValueDescriptor getProperty() { return this.property; } } ```
PropertySourceDescriptor ```java public static final class PropertySourceDescriptor { private final String name; private final Map properties; private PropertySourceDescriptor(String name, Map properties) { this.name = name; this.properties = properties; } public String getName() { return this.name; } public Map getProperties() { return this.properties; } } ```
PropertySummaryDescriptor ```java @JsonInclude(JsonInclude.Include.NON_NULL) public static final class PropertySummaryDescriptor { private final String source; private final Object value; public PropertySummaryDescriptor(String source, Object value) { this.source = source; this.value = value; } public String getSource() { return this.source; } public Object getValue() { return this.value; } } ```
EnvironmentEntryDescriptor ```java @JsonInclude(JsonInclude.Include.NON_NULL) public static final class EnvironmentEntryDescriptor { private final PropertySummaryDescriptor property; private final List activeProfiles; private final List defaultProfiles; private final List propertySources; EnvironmentEntryDescriptor(PropertySummaryDescriptor property, List activeProfiles, List defaultProfiles, List propertySources) { this.property = property; this.activeProfiles = activeProfiles; this.defaultProfiles = defaultProfiles; this.propertySources = propertySources; } public PropertySummaryDescriptor getProperty() { return this.property; } public List getActiveProfiles() { return this.activeProfiles; } public List getDefaultProfiles() { return this.defaultProfiles; } public List getPropertySources() { return this.propertySources; } } ```

The message I'm trying to convey is that if an autoconfigured bean is declared as @ConditionalOnMissingBean, or more in general is autoconfigured, I would like to be able to provide my own version to the context also overriding its methods. For some reason this isn't possible in such cases. I don't know if this is intentional, if it isn't, I'm available to collaborate with you and fix the issue.

Comment From: philwebb

A lot of the *Descriptor classes were added after the fact and I don't think we've really considered how endpoints might be extended. I'm not really sure that they should have @ConditionalOnMissingBean on them, but I agree the current situation is odd and sends mixed signals.

We'll need to discuss this as a team to decide what to do.

Comment From: philwebb

We discussed this today as team and we're not keen to open up the *Descriptor types. The structure of the JSON that they produce is documented in our reference guide and as such we don't want it to be changed. The @Conditions are still useful because developers can override the endpoints to change the data that's returned.

In other words, we think it's OK to change the contents of the data that an endpoint returns, but not its fundamental structure.

For your specific use-case, we'd recommend developing entirely new endpoints.