WireMock-Net / WireMock.Net

WireMock.Net is a flexible product for stubbing and mocking web HTTP responses using advanced request matching and response templating. Based on the functionality from http://WireMock.org, but extended with more functionality.
Apache License 2.0
1.42k stars 209 forks source link

Change "blacklist" and "whitelist" terms #489

Closed akamud closed 4 years ago

akamud commented 4 years ago

Is your feature request related to a problem? Please describe. These terms have proven not to be inclusive to all people in IT. A lot of big projects are already moving away from them. There are better terms that describe the intention of these lists more clearly too.

Describe the solution you'd like A lot of repos are changing the "blacklist" term to "denylist" or "blocklist", and "whitelist" to "allowlist" or "passlist". Deny/Allow seems to be more common, though.

I know this would be a breaking change, so maybe a minor release marking these objects as Obsolete while providing the new Allow/Denylists could make this less traumatic for a possible future major release?

StefH commented 4 years ago

In WireMock.Net, I have only used the following: https://github.com/WireMock-Net/WireMock.Net/blob/master/src/WireMock.Net/Settings/IProxyAndRecordSettings.cs#L41

/// <summary>
/// Defines a list from headers which will excluded from the saved mappings.
/// </summary>
string[] BlackListedHeaders { get; set; }

/// <summary>
/// Defines a list of cookies which will excluded from the saved mappings.
/// </summary>
string[] BlackListedCookies { get; set; }

So I guess renaming it to: ExcludedHeaders and ExcludedCookies would be fine.

akamud commented 4 years ago

Seems fine to me, the new names are more explicit too. Other than that, I just found some references for Whitelist and Blacklist in infura.yaml, not sure what are those.

StefH commented 4 years ago

Infura.yaml is just an third party example openapi yaml specification file.