-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Display example value in Swagger ReadOnly documentation #4422
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
Conversation
This is the kind of PRs that benefit from a before and after screenshot. 😕 |
Not to say we don't appreciate the PRs! We do! Just generally speaking, @shockey reviews the code, and I often review the functionality change. If it's visual, it takes me less time to review the PR because I don't necessarily have to run the app for the change, or even if I do, it's easier to spot the change. |
@webron I understand your remark. Finally, the example value isn't displayed at all. Give me your preference ? |
We're ok with getting PRs without opening issues beforehand, if they are described well. Sure, there's a risk that we won't accept the PR, but generally speaking it is acceptable. I'm ok with accepting the PR's functionality as it is right now, just be aware that we're planning on improving that part in general and it may make this PR obsolete. However, since it gives an intermediate solution, there's value in it. |
@webron ok. thanks a lot. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR needs tests!
End-to-end would be best. If you'd be hard-pressed to implement the tests, ping me and I can add some cases for you, and get this merged 😃
Hello @shockey ... thanks a lot. |
approval was conditional on implementing test (done)
@dedece35 Merged! Thanks for the contribution and patience! |
Description
It's the continuity of my closed PR #3977 about example part.
SwaggerUI documentation in ReadOnly mode doesn't give example value.
This value is given when "Try it out" button is cliked.
Now, this example value is also displayed on readonly mode of swaggerUI.
Motivation and Context
I want to know example value for a type without clicking on "Try it out" button.
How Has This Been Tested?
To develop this feature, I followed CONTRIBUTING.md file such as :
Screenshots (if appropriate)
No screenshot but "example value" is displayed like "available values" et "default value" after these two values
Checklist
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests