Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enhance: 优化API接口代码以及Swagger界面显示 #1066

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

Deali-Axy
Copy link

enhance: 优化API接口代码以及Swagger界面显示

原本的代码是直接在 create_item 方法里读取 request body

接口需要传入的各个参数在Swagger界面都没有展示,不够直观,代码冗余度比较高

第24-26行重复进行了无意义的json序列化和反序列化

本 pr 对API接口进行了重写,接口方法的代码缩减到了38行,swagger更加直观

效果如下

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant