mirror of
https://github.com/open-webui/mcpo.git
synced 2026-07-01 21:04:00 -04:00
[PR #278] fix: add enum support in OpenAPI schema generation #224
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/mcpo/pull/278
Author: @majiayu000
Created: 1/5/2026
Status: 🔄 Open
Base:
dev← Head:fix/issue-245-enum-support📝 Commits (1)
a5ebaa7fix: add enum support in OpenAPI schema generation📊 Changes
2 files changed (+62 additions, -3 deletions)
View changed files
📝
src/mcpo/tests/test_main.py(+55 -2)📝
src/mcpo/utils/main.py(+7 -1)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
When MCP servers define enum constraints on string or integer properties, these constraints were not being reflected in the generated OpenAPI schema. This caused LLMs to guess field values incorrectly.
Fixed
Literal[...values]typeLiteral[...values]typeCloses #245
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.