private static void generateMultipleAttributeSchema(
            JSONObject attributeSchema,
            Attribute attribute,
            ConfigurationContext context,
            BaseConfigurator baseConfigurator) {
        Optional<String> description = getDescription(attribute, baseConfigurator);

        if (attribute.type.getName().equals("java.lang.String")) {
            JSONObject jsonObject = new JSONObject().put("type", "string");
            description.ifPresent(desc -> jsonObject.put("description", desc));
            attributeSchema.put(attribute.getName(), jsonObject);

        } else {
            JSONObject properties = new JSONObject();
            Configurator<Object> lookup = context.lookup(attribute.getType());
            if (lookup != null) {
                lookup.getAttributes()
                        .forEach(attr ->
                                properties.put(attr.getName(), generateNonEnumAttributeObject(attr, baseConfigurator)));
            }

            JSONObject attributeObject = new JSONObject()
                    .put("type", "array")
                    .put(
                            "items",
                            new JSONArray()
                                    .put(new JSONObject()
                                            .put("type", "object")
                                            .put("properties", properties)
                                            .put("additionalProperties", false)));
            description.ifPresent(desc -> attributeObject.put("description", desc));
            attributeSchema.put(attribute.getName(), attributeObject);
        }
    }
Recursive configurators tree walk (DFS) and non-describable able attributes. Collects all
configurators starting from root ones in {@link ConfigurationAsCode#getConfigurators()}

@param elements linked set (to save order) of visited elements
@param attributes siblings to find associated configurators and dive to next tree levels
@param context configuration context
@param root is this the first iteration of root attributes
plugin/src/main/java/io/jenkins/plugins/casc/SchemaGeneration.java