-
Notifications
You must be signed in to change notification settings - Fork 14.1k
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
[AIRFLOW-3395] Add REST API endpoints to the docs #4236
Conversation
Nice one @xnuinside Looks great. I've restarted the CI. |
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.
Looks good. We could also consider adding Swagger support to the experimental endpoint: https://github.com/soerface/flask-restful-swagger-2.0
@Fokko, fixed . about https://github.com/soerface/flask-restful-swagger-2.0 I think we could talk about it as an adding new feature with a separate task (something told to me, what it is not quick to add and, at first, need to decide what we want use swagger) |
@Fokko, two tests failed with strange errors, I believe it's not relative to PR ) |
@Fokko, tests fail with 'Attempting to fetch rat |
@xnuinside Some weird stuff happening with the CI, I've restarted them. Let's see what happens. |
@Fokko The lib https://github.com/soerface/flask-restful-swagger-2.0 isn't maintained. Better use https://github.com/noirbizarre/flask-restplus ? |
Codecov Report
@@ Coverage Diff @@
## master #4236 +/- ##
=========================================
+ Coverage 77.31% 77.82% +0.5%
=========================================
Files 201 201
Lines 16366 16366
=========================================
+ Hits 12654 12737 +83
+ Misses 3712 3629 -83
Continue to review full report at Codecov.
|
@Fokko, yeeee ) successful Travis build |
Good point, I'm not really into the different swagger extensions for Flask, so the |
Thanks @xnuinside :-) |
Swagger is now rebranded and re-badged as OpenAPI (Sometimes also called Swagger v3) so it would be nice to find a module supporting that: https://smartbear.com/blog/develop/what-is-the-difference-between-swagger-and-openapi/ |
Make sure you have checked all steps below.
Jira
Description
I don't see any task about start using swagger or something else, so I added temporary doc for informing about existed endpoints
I also try to use flask autodoc https://sphinxcontrib-httpdomain.readthedocs.io/en/stable/#module-sphinxcontrib.autohttp.flask but has an issue relative to defining flask app, I believe need to do some refactor to use flask app, so I just used simple httpdomain sphinx.
Added info about REST API endpoints in doc
result doc preview:
if try to use autofunction, for example, will be problems such as:
''' File "/Users/jvolkova/.virtualenvs/airflow_tutorial/lib/python2.7/site-packages/airflow/www_rbac/api/experimental/endpoints.py", line 38, in
requires_authentication = airflow.api.api_auth.requires_authentication
AttributeError: 'NoneType' object has no attribute 'requires_authentication'
''' so need to refactor 'endpoints.py' to avoid those issues, but I don't want to do it right now, because as I remember we plan do something with REST API
Tests
Commits
Documentation
Code Quality
flake8