feat: Allow namespace validation to be optional, for apps which depend on it being optional
Closed this issue · 0 comments
gkc commented
Is your feature request related to a problem? Please describe.
Background:
- namespace was intended to be enforced as mandatory on put() since months ago.
- However, a bug in AtKey.toString() meant that if a namespace wasn't present, then toString() would insert '.null' into the string representation.
- So for example, public:phone@alice would be toString'd as public:phone.null@alice.
- The validators run on the toString() representation of the AtKey, and so the validations passed even where a namespace wasn't actually present, because the regex would match '.null' as the namespace.
- That bug was fixed in this PR, so namespace enforcement actually started to happen
- This caused some tests to fail in at_client_sdk - easily enough fixed by adding namespaces to the AtKeys being created
- However: AtmospherePro, for example, currently relies on keys which do not have namespaces.
Describe the solution you'd like
Allow AtKey validations to treat presence of namespace as optional, if so desired.
Describe alternatives you've considered
Forward-fixing AtmospherePro. However there may be other apps out there with the same issue. Hence supporting in at_commons seems prudent.