Skip to content

[BUG] add custom headers method error #6267

@MaMengzhen

Description

@MaMengzhen

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

In the addCustoms Header method, when obtaining the value of the header, only the basic type is checked. If a string type check is added, when testing the MCP tool, except for string type, numerical and Boolean basic types cannot be replaced with the value of the header.

Image Image

Expected Behavior

In the addCustoms Header method, when obtaining the value of the header, only the basic type is checked. If a string type check is added, when testing the MCP tool, except for string type, numerical and Boolean basic types cannot be replaced with the value of the header.

Steps To Reproduce

  1. Convert an existing interface with a header into an MCP tool.
  2. Test the MCP tool.
  3. Enter the input parameters as numbers.
  4. Enter the addCustoms Header method and view the code for replacing header values.

Environment

ShenYu version(s):2.7.1-SNAPSHOT

Debug logs

No response

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions