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
When the interface returns a List structure and uses responseBodyAdvice to configure a unified return structure, the document output type is 'array'.
#641
Closed
hellomsg opened this issue
Oct 20, 2023
· 5 comments
When the interface returns a List structure and uses responseBodyAdvice to configure a unified return structure, the document output type is 'array'.
Your Environment
Include as many relevant details about the environment where you experienced the bug.
smart-doc version: 2.7.7
plugin version (e.g., smart-doc-maven-plugin or smart-doc-gradle-plugin): 2.7.7
build tool version (maven or gradle): 3.8.6
jdk version: 1.8.0_381
Expected Behavior
If you're describing a bug, tell us what should happen.
If you're suggesting a change/improvement, tell us how it should work.
Current Behavior
If describing a bug, tell us what happens instead of the expected behavior.
If suggesting a change/improvement, explain the difference from current behavior.
In the JSON document generated by smart-doc:swagger, when the interface returns a List, "type": "array". I have configured a unified return structure using responseBodyAdvice, expecting the type to be an object.
@hellomsg If interested, you can refer to community co-construction, or help me register users, so that the community can better promote.
如果感兴趣,可以参考社区共建,也可以帮我登记下用户,方便社区更好的推广#12
@hellomsg If interested, you can refer to community co-construction, or help me register users, so that the community can better promote.
如果感兴趣,可以参考社区共建,也可以帮我登记下用户,方便社区更好的推广#12
@shalousun 3.0.0
This should be the same issue; let's wait for the 3.0.0 version to go live and then check if it has been fixed.
发布到仓库了吗?只能搜到 com.ly.smart-doc 的。com.github.shalousun 还是 2.7.7
@hellomsg If interested, you can refer to community co-construction, or help me register users, so that the community can better promote.
如果感兴趣,可以参考社区共建,也可以帮我登记下用户,方便社区更好的推广#12
@shalousun This should be the same issue; let's wait for the 3.0.0 version to go live and then check if it has been fixed.
3.0.0 发布到仓库了吗?只能搜到 com.ly.smart-doc 的。com.github.shalousun 还是 2.7.7
shalousun
changed the title
当接口返回List结构,并使用responseBodyAdvice配置统一返回结构时,文档输出类型为array
When the interface returns a List structure and uses responseBodyAdvice to configure a unified return structure, the document output type is 'array'.
Jun 28, 2024
When the interface returns a List structure and uses responseBodyAdvice to configure a unified return structure, the document output type is 'array'.
Your Environment
Include as many relevant details about the environment where you experienced the bug.
smart-doc version: 2.7.7
plugin version (e.g., smart-doc-maven-plugin or smart-doc-gradle-plugin): 2.7.7
build tool version (maven or gradle): 3.8.6
jdk version: 1.8.0_381
Expected Behavior
If you're describing a bug, tell us what should happen.
If you're suggesting a change/improvement, tell us how it should work.
Current Behavior
If describing a bug, tell us what happens instead of the expected behavior.
If suggesting a change/improvement, explain the difference from current behavior.
In the JSON document generated by smart-doc:swagger, when the interface returns a List,
"type": "array"
. I have configured a unified return structure using responseBodyAdvice, expecting the type to be an object.Configuration:
Unified return definition:
Interface definition:
Generated swagger document:
Possible Solution
Not obligatory, but suggest a fix/reason for the bug, or ideas on how to implement the addition or change.
Steps to Reproduce
Provide a link to a live example, or an unambiguous set of steps to reproduce this bug. Include code to reproduce if relevant.
The text was updated successfully, but these errors were encountered: