You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The field names corresponding to openapi generated from different interfaces should be distinct.
不同接口生成的openapi对应的字段名应该不一样
Current Behavior(当前结果)
In multiple different interfaces, objects with the In multiple different interfaces, objects with the annotation that have only one type objects with the @RequestBody annotation that have only one type in common but differ in name are all parsed as the same type. For example, the field names generated for all interfaces become "userId".
多个不同接口下的RequestBody注解的不同对象里都只有一个类型相同但是名称不同的,都会被解析成同一个类型
, 比如所有接口生成的字段名都为userId
Possible Solution(bug解决建议)
Upon reviewing the OpenAPI interface documentation, the requests for different interfaces all point to a component named string in their refs.
查看openapi接口文档,不同接口的请求指向的refs都是同一个名为string的component
Steps to Reproduce (Bug产生步骤,请尽量提供用例代码)
For example, if the following three are used as parameters with the @ResponseBody annotation in different interfaces within various controllers, the generated OpenAPI might display the input parameters for all three interfaces as "userId".
Your Environment(您的使用环境)
All are the latest versions.
Expected Behavior(您期望的结果)
The field names corresponding to openapi generated from different interfaces should be distinct.
不同接口生成的openapi对应的字段名应该不一样
Current Behavior(当前结果)
In multiple different interfaces, objects with the
In multiple different interfaces, objects with the
annotation that have only one type objects with the@RequestBody
annotation that have only one type in common but differ in name are all parsed as the same type. For example, the field names generated for all interfaces become "userId".多个不同接口下的RequestBody注解的不同对象里都只有一个类型相同但是名称不同的,都会被解析成同一个类型
, 比如所有接口生成的字段名都为userId
Possible Solution(bug解决建议)
Upon reviewing the OpenAPI interface documentation, the requests for different interfaces all point to a component named
string
in their refs.查看openapi接口文档,不同接口的请求指向的refs都是同一个名为
string
的componentSteps to Reproduce (Bug产生步骤,请尽量提供用例代码)
For example, if the following three are used as parameters with the
@ResponseBody
annotation in different interfaces within various controllers, the generated OpenAPI might display the input parameters for all three interfaces as "userId".Context(Bug影响描述)
This results in errors in the generated OpenAPI interface, rendering it unusable.
导致生成的openapi接口错误,无法正常使用
The text was updated successfully, but these errors were encountered: