private static Object findSiddhiDocVersion(String siddhiVersion, String documentationVersion) {
        String siddhiDocVersion;
        if (siddhiVersion != null) {
            siddhiDocVersion = siddhiVersion;
        } else {
            siddhiDocVersion = documentationVersion;
        }
        if (Integer.parseInt(siddhiDocVersion.substring(0, siddhiDocVersion.indexOf("."))) < 5) {
            return "v4.x";
        } else {
            return "v" + siddhiDocVersion.substring(0, siddhiDocVersion.lastIndexOf("."));
        }
    }
Generate documentation related files using metadata

@param namespaceMetaDataList      Metadata in this repository
@param documentationBaseDirectory The path of the directory in which the documentation will be generated
@param documentationVersion       The version of the documentation being generated
@param logger                     The logger to log errors
@param siddhiVersion              Siddhi Core version
@param mavenProjectGroupId        Project Group ID
@throws MojoFailureException if the Mojo fails to find template file or create new documentation file
modules/siddhi-doc-gen/src/main/java/io/siddhi/doc/gen/core/utils/DocumentationUtils.java