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

Group all samples after the description of parameters and status code #42

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

olivier-heurtier
Copy link
Contributor

No description provided.

@ikalnytskyi
Copy link
Member

Hey @olivier-heurtier! Thanks for the patch. Can you please shed a light on the rationale behind this change? Why do you want to group all examples after descriptions?

@olivier-heurtier
Copy link
Contributor Author

Hi @ikalnytskyi
I tend to think a documentation is more readable when I have the full description first (with all the parameters, the errors, etc.), and then the examples. Putting the examples in the middle of the description makes the different parameters less identifiable. This is of course only my personal opinion.
In addition, this makes the output more similar if option :examples: is used or not used

@ikalnytskyi
Copy link
Member

@olivier-heurtier I'm a little bit concerned that there are some who will oppose you and say that the examples must be shown where other information about responses is shown. Just to clarify, are you concerned about showing example for a request body? Or for responses? Since responses are shown at the end, I'd assume it's ok to show them there. And as for a request body example, hm, what if we render a request body parameter as the last parameter in the list (i.e. before responses)?

@olivier-heurtier
Copy link
Contributor Author

@ikalnytskyi what if I add a directive option to activate the grouping of all examples? Any suggestion for the name?

@ikalnytskyi
Copy link
Member

@olivier-heurtier can we please put this on hold for a while? It's hard to maintain rendering options in the way it's written right now. I have some thoughts how to improve it, and I plan to try it this week.

@olivier-heurtier
Copy link
Contributor Author

It's ok for me.

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

Successfully merging this pull request may close these issues.

None yet

2 participants