panda-api icon indicating copy to clipboard operation
panda-api copied to clipboard

apis里的字段排序规则并不是按照编写顺序下来的?

Open xiangorng opened this issue 5 years ago • 1 comments

apis里的字段排序规则并不是按照编写顺序下来的? 试用了下,看下来是按照字段名字首字母排序自动排序的,这样话的可能会给编写文档带来困扰,不会按照预想排序执行了!

xiangorng avatar May 18 '20 09:05 xiangorng

暂时排序使用$order来排序,例如

response:{
    code:{name:"返回状态码", type:"int", $enum:[[-1, "失败"], [1, "成功"]], $order:1},
    msg:{name:"返回状态说明", $order:2}
}

后续会想办法根据json文件中的顺序进行排序

arlicle avatar May 29 '20 07:05 arlicle