Inconsistent use of nullable fields in config #531
Labels
help wanted
We will welcome a contribution
Type: Clean-Up
Clean-up task that applies to shipping code but doesn't affect behavior.
Milestone
The config classes like Cluster are inconsistent about the use of nullable fields.
reverse-proxy/src/ReverseProxy/Abstractions/ClusterDiscovery/Contract/ProxyHttpClientOptions.cs
Lines 14 to 18 in 6defd11
This makes it hard for the various parts of the implementation to tell if they're being given a default value or if the user actually specified that value. Since many parts of the implementations are supposed to be replaceable components, it would help if they could distinguish so they could provide their own defaults while still respecting explicit user config.
Proposal: Make most/all config fields nullable and only specify the default in the implementations.
The text was updated successfully, but these errors were encountered: