Repository navigation
Generate the admin API v2 OpenAPI validation hints in English regardl… - #54853
Merged
vmuzikar merged 1 commit intoNov 13, 2026
Merged
Conversation
…ess of the build locale Closes keycloak#54852 Signed-off-by: Maximilian Brodda <QuellcodeWanderer@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
No active review issues block the change to make admin API v2 validation hints consistently English across build environments.
No open issues 🎉
What changed in this PR
Makes admin API v2 OpenAPI validation hints consistently English across build environments, addressing #54852 without relying on Maven locale settings.
Changes:
- Loads Hibernate Validator’s English base bundle using
Locale.ROOT. - Adds a regression test that checks English validation hints under a German default locale and restores the original locale afterward.
| File | Description |
|---|---|
rest/admin-v2/services/src/test/java/org/keycloak/admin/internal/openapi/ValidationAnnotationScannerTest.java |
Tests locale-independent English hints for blank and size constraints. |
rest/admin-v2/services/src/main/java/org/keycloak/admin/internal/openapi/ValidationAnnotationScanner.java |
Explicitly selects the base validation-message bundle with Locale.ROOT. |
Review effort: Balanced
vmuzikar
approved these changes
Nov 13, 2026
vmuzikar
left a comment
Contributor
There was a problem hiding this comment.
LGTM, thank you for the contribution @QuellcodeWanderer!
ItsRoy69
pushed a commit
to ItsRoy69/keycloak
that referenced
this pull request
Nov 14, 2026
…ess of the build locale (keycloak#54853) Closes keycloak#54852 Signed-off-by: Maximilian Brodda <QuellcodeWanderer@users.noreply.github.com> Co-authored-by: Maximilian Brodda <QuellcodeWanderer@users.noreply.github.com>
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.
I load the bundle with
Locale.ROOT, which selects Hibernate Validator's base bundle. That bundle is English, which matches the committedopenapi.json.I fixed the locale in the scanner rather than in the Maven build (e.g.
-Duser.language=enfor the plugin), because the scanner is also used by the unit tests and from the IDE, and the existing tests already assume English texts.The new test sets the default locale to German, builds descriptions and checks that they are in English. It fails without the fix. I also regenerated
openapi.jsonwith-Duser.language=de: without the fix 12 lines change, with the fix the file stays the same.Closes #54852