Java Client generation using the Airflow OpenAPI Spec (3.1)
- Dominant language
- Python
- Stars
- 46.9k
- Forks
- 17.8k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 472
Description
### 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](https://openapi-generator.tech/docs/installation/) and the [Airflow OpenAPI](https://airflow.apache.org/docs/apache-airflow/stable/stable-rest-api-ref.html) 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:
```java
/**
* 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
Response Details
Status Code Description Response Headers
200 Successful Response -
401 Unauthorized -
403 Forbidden -
404 Not Found -
406 Not Acceptable -
422 Validation Error -
*/
```
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
- [x] I agree to follow this project's [Code of Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
Contributor guide
Research direction
Reproduce the generation from openapi/openapi.yaml using codegen/java-client-config.json and the command shown in the issue. Inspect the generated Java classes, beginning with the getConfig documentation example, and identify the source of the malformed comments and other reported errors. Done means the generated client classes contain no compilation errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, backend-api-design
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100