-
Notifications
You must be signed in to change notification settings - Fork 16.3k
Add OpenAPI specification (II) #8721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
We do not have endpoints to download jobs, because this is an implementation detail, so this field has big no value.
9b6a87c to
f0d53f4
Compare
I am fixing it. I also checked if the problem occurs elsewhere. |
|
@ashb I answered all comments. Would you like to add something else? 😸 |
|
Only outstanding point is about #8721 (comment) (conf param to trigger as string vs object) -- I'll take it to the mailing list. |
potiuk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to change key to xcom_key - it's too generic and causes Java automatically generated client to fail
openapi.yaml
Outdated
|
|
||
| XComKey: | ||
| in: path | ||
| name: key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| name: key | |
| name: key |
| name: key | |
| name: xcom_key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not a fan of this really -- what specifically is the problem this causes for Java?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are a related change. (I did it before I read your message.) We can revert it if we make a different decision.
5993aef
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generated code of the method uses internally "key" variable to loop through the parameters. In Java you cannot have same variable and parameter name.
I will be happy if you find any other solution for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code here: https://github.com/mik-laj/airflow-api-clients/blob/master/out/object/java-google-api-client/src/main/java/org/openapitools/client/api/XComApi.java#L108 (now the parameter is named xcomkey - it used to be named key)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And BTW. this is the main reason why I created #9080 and I am super keen on automating the checks if the main language open-api clients can be automatically generated and compiled. Sometimes thing like choosing a name might matter (of course it should not matter in theory but we are leaving in an imperfect world). Making the clients generated and being usable is a priority for me in this case,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code here: https://github.com/mik-laj/airflow-api-clients/blob/master/out/object/java-google-api-client/src/main/java/org/openapitools/client/api/XComApi.java#L108 (now the parameter is named xcomkey - it used to be named key)
It didn't cause any problems in my compile tests...
Ah. I tested with the java-okhttp-gson, and it doesn't have that problem.
So next question: do we want to/need support every possible API generator? that's a lot of combinations to build+test+support?
Have we reported this bug upstream too?
openapi.yaml
Outdated
| default: true | ||
| readOnly: True | ||
| conf: | ||
| type: string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| type: string | |
| type: object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Can I still help in finishing this change? I think that the discussion between |
|
I think we should submit with xcom_key as we know that it at least compile in open-api generator. So I suggest we merge it as is. @ashb -> I think the two interns are pretty much blocked by this change and they could start working on it. we can always make a follow-up change later on if we find a better solution. I want to make the follow-up CI change soon as well so that any future change/proposal will get automatically tested. |
potiuk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
Yeah not a fan of xcomKey vs key but not a blocker from me. |
openapi.yaml
Outdated
|
|
||
| # Common data type | ||
| ScheduleInterval: | ||
| allOf: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one should be oneOf
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I updated the spec.
6153d5b
|
Curious, wonder why Mergeable is failing here... |
Because of "dont-merge" label |
|
🎉 |
|
thanks @mik-laj for driving this and congrats everyone for a big milestone :) |
|
Thanks @mik-laj ! 🚀 |


Hello,
This is my second proposal for the API specification (first: #7549). The previous one was merged without acceptance. I am very sorry for this very not cool behaviour. Now based on this change proposes specifications again. I will now try to introduce changes more transparently. I have created a lot of changes that are responses to comments on the previous version. I will now try to add reference to commit for each comment.
Preview:
Swaagger UI:
https://editor.swagger.io/?url=https://raw.githubusercontent.com/PolideaInternal/airflow/openapi-spec/openapi.yaml
Redoc:
https://redocly.github.io/redoc/?url=https://raw.githubusercontent.com/PolideaInternal/airflow/openapi-spec/openapi.yaml#operation/getConfig
Best regards,
Kamil
Make sure to mark the boxes below before creating PR: [x]
In case of fundamental code change, Airflow Improvement Proposal (AIP) is needed.
In case of a new dependency, check compliance with the ASF 3rd Party License Policy.
In case of backwards incompatible changes please leave a note in UPDATING.md.
Read the Pull Request Guidelines for more information.