fix: Restrict coding schemes of ADE to valid coding schemes#22981
Closed
jason-p-pickering wants to merge 4 commits intomasterfrom
Closed
fix: Restrict coding schemes of ADE to valid coding schemes#22981jason-p-pickering wants to merge 4 commits intomasterfrom
jason-p-pickering wants to merge 4 commits intomasterfrom
Conversation
|
jbee
reviewed
Feb 18, 2026
Contributor
jbee
left a comment
There was a problem hiding this comment.
When it comes to simply format validation the best way to go about it is to not use String fields but specific types like UID or in this case there is a new class IdProperty which makes sure the value is proper or an error occurs. ATM the issue we have is that you don't get nice HTTP level responses from it. Usually these low level parsing methods will throw a IllegalArgumentException which I think becomes a generic BAD REQUEST forwarding the message. While this not particularly nice for the user I think we have to avoid writing code for trivial matters like these.
david-mackessy
approved these changes
Feb 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes https://dhis2.atlassian.net/browse/DHIS2-20941
Coding schemes of ADE requests/exchanges could be set to any string. Here we restrict them to valid coding schemes:
Case sensitivity is not considered as either case can be valid.