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
For example, if I want to return an array of enums, at this point I do not wish to use a List to return the data; instead, I prefer to use an array like State[].
I noticed that the current version 2.4.9 does not support this method. If it returns an array [], its result is type='object' rather than type='array', which leads to the final display being in a non-array format.
It is hoped that support for returning arrays can be included in the new version.
比如我要返回一个枚举的数组,这时我不想使用List返回数据,而是想用State[] 数组这种方式。
我发现目前2.4.9版本不支持该方式,如果返回数组[] 它的结果是type='object'而不是type='array',导致最后是以非数组的方式显示的。
希望能够在新版中支持数组的返回
The text was updated successfully, but these errors were encountered:
@sunxue299 Have you tried the latest version? The one you are using is quite outdated. It would be best to provide a code snippet that completes a test case.
最新的版本有试过吗,你这个版本已经比较落后了 ,最好提供一个完成测试用例代码片段
@shalousun I tested with the latest version, 2.6.4:
I conducted two tests on the same interface, respectively returning data in array structure for the first test and List structure for the second test.
The JSON results and descriptions returned by smart-doc are shown in the screenshots that follow:
我使用最新版2.6.4测试:
对同一个接口进行2次测试,分别为:第一次返回的数据中为数组结构,第二次返回的数据为List结构。
smart-doc返回的json结果及描述在我后面的截图中:
Motivation(提出这个pr目的)
For example, if I want to return an array of enums, at this point I do not wish to use a List to return the data; instead, I prefer to use an array like State[].
I noticed that the current version 2.4.9 does not support this method. If it returns an array [], its result is type='object' rather than type='array', which leads to the final display being in a non-array format.
It is hoped that support for returning arrays can be included in the new version.
比如我要返回一个枚举的数组,这时我不想使用List返回数据,而是想用State[] 数组这种方式。
我发现目前2.4.9版本不支持该方式,如果返回数组[] 它的结果是type='object'而不是type='array',导致最后是以非数组的方式显示的。
希望能够在新版中支持数组的返回
The text was updated successfully, but these errors were encountered: