[PR #20362] [CLOSED] fix: resolve OpenAPI spec validation errors #41208

Closed
opened 2026-04-25 13:29:38 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/20362
Author: @majiayu000
Created: 1/4/2026
Status: Closed

Base: devHead: fix/openapi-validation-errors


📝 Commits (1)

  • 6c91351 fix: resolve OpenAPI spec validation errors

📊 Changes

2 files changed (+34 additions, -5 deletions)

View changed files

📝 backend/open_webui/routers/files.py (+4 -1)
📝 backend/open_webui/routers/openai.py (+30 -4)

📄 Description

Pull Request Checklist

  • Target branch: Verify that the pull request targets the dev branch.
  • Description: Provided below.
  • Testing: Manually tested OpenAPI spec generation.
  • Agentic AI Code: This PR has gone through human review and manual testing.
  • Code review: Self-reviewed.

Changelog Entry

Description

  • Split multi-method api_route into separate route handlers in openai.py to generate unique operationIds for each HTTP method (GET/POST/PUT/DELETE)
  • Add missing file_name path parameter to get_file_content_by_id in files.py

Fixed

  • Fixed duplicate operationId error in OpenAPI spec for /openai/{path} endpoint (#20359)
  • Fixed missing path parameter definition for {file_name} in /api/v1/files/{id}/content/{file_name} (#20359)

Additional Information

Contributor License Agreement

By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/20362 **Author:** [@majiayu000](https://github.com/majiayu000) **Created:** 1/4/2026 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `fix/openapi-validation-errors` --- ### 📝 Commits (1) - [`6c91351`](https://github.com/open-webui/open-webui/commit/6c9135157ae4a8cf25c00d38ef026e4950cbcdae) fix: resolve OpenAPI spec validation errors ### 📊 Changes **2 files changed** (+34 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `backend/open_webui/routers/files.py` (+4 -1) 📝 `backend/open_webui/routers/openai.py` (+30 -4) </details> ### 📄 Description # Pull Request Checklist - [x] **Target branch:** Verify that the pull request targets the `dev` branch. - [x] **Description:** Provided below. - [x] **Testing:** Manually tested OpenAPI spec generation. - [x] **Agentic AI Code:** This PR has gone through human review and manual testing. - [x] **Code review:** Self-reviewed. # Changelog Entry ### Description - Split multi-method `api_route` into separate route handlers in `openai.py` to generate unique operationIds for each HTTP method (GET/POST/PUT/DELETE) - Add missing `file_name` path parameter to `get_file_content_by_id` in `files.py` ### Fixed - Fixed duplicate operationId error in OpenAPI spec for `/openai/{path}` endpoint (#20359) - Fixed missing path parameter definition for `{file_name}` in `/api/v1/files/{id}/content/{file_name}` (#20359) --- ### Additional Information - Fixes #20359 - The OpenAPI spec now validates correctly with tools like Gravitee's admission webhook and the openapi-spec-validator library ### Contributor License Agreement By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-25 13:29:38 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#41208