public static void removeSnapshotAPIDocs(File mkdocsConfigFile, String documentationBaseDirectory, Log logger) {
        // Retrieving the documentation file names
        File apiDocsDirectory = new File(documentationBaseDirectory
                + File.separator + Constants.API_SUB_DIRECTORY);
        String[] documentationFileNames = apiDocsDirectory.list(
                (directory, fileName) -> fileName.endsWith(Constants.MARKDOWN_FILE_EXTENSION)
        );

        if (documentationFileNames != null) {
            // Removing snapshot files and creating a list of the files that are left out
            for (String documentationFileName : documentationFileNames) {
                if (documentationFileName.endsWith(Constants.SNAPSHOT_VERSION_POSTFIX
                        + Constants.MARKDOWN_FILE_EXTENSION)) {
                    // Removing the snapshot documentation file
                    File documentationFile = new File(apiDocsDirectory.getAbsolutePath()
                            + File.separator + documentationFileName);
                    if (!documentationFile.delete()) {
                        logger.warn("Failed to delete SNAPSHOT documentation file "
                                + documentationFile.getAbsolutePath());
                    }
                }
            }

        }
    }
Remove the snapshot version documentation files from docs/api directory

@param mkdocsConfigFile           The mkdocs configuration file
@param documentationBaseDirectory The path of the base directory in which the documentation will be generated
@param logger                     The maven plugin logger
modules/siddhi-doc-gen/src/main/java/io/siddhi/doc/gen/core/utils/DocumentationUtils.java