-
Notifications
You must be signed in to change notification settings - Fork 45
feat: render deprecated next to general validations #64
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
lottamus
left a comment
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.
Looks good! One suggestion to make the "deprecated" text orange. And another to safe stringify the object validation
| } else if (typeof validation === 'object') { | ||
| elem = ( | ||
| <div className="m-1 px-1 bg-gray-2 dark:bg-gray-8 font-bold text-sm rounded" key={index}> | ||
| {'{...}'} |
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.
Why don't we stringify the validation here too so we can display the properties? Similar to what were doing on L53
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 think the reason we did it in the first place is that the object might be large and therefore the text produced wouldn't be readable.
| } else { | ||
| elem = ( | ||
| <div className="m-1 px-1 bg-gray-2 dark:bg-gray-8 font-bold text-sm rounded" key={index}> | ||
| {JSON.stringify(validation)} |
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.
Should we safe stringify here?
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.
Co-Authored-By: Chris Lott <chrisnlott@gmail.com>
|
🎉 This PR is included in version 2.12.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |




Addresses https://github.com/stoplightio/platform-internal/issues/736

Before:
After:
