private static JSONObject generateNonEnumAttributeObject(Attribute attribute, BaseConfigurator baseConfigurator) {
        JSONObject attributeType = new JSONObject();
        Optional<String> description = getDescription(attribute, baseConfigurator);
        switch (attribute.type.getName()) {
            case "java.lang.String":
            case "hudson.Secret":
                attributeType.put("type", "string");
                description.ifPresent(desc -> attributeType.put("description", desc));
                break;

            case "int":
            case "java.lang.Integer":
            case "long":
            case "java.lang.Long":
                attributeType.put("type", "integer");
                description.ifPresent(desc -> attributeType.put("description", desc));
                break;

            case "boolean":
            case "java.lang.Boolean":
                attributeType.put("type", "boolean");
                description.ifPresent(desc -> attributeType.put("description", desc));
                break;

            default:
                attributeType.put("type", "object");
                description.ifPresent(desc -> attributeType.put("description", desc));
                attributeType.put("additionalProperties", false);
                attributeType.put("$id", "#/definitions/" + attribute.type.getName());
                break;
        }
        return attributeType;
    }
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