-
Notifications
You must be signed in to change notification settings - Fork 16
Issue-19: handling refs as in displaying them as it is and giving the… #22
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
base: master
Are you sure you want to change the base?
Conversation
…m an href just in case
I usually recommend resolving refs before passing it to this directive. |
Can do that although IMHO refs are integral part of jsonschema so whats the harm in displaying them? |
Per JSON Schema spec, refs are not part of json schema. I appreciate your work and am interested in merging this. |
What you talking about. Its there in the spec. http://json-schema.org/latest/json-schema-core.html#rfc.section.8 They are heavily used too (atleast in the Swagger specs). We can make it an optional feature to show them. That works for my needs but I personally think they should be handled out of the box. |
@mohsen1 still not convinced about having it handle refs by default? I will make it optional if thats what you want. |
Okay. Made it optional. Pls check and release it. My product depend on this |
const el = view.render(); | ||
const code = el.querySelector('.inner.oneOf').innerHTML; | ||
expect(code.indexOf('<a class="title">Ref </a>')).not.to.equal(-1); | ||
expect(code.indexOf('<a class="type" href="http://foo.bar/additionalBloodTypes">http://foo.bar/additionalBloodTypes</a>')).not.to.equal(-1); |
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 this is passing without passing showRef
option?
+1 I'll merge once the test is fixed. |
Handling $ref's will be very useful. Is there an intent to proceed with this PR ay time soon? |
I don't have time maintaining this. My suggestion is to resolve refs using |
@mohsen1, thank you for suggestion! |
PR in regard to #19