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

Body parameters description? #246

Closed
thelinuxlich opened this issue Nov 29, 2022 · 7 comments
Closed

Body parameters description? #246

thelinuxlich opened this issue Nov 29, 2022 · 7 comments

Comments

@thelinuxlich
Copy link
Contributor

Sometimes I miss the possibility of adding a description for each parameter in POST/PUT/DELETE requests instead of having just a body description, am I wrong?

@ecyrbe
Copy link
Owner

ecyrbe commented Nov 29, 2022

what do you mean ? parameters have description available, so does body, see documentation : http://www.zodios.org/docs/api/api-definition#parameters

@thelinuxlich
Copy link
Contributor Author

Isn't the body schema defined in a single parameter though?

@ecyrbe
Copy link
Owner

ecyrbe commented Nov 29, 2022

oh, you mean body properties ? it's a zod feature you are asking for ?

@thelinuxlich
Copy link
Contributor Author

It's because in OpenAPI the schema fields can have description, no matter if it's a requestBody

@thelinuxlich
Copy link
Contributor Author

Now thinking more about it, would be nice if the body supported passing a example

@ecyrbe
Copy link
Owner

ecyrbe commented Nov 29, 2022

It's possible to add an optionnal example field, like for description. it will then allow for openapi example generation. Feel free to create a feature request with a detailed explanation.

But description for schema properties is not possible. it's out of my power to add this feature to zod. So i'm closing this one

@ecyrbe ecyrbe closed this as completed Nov 29, 2022
@thelinuxlich
Copy link
Contributor Author

For reference: ecyrbe/zodios-openapi#172

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

No branches or pull requests

2 participants