OpenAPITools / OpenAPITools/openapi-generator

[BUG] Python: "Only the HandlebarsEngineAdapter is supported for this generator"

Open
#14,050 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Python Issue: Bug
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

I don't honestly know if this is a bug or something I am doing wrong, but would appreciate some help regardless.

I am trying to generate a Python client from an OpenAPI 3.0.1 file using the Maven plugin configured as follows. But when I do I get the error: "Only the HandlebarsEngineAdapter is supported for this generator". I am not specifying an Engine Adaptor, and I understand Handlebars is the default. What could be causing this? Thanks!

<plugin>
    <groupId>org.openapitools</groupId>
    <artifactId>openapi-generator-maven-plugin</artifactId>
    <version>6.2.1</version>
    <executions>
        <execution>
            <goals>
                <goal>generate</goal>
            </goals>
            <configuration>
                <inputSpec>${project.basedir}/target/openapi.json</inputSpec>
                <generatorName>python</generatorName>
                <configOptions>
                    <sourceFolder>src/gen/python/main</sourceFolder>
                </configOptions>
            </configuration>
        </execution>
    </executions>
</plugin>

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Maven plugin configuration with OpenAPI 3.0.1 and the Python generator, then trace how the generator selects its template engine and handles the reported adapter error. Done means identifying whether the configuration or generator behavior causes the error and documenting a verified resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, openapi, python
Domain
api, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.