OpenAPITools/openapi-generator · error · RuntimeException

Only the HandlebarsEngineAdapter is supported for this gener

Error message

Only the HandlebarsEngineAdapter is supported for this generator

What it means

Error "Only the HandlebarsEngineAdapter is supported for this generator" thrown in OpenAPITools/openapi-generator.

Source

Thrown at modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/GdscriptClientCodegen.java:311

        super.processOpts();

        processAdditionalProperties();
        supportingFiles.add(new SupportingFile("core/ApiBee.handlebars", "core", toCoreFilename("ApiBee") + ".gd"));
        supportingFiles.add(new SupportingFile("core/ApiError.handlebars", "core", toCoreFilename("ApiError") + ".gd"));
        supportingFiles.add(new SupportingFile("core/ApiConfig.handlebars", "core", toCoreFilename("ApiConfig") + ".gd"));
        supportingFiles.add(new SupportingFile("core/ApiResponse.handlebars", "core", toCoreFilename("ApiResponse") + ".gd"));
        supportingFiles.add(new SupportingFile("README.handlebars", "", "README.md"));

        // Ensure we're using the appropriate template engine, and configure it while we're at it.
        // We had to use handlebars because the truthy values of mustache include `""` and `"null"`,
        // and things went south for default values and examples (but descriptions were OK, somehow)
        TemplatingEngineAdapter templatingEngine = getTemplatingEngine();
        if (templatingEngine instanceof HandlebarsEngineAdapter) {
            HandlebarsEngineAdapter handlebars = (HandlebarsEngineAdapter) templatingEngine;
            //handlebars.infiniteLoops(true); // will we want this eventually?
            handlebars.setPrettyPrint(true);  // removes blank lines left by flow control tags
        } else {
            throw new RuntimeException("Only the HandlebarsEngineAdapter is supported for this generator");
        }
    }

    @Override
    public String apiDocFileFolder() {
        return (outputFolder + File.separator + apiDocPath);
    }

    @Override
    public String modelDocFileFolder() {
        return (outputFolder + File.separator + modelDocPath);
    }

    @Override
    public String escapeUnsafeCharacters(String input) {
        // There might be ways to inject code in Gdscript, but I don't see any for now.  (no /* */ comments)
        // TODO: review this can of worms with someone knowledgeable
        return input;

View on GitHub (pinned to fcec517be3)

Solutions

  1. Remove the custom template engine adapter option or set it to 'handlebars'; only the HandlebarsEngineAdapter is supported for this generator.

When it happens

Trigger: Thrown when a templating engine other than Handlebars is selected for the GDScript client generator. Use the default HandlebarsEngineAdapter.

Common situations: See trigger scenarios.


AI-assisted analysis of OpenAPITools/openapi-generator@fcec517be3 (2026-08-22). Data as JSON: /api/errors/289cad9ce71b9398. Report an issue: GitHub.