Closed foxxyz closed 8 years ago
@jlblcc let me know if you have any suggestions/changes for acceptance! Thanks!
Sorry, meant to get back to you on this. I'm not opposed to merging this, but can't merge this in as is. The code fails the jshint validation. Specifically, the The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype. Line 772
.
Note: I added a basic TravisCI config that runs jshint - that should auto-check any pull requests from now on.
Ah, my fault entirely. Should have checked jshint before submitting the request.
I've made the change to pass the validation, although if you look at the change it makes the code a bit more redundant than it needs to be.
Regardless, thanks for the feedback and let me know if there's anything else that concerns you!
@jlblcc Please let me know if there's anything I can do to speed up adoption of this PR! Thanks!
Appreciate it, thanks for the awesome code @jlblcc
Thanks for the reminder and the contributions.
When displaying sub-schemas specified within a combination block, the allOf/anyOf/oneOf keyword is currently repeated if the sub-schema does not have a "title" set. This change proposes using the type as a fallback instead of repeating the keyword. This makes way more sense for a schemas such as:
The main change here is
s.title || all[key][i].type
(from:s.title || key
), the rest are nesting simplifications for readability.