private File getSchemaFile(Class<?> mainType) {
        // At first find the root location where the schema files are written
        File directory;
        if (this.schemaFilePath == null) {
            directory = new File("src" + File.separator + "main" + File.separator + "resources");
            this.getLog().debug("- No 'schemaFilePath' configured. Applying default: " + directory);
        } else {
            directory = this.schemaFilePath;
        }

        // Then build the full qualified file name.
        String fileName = MessageFormat.format(this.schemaFileName,
                // placeholder {0}
                mainType.getSimpleName(),
                // placeholder {1}
                mainType.getPackage().getName().replace('.', File.separatorChar));
        File schemaFile = new File(directory, fileName);

        // Make sure the directory is available
        try {
            Files.createDirectories(schemaFile.getParentFile().toPath());
        } catch (IOException e) {
            this.getLog().warn("Failed to ensure existence of " + schemaFile.getParent(), e);
        }

        return schemaFile;
    }
Return the file in which the schema has to be written.

<p>
The path is determined based on the {@link #schemaFilePath} parameter.
<br>
The name of the file is determined based on the {@link #schemaFileName} parameter, which allows for two placeholders:
<ul>
<li><code>{0}</code> - containing the simple name of the class the schema was generated for</li>
<li><code>{1}</code> - containing the package path of the class the schema was generated for</li>
</ul>
</p>
The default path is: {@code src/main/resources}
<br>
The default name is: <code>{0}-schema.json</code>

@param mainType targeted class for which the schema is being generated
@return The full path name of the schema file
jsonschema-maven-plugin/src/main/java/com/github/victools/jsonschema/plugin/maven/SchemaGeneratorMojo.java