Typo in Content Templates configuration settings
Closed this issue · 2 comments
Setting "AvailbleForFeature" is likely to cause confusion.
https://github.com/cloudscribe/cloudscribe.SimpleContent/search?q=AvailbleForFeature&unscoped_q=AvailbleForFeature
When fixed, the documentation page also needs updating, and probably an announcement.
We could make the code look for both versions of the setting to avoid this being a breaking change?
@CrispinF typo easily enough fixed.
We could make the code look for both versions of the setting to avoid this being a breaking change?
Only by writing a custom JSON deserializer, which might be a bit error-prone. At the moment it's just using .Net Core's built-in startup config model-binding to parse the appsettings.json back into an IOptions<ContentTemplateConfig>
Really not sure we want to go adding additional workaround code like that just for the sake of continuing to support a legacy typo... better to just let the change be breaking (and maybe defer doing this one until a more major upgrade where other breaking changes are potentially expected).
Ref to self:
https://www.jerriepelser.com/blog/deserialize-different-json-object-same-class/
https://stackoverflow.com/questions/43714050/multiple-jsonproperty-name-assigned-to-single-property
@JimKerslake ok agree, no remediation needed, just make it a breaking change.