TongchengOpenSource / smart-doc

Smart-doc is a java restful api document generation tool. Smart-doc is based on interface source code analysis to generate interface documentation, completely zero-injection.
https://smart-doc-group.github.io/#/
Apache License 2.0
1.42k stars 278 forks source link

There is an issue with the order of response fields. #227

Closed liwenchao1984 closed 2 years ago

liwenchao1984 commented 2 years ago

Your Environment

Expected Behavior

In the controller, I have a distributed interface public Resp<Page<SysUser>> page();. I am using pagination from MyBatisPlus, overriding the source code of com.baomidou.mybatisplus.extension.plugins.pagination.Page. I hope that when generating the documentation, the field order is: current, size, total, pages image

Current Behavior

size, total, pages, current

Context (Bug Impact Description)

I would like to ask how to control the field order.

image

shalousun commented 2 years ago

@liwenchao1984 Adjusting the order of get methods in an interface is pointless; the default field order will be used, and of course, there won't be any support for this. The significance of this field order is minimal.