-
Notifications
You must be signed in to change notification settings - Fork 9k
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
Fix 3803. Added support for oneOf and anyOf for Example Value #4368
Fix 3803. Added support for oneOf and anyOf for Example Value #4368
Conversation
@@ -72,7 +72,6 @@ describe("<ModelExample/>", function(){ | |||
expect(modelTab.hasClass("active")).toEqual(false) | |||
|
|||
expect(wrapper.find("div > div").length).toEqual(1) | |||
expect(wrapper.find("div > div").text()).toEqual(props.example) |
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.
No UnitTests?
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.
I like the functionality, but this PR needs tests 😄
@webron, could use your take on the visual changes |
Nice feature! It would be great to have this also on requests. Not sure if it is so complex, but It will be great if instead of showing all possible cases, just place a select control to select one of the possible cases. Best. |
@heldersepu @shockey thx guys, on these weekends I'll try add unit tests |
@PavelStefanov Thanks for the PR and sorry for the delay in reviewing it. I have a few comments, but they are all also related to dealing with the bigger issue at hand. I'll take the discussion back to #3803 to get more interaction from the community at large. |
closing due to inactivity! |
Motivation and Context
Fixes #3803
Description
I added support for oneOf and anyOf attributes for example value tab.
If we have this scheme
So it will look like this
Each subscheme will be rendered with name and in separate highlight block.
I'll be glad to your ideas and comments!
How Has This Been Tested?
I tested different cases of oneOf and anyOf, but I'm not sure I was able to cover all cases.
My PR contains...
src/
is unmodified: changes to documentation, CI, metadata, etc.)package.json
)My changes...
Documentation
Automated tests