class ReadinessEndpoint {

    private final ReadinessCheckListener readinessCheckListener;

    public ReadinessEndpoint(ReadinessCheckListener readinessCheckListener) {
        this.readinessCheckListener = readinessCheckListener;
    }

    @ReadOperation
    public Health health(@Nullable String showDetail) {<FILL_FUNCTION_BODY>}
}

        Health health = readinessCheckListener.aggregateReadinessHealth();
        if (showDetail == null || Boolean.parseBoolean(showDetail)) {
            return health;
        }
        return new Health.Builder(health.getStatus()).build();
    
<no_super_class>