Skip to content
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

Properly setup bundled swagger-ui in Connexion #36975

Closed
1 task done
Taragolis opened this issue Jan 23, 2024 · 1 comment · Fixed by #37525
Closed
1 task done

Properly setup bundled swagger-ui in Connexion #36975

Taragolis opened this issue Jan 23, 2024 · 1 comment · Fixed by #37525
Labels
AIP-44 Airflow Internal API area:API Airflow's REST/HTTP API kind:meta High-level information important to the community

Comments

@Taragolis
Copy link
Contributor

Body

Initially reported in Slack

Hi. I just upgraded to 2.8.1 and am wondering if this is a new warning message:

[2024-01-23T15:02:27.020+0000] {options.py:83} WARNING - The swagger_ui directory could not be found.
    Please install connexion with extra install: pip install connexion[swagger-ui]
    or provide the path to your local installation by passing swagger_path=<your path>

This warning message might comes from the different places:

FAB Auth Manager

options={
"swagger_ui": conf.getboolean("webserver", "enable_swagger_ui", fallback=True),
},

Internal API

options={"swagger_ui": conf.getboolean("webserver", "enable_swagger_ui", fallback=True)},


The nature of this warning that we use bundled to Airflow swagger ui (added in #28788) that mean we do not require connexion[swagger-ui] however for proper work we need to setup swagger_path in Connexion 2.x options by the same way as it done in regular REST API:

options={
"swagger_ui": conf.getboolean("webserver", "enable_swagger_ui", fallback=True),
"swagger_path": os.fspath(ROOT_APP_DIR.joinpath("www", "static", "dist", "swagger-ui")),
},

Or disable swagger by provide swagger_ui=False if this components do not use swagger, unfortunetly I'm not confident about it.

In addition parameters names/types changed in Connexion 3, see: https://connexion.readthedocs.io/en/3.0.5/swagger_ui.html, so better to take it in account into the #36052 or similar PRs

Committer

  • I acknowledge that I am a maintainer/committer of the Apache Airflow project.
@Taragolis Taragolis added area:API Airflow's REST/HTTP API kind:meta High-level information important to the community AIP-44 Airflow Internal API labels Jan 23, 2024
@potiuk
Copy link
Member

potiuk commented Jan 23, 2024

Nice. We might have soon interns from Major League Hacking to take a look at the Connexion upgrade so let's keep it in mind

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AIP-44 Airflow Internal API area:API Airflow's REST/HTTP API kind:meta High-level information important to the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants