Mayankaggarwal8055 opened a new issue, #64358:
URL: https://github.com/apache/airflow/issues/64358
### Apache Airflow version
main (latest development branch)
### What happened and how to reproduce it?
**Issue Description**
The Docs menu incorrectly shows the "REST API Reference" link even when API
documentation is disabled.
**Steps to reproduce:**
1. Run Airflow UI locally
2. Ensure API docs are disabled:
- `enable_swagger_ui = False` OR
- pass `showAPI={false}` to `DocsButton`
3. Open the "Docs" menu in the navigation bar
**Observed behavior:**
- The "REST API Reference" link is still visible in the menu
**Expected behavior:**
- The "REST API Reference" link should be hidden when API docs are disabled
### What you think should happen instead?
The "REST API Reference" link should only be visible when API documentation
is enabled.
When `enable_swagger_ui` is disabled or `showAPI` is false, the link should
not be rendered in the Docs menu.
### Operating System
Windows 11
### Versions of Apache Airflow Providers
N/A (UI-related issue)
### Deployment
None
### Deployment details
- Running Airflow locally from source
- Using development UI (`airflow-core/src/airflow/ui`)
- No custom deployment or configuration beyond default setup
### Anything else?
This issue occurs consistently whenever API docs are disabled.
The issue is located in:
`airflow-core/src/airflow/ui/src/layouts/Nav/DocsButton.tsx`
I am willing to submit a fix for this issue.
### Are you willing to submit PR?
- [x] 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)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]