Skip to content

Java Client generation using the Airflow OpenAPI Spec (3.1) #72466

Closed as not planned

Description

@ericBenchant

Under which category would you file this issue?

Task SDK

Apache Airflow version

3.3.1

What happened and how to reproduce it?

Using the OpenAPI generator and the Airflow OpenAPI with the following command:

java -jar codegen/openapi-generator-cli.jar generate -i openapi/openapi.yaml -g java -c codegen/java-client-config.json -o . --global-property modelTests=false --global-property apiTests=false

I generated a java client, but there were a lot of errors in multiple generated classes. Most of them are comments that get closed too early:

/**
     * Build call for getConfig
     * @param section  (optional)
     * @param accept  (optional, default to */*)
     * @param _callback Callback for upload/download progress
     * @return Call to execute
     * @throws ApiException If fail to serialize the request body object
     * @http.response.details
     <table border="1">
       <caption>Response Details</caption>
        <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
        <tr><td> 200 </td><td> Successful Response </td><td>  -  </td></tr>
        <tr><td> 401 </td><td> Unauthorized </td><td>  -  </td></tr>
        <tr><td> 403 </td><td> Forbidden </td><td>  -  </td></tr>
        <tr><td> 404 </td><td> Not Found </td><td>  -  </td></tr>
        <tr><td> 406 </td><td> Not Acceptable </td><td>  -  </td></tr>
        <tr><td> 422 </td><td> Validation Error </td><td>  -  </td></tr>
     </table>
     */

But there are also some more severe problems in other classes.

What you think should happen instead?

The generated classes should not have any errors.

Operating System

Fedora Linux (42)

Deployment

None

Apache Airflow Provider(s)

No response

Versions of Apache Airflow Providers

No response

Official Helm Chart version

Not Applicable

Kubernetes Version

No response

Helm Chart configuration

No response

Docker Image customizations

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:bug
    needs-triage
    on Sep 3, 2026
  2. boring-cyborg commented on Sep 3, 2026

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

  3. jason810496 commented on Sep 4, 2026

    @jason810496
    Member

    Hi @ericBenchant,
    We support Java SDK since 3.3.0 -- https://airflow.apache.org/docs/apache-airflow/stable/authoring-and-scheduling/language-sdks/java.html.
    I just gave a talk about the further roadmap of Java SDK in Airflow Submit this year -- https://drive.google.com/file/d/1qgdT4nWKMlNMdqH8EqR46NKL7JoKFtKY/view?usp=sharing.

    The Java SDK supports better way to interact with Airflow natively.
    Would appreciate your feedback on what else should Airflow Java SDK should support to fulfill your usecase.

  4. added and removed
    kind:bug
    needs-triage
    on Sep 4, 2026
  5. Felix-ming commented on Sep 20, 2026

    @Felix-ming

    Hi! I’d like to take this issue.

    I can reproduce the generated Java client failures with the current Airflow OpenAPI spec and OpenAPI Generator, then narrow the fix to one remaining reproducible codegen/Javadoc issue beyond the already-fixed / Accept header case.

    I’ll keep the PR focused, add a regression or reproduction test where appropriate, and document the relevant spec/generator behavior so the generated client compiles cleanly.

    If this scope is still welcome, please assign this issue to me.

  6. Felix-ming commented on Sep 21, 2026

    @Felix-ming

    The root cause is in OpenAPI Generator rather than Airflow, so I opened OpenAPITools/openapi-generator#24972. It preserves the runtime default value, escapes only the value rendered in Java Javadocs, and adds a regression test for the */* case. The PR is ready for maintainer review.

  7. jason810496 commented on Sep 21, 2026

    @jason810496
    Member

    Close this PR as this is out of scope of Airflow. This is an issue of openapi-generator instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions