Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: settings closed set with validation [DHIS2-18217] #18817

Merged
merged 9 commits into from
Oct 17, 2024

Conversation

jbee
Copy link
Contributor

@jbee jbee commented Oct 14, 2024

Summary

  • makes SystemSettings and UserSettings a closed set (only accept known keys keysWithDefaults())
  • validates values on update based on the key type extracted from the key access method
  • restricts translatable properties to those annotated @Translatable
  • fixes endpoint routing issues (reading value vs reading translation)

Automatic Testing

Adds unit tests for the validation
Modifies some existing tests as API now has to use known keys

@jbee jbee self-assigned this Oct 14, 2024
@jbee jbee marked this pull request as ready for review October 17, 2024 08:08
@jbee jbee merged commit ad49941 into dhis2:master Oct 17, 2024
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants