Repository navigation
Conversation
…tadata Preserve numeric tokens until the selected scalar type is known. Validate nested objects, collections and enums with field paths before invoking the RPC, and cover overload isolation and numeric wire boundaries.
…ctive overload Generate long values as decimal strings, submit the original JSON tokens, and ignore stale method details. Exercise overload switching, request payloads and field errors in the debug view.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Please provide a description of this PR:
修复 Dubbo Admin 泛化调用中的大整数精度丢失和重载参数校验问题
关联 issue apache/dubbo-go#3742 第 3 项。
根据所选实例所属的 provider 应用、方法名和完整 signature 查找方法声明。匹配后,复用现有 method detail 和 buildRelatedTypes,从同一份 provider metadata 获取参数顺序、参数类型和嵌套字段定义
例如,同一服务同时声明 echo(long) 和 echo(User) 时,选择 echo(User) 后提交数字,Admin 会在发起 RPC 前返回类型错误。提交仅由其他 provider 声明的签名,也会在方法匹配阶段失败
前端校验编辑器中的 JSON 语法后,保留原始数字文本构造请求体。后端沿用 []json.RawMessage 接收参数,并使用 json.Number 将数值转换延迟到目标类型确定之后,避免大整数经过 JavaScript Number 或 Go float64 时发生舍入
解码覆盖 Java/Go 标量、Java 装箱类型、
java.math.BigInteger、数组、枚举、嵌套对象和 map。数组元素、对象字段以及 map 的键和值均按各自的类型递归校验。例如,long参数输入 "9223372036854775807" 时会精确转换为 int64;输入 "9223372036854775808" 时会在发起 RPC 前返回越界错误。方法标签展示参数类型,例如 echo(long) 和 echo(User)。切换重载后,调试页根据当前签名重新生成请求模板。
long、int64和 BigInteger 等类型默认使用带引号的十进制字符串。快速切换时,较早发出的详情请求即使后返回,也不会覆盖当前模板。参数错误会在响应区显示完整字段路径、期望类型、实际类型和失败原因。例如:
user.profile.id: expected long, got missing (required field)user.profile.role: expected Role, got string (allowed values: ADMIN, USER)现有 metadata 没有独立的必填标记,本次按 properties 检查字段是否存在。对于 null,按字段类型单独处理,例如 Java 装箱类型允许显式传入 null。
To help us figure out who should review this PR, please put an X in all the areas that this PR affects.