keycloak/rest
Erik Jan de Wit ccacca5b4d
add validation to description based on the validation annotations (#47375)
* add validation to description based on the validation annotations

fixes: #47371
Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added test and better encapsulation

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* Remove applySchemaProperties() from ValidationAnnotationScanner

SmallRye handles this

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* change to use class instead of string

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added error when encountering group annotation that isn't in the map

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* fixed test and added openapi.yaml from js folder

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* make it spotless

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* made the scanner more generic and use the validation message

kept special processing for constraints that have parameters

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* use interpolation for the other annotations

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* updated more PR reviews

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* more PR review comments

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* fixed merge

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* moved class level validator descriptions

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* added field name to annotation, that we can then use in the schema

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* don't put validations that have an affectedField on the class

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* jandex default

Jandex returns null for annotation values that use the default, it only
returns values that were explicitly specified.

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* fixed test

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* even more PR review comments

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* small fix to get more validations in the description

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* better handle on parmeterised types

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>

* Update generated spec

Signed-off-by: Václav Muzikář <vmuzikar@ibm.com>

---------

Signed-off-by: Erik Jan de Wit <erikjan.dewit@gmail.com>
Signed-off-by: Václav Muzikář <vmuzikar@ibm.com>
Co-authored-by: Václav Muzikář <vmuzikar@ibm.com>
2026-04-29 12:56:51 +00:00
..
admin-ui-ext use endpoint instead of multiple fetch on client 2026-03-25 09:24:15 +01:00
admin-v2 add validation to description based on the validation annotations (#47375) 2026-04-29 12:56:51 +00:00
pom.xml Initial Client API v2 impl (#43395) 2025-11-03 14:31:54 +01:00