From 8e113f4af1c967d60ea837c89bc9a20d76cfd798 Mon Sep 17 00:00:00 2001 From: Chao Wang Date: Wed, 30 Oct 2024 10:27:09 +0800 Subject: [PATCH] [HAL-1991] Fix error in AddUnmanagedDialog, it should also process on List type for request attributes. (cherry picked from commit 6513c89ee387d632145a927c68aa98a7d2a77307) --- .../org/jboss/hal/meta/description/ResourceDescription.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/src/main/java/org/jboss/hal/meta/description/ResourceDescription.java b/meta/src/main/java/org/jboss/hal/meta/description/ResourceDescription.java index 43385b2e0..be47aac11 100644 --- a/meta/src/main/java/org/jboss/hal/meta/description/ResourceDescription.java +++ b/meta/src/main/java/org/jboss/hal/meta/description/ResourceDescription.java @@ -79,7 +79,9 @@ private AttributeCollection getAttributes(String path) { if (!map.containsKey(path)) { for (Property p : attributes.asPropertyList()) { ModelNode parentValue = p.getValue(); - if (parentValue.hasDefined(TYPE) && parentValue.get(TYPE).asType().equals(ModelType.OBJECT) + // process also on LIST type if we're in request attributes. + boolean isRequestProperties = path.endsWith(REQUEST_PROPERTIES); + if (parentValue.hasDefined(TYPE) && (parentValue.get(TYPE).asType().equals(ModelType.OBJECT) || (isRequestProperties && parentValue.get(TYPE).asType().equals(ModelType.LIST))) && !parentValue.get(VALUE_TYPE).asString().equalsIgnoreCase(STRING)) { for (Property nested : parentValue.get(VALUE_TYPE).asPropertyList()) { ModelNode nestedValue = nested.getValue();