Skip to content

Commit

Permalink
feat: Look up property title by following references (#280)
Browse files Browse the repository at this point in the history
* Look up property title by following references

Closes #278

---------

Co-authored-by: Elvis Stansvik <[email protected]>
Co-authored-by: Denis Blanchette <[email protected]>
  • Loading branch information
3 people authored Nov 29, 2024
1 parent 1cdfa97 commit 57f68d6
Show file tree
Hide file tree
Showing 37 changed files with 574 additions and 354 deletions.
1 change: 1 addition & 0 deletions docs/examples/cases/ref_merge.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
},
"definitions": {
"aProperty": {
"title": "Title from definition",
"default": "Default from definition",
"type": "string",
"enum": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ <h2 class="mb-0">
d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"
/>
</svg>
<a href="#RecursiveArray_items">#</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
<a href="#RecursiveArray_items">Bug</a></div><span class="badge badge-dark value-type">Type: object</span><br/>



Expand Down
8 changes: 4 additions & 4 deletions docs/examples/examples_flat_default/ref_with_tabs.html
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ <h2 class="mb-0">
d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"
/>
</svg>
<a href="#objectA_signature_oneOf_i0_signers_items">signer</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
<a href="#objectA_signature_oneOf_i0_signers_items">Signature</a></div><span class="badge badge-dark value-type">Type: object</span><br/>



Expand Down Expand Up @@ -3758,7 +3758,7 @@ <h2 class="mb-0">
d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"
/>
</svg>
<a href="#objectA_signature_oneOf_i1_chain_items">signer</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
<a href="#objectA_signature_oneOf_i1_chain_items">Signature</a></div><span class="badge badge-dark value-type">Type: object</span><br/>



Expand Down Expand Up @@ -7383,7 +7383,7 @@ <h2 class="mb-0">
d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"
/>
</svg>
<a href="#objectA_signature_oneOf_i0_signers_items">signer</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
<a href="#objectA_signature_oneOf_i0_signers_items">Signature</a></div><span class="badge badge-dark value-type">Type: object</span><br/>



Expand Down Expand Up @@ -10873,7 +10873,7 @@ <h2 class="mb-0">
d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"
/>
</svg>
<a href="#objectA_signature_oneOf_i1_chain_items">signer</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
<a href="#objectA_signature_oneOf_i1_chain_items">Signature</a></div><span class="badge badge-dark value-type">Type: object</span><br/>



Expand Down
4 changes: 2 additions & 2 deletions docs/examples/examples_js_default/recursive_full_schema.html
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ <h2 class="mb-0">
d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"
/>
</svg>
<a href="#RecursiveArray_items" onclick="anchorLink('RecursiveArray_items')">#</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
<a href="#RecursiveArray_items" onclick="anchorLink('RecursiveArray_items')">Bug</a></div><h4>Bug</h4><span class="badge badge-dark value-type">Type: object</span><br/>
<span class="description"><p>Display the issue.</p>
</span><a href="#root" onclick="anchorLink('root')" class="ref-link">Same definition as Bug</a>
</div>
Expand Down Expand Up @@ -258,7 +258,7 @@ <h2 class="mb-0">
d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"
/>
</svg>
<a href="#DecoratedRecursiveArray_items_TheThing" onclick="anchorLink('DecoratedRecursiveArray_items_TheThing')">TheThing</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
<a href="#DecoratedRecursiveArray_items_TheThing" onclick="anchorLink('DecoratedRecursiveArray_items_TheThing')">TheThing</a></div><h4>Bug</h4><span class="badge badge-dark value-type">Type: object</span><br/>
<span class="description"><p>Display the issue.</p>
</span><a href="#root" onclick="anchorLink('root')" class="ref-link">Same definition as Bug</a>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h2 class="mb-0">
d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"
/>
</svg>
<a href="#itself" onclick="anchorLink('itself')">itself</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
<a href="#itself" onclick="anchorLink('itself')">itself</a></div><h4>Person</h4><span class="badge badge-dark value-type">Type: object</span><br/>
<a href="#root" onclick="anchorLink('root')" class="ref-link">Same definition as Person</a>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion docs/examples/examples_js_default/ref_merge.html
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ <h2 class="mb-0">
d="M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z"
/>
</svg>
<a href="#aProperty" onclick="anchorLink('aProperty')">aProperty</a></div><span class="badge badge-dark value-type">Type: enum (of string)</span> <span class="badge badge-success default-value">Default: "Default from property"</span><br/>
<a href="#aProperty" onclick="anchorLink('aProperty')">aProperty</a></div><h4>Title from definition</h4><span class="badge badge-dark value-type">Type: enum (of string)</span> <span class="badge badge-success default-value">Default: "Default from property"</span><br/>
<span class="description"><p>This is the description from the definition</p>
</span>

Expand Down
Loading

0 comments on commit 57f68d6

Please sign in to comment.