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

[Improvement][swagger] Now the interface document returns only the generic template #11208

Closed
2 of 3 tasks
fuchanghai opened this issue Jul 29, 2022 · 6 comments
Closed
2 of 3 tasks
Labels
question Further information is requested

Comments

@fuchanghai
Copy link
Member

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

截屏2022-07-29 18 10 33

If the developer is a front end, he wants to see the data structure in 'data'

If the response attribute of the annotation @ApiOperation is used, the interface document can see the data structure of data, but cannot see the general return template. Can you give some advice? Need a discussion tag?
@SbloodyS @EricGao888

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@fuchanghai fuchanghai added improvement make more easy to user or prompt friendly Waiting for reply Waiting for reply labels Jul 29, 2022
@github-actions
Copy link

Search before asking

  • I had searched in the issues and found no similar feature requirement.

Description

截屏2022-07-29 18 10 33

If the developer is a front end, he wants to see the data structure in 'data'

If the response attribute of the annotation @ApiOperation is used, the interface document can see the data structure of data, but cannot see the general return template. Can you give some advice? Need a discussion tag?
@SbloodyS @EricGao888

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@github-actions
Copy link

Thank you for your feedback, we have received your issue, Please wait patiently for a reply.

  • In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
  • If you haven't received a reply for a long time, you can join our slack and send your question to channel #troubleshooting

@SbloodyS SbloodyS added question Further information is requested and removed improvement make more easy to user or prompt friendly Waiting for reply Waiting for reply labels Jul 30, 2022
@SbloodyS
Copy link
Member

This is one of the reasons why we refactor the API in #10257. Currently, you can debug by opening F12 in the page to view the format of specific parameters.

@fuchanghai
Copy link
Member Author

@SbloodyS Although after your modification, I can only see the unified return structure。

{
	"code": 0,
	"data": {},
	"failed": true,
	"msg": "",
	"success": true
}

i mean as a ui,even if some default values ​​of f12 are null, the front end cannot judge the type of the parameter, nor does it know the meaning of each attribute of the object in 'data'.so why i open this issue

@SbloodyS
Copy link
Member

SbloodyS commented Aug 1, 2022

You can find the data structure through swagger ui after refactor to v2 api. For more detail you can take a look at #10301.

@fuchanghai
Copy link
Member Author

@SbloodyS you are so smart,thx

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

No branches or pull requests

2 participants