Skip to content

不支持 allOf, anyOf, oneOf #24

@pickfire

Description

@pickfire

Bug Description

在 allOf, anyOf, oneOf 转换后 higress 没有 type,默认 mcp type 为 string,导致请求传入 api 服务为 string 而不是 object。我们用 fastapi 创建 openapi.json,pydantic 在 TypeA | TypeB 的情况下会用 anyOf,有 discriminator 下会用 oneOf,这边如果里面的 type 都一样,就把 allOf, anyOf, oneOf 的 type 放一样。

Steps to Reproduce

#22 可以看这边的测试结果,property 层不会显示 type,然后 higress mcp 会以 string 而不是 object 格式传入 api 服务器。

Expected Behavior

allOf, anyOf, oneOf 应该要有适当的 type。

Actual Behavior

allOf, anyOf, oneOf 直接没放 type。

Environment Information

  • OS: macOS, linux
  • Go Version: 1.25.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions