private static void exportFeatureToggles(final File dataPath) {
        var parentPath = new File(dataPath, "features");
        if (parentPath.exists()) {
            FileUtils.deleteQuietly(parentPath);
        }
        if (!parentPath.mkdirs()) {
            LOGGER.debug("Unable to create directory");
        }

        var subTypes = ReflectionUtils.findClassesWithAnnotationsInPackage(List.of(ConditionalOnFeatureEnabled.class), CentralAuthenticationService.NAMESPACE);
        var properties = new ArrayList<Map<?, ?>>();

        var allToggleProps = new HashSet<String>();
        subTypes.forEach(clazz -> {
            var features = Arrays.stream(clazz.getAnnotationsByType(ConditionalOnFeatureEnabled.class)).collect(Collectors.toList());
            var declaredClasses = clazz.getDeclaredClasses();
            for (var declaredClass : declaredClasses) {
                var innerFeatures = Arrays.stream(declaredClass.getAnnotationsByType(ConditionalOnFeatureEnabled.class)).toList();
                features.addAll(innerFeatures);
            }

            features.forEach(feature -> {
                for (var featureDefn : feature.feature()) {
                    var propName = featureDefn.toProperty(feature.module());
                    if (!allToggleProps.contains(propName)) {
                        allToggleProps.add(propName);

                        var map = new LinkedHashMap<>();
                        map.put("type", clazz.getName());
                        map.put("feature", feature.feature());
                        if (StringUtils.isNotBlank(feature.module())) {
                            map.put("module", feature.module());
                        }
                        map.put("enabledByDefault", feature.enabledByDefault());

                        map.put("property", propName);
                        properties.add(map);
                    }
                }
            });
        });

        if (!properties.isEmpty()) {
            var configFile = new File(parentPath, "config.yml");
            CasConfigurationMetadataCatalog.export(configFile, properties);
        }
    }
This is {@link CasDocumentationApplication}.

@author Misagh Moayyed
@since 6.4.0
docs/cas-server-documentation-processor/src/main/java/org/apereo/cas/documentation/CasDocumentationApplication.java