Skip to content

Commit 57f68d6

Browse files
estanElvis Stansvikdblanchette
authored
feat: Look up property title by following references (#280)
* Look up property title by following references Closes #278 --------- Co-authored-by: Elvis Stansvik <elvis.stansvik@avtech.aero> Co-authored-by: Denis Blanchette <dblanchette@coveo.com>
1 parent 1cdfa97 commit 57f68d6

37 files changed

+574
-354
lines changed

docs/examples/cases/ref_merge.json

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
},
2222
"definitions": {
2323
"aProperty": {
24+
"title": "Title from definition",
2425
"default": "Default from definition",
2526
"type": "string",
2627
"enum": [

docs/examples/examples_flat_default/recursive_full_schema.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ <h2 class="mb-0">
125125
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"
126126
/>
127127
</svg>
128-
<a href="#RecursiveArray_items">#</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
128+
<a href="#RecursiveArray_items">Bug</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
129129

130130

131131

docs/examples/examples_flat_default/ref_with_tabs.html

+4-4
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ <h2 class="mb-0">
268268
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"
269269
/>
270270
</svg>
271-
<a href="#objectA_signature_oneOf_i0_signers_items">signer</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
271+
<a href="#objectA_signature_oneOf_i0_signers_items">Signature</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
272272

273273

274274

@@ -3758,7 +3758,7 @@ <h2 class="mb-0">
37583758
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"
37593759
/>
37603760
</svg>
3761-
<a href="#objectA_signature_oneOf_i1_chain_items">signer</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
3761+
<a href="#objectA_signature_oneOf_i1_chain_items">Signature</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
37623762

37633763

37643764

@@ -7383,7 +7383,7 @@ <h2 class="mb-0">
73837383
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"
73847384
/>
73857385
</svg>
7386-
<a href="#objectA_signature_oneOf_i0_signers_items">signer</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
7386+
<a href="#objectA_signature_oneOf_i0_signers_items">Signature</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
73877387

73887388

73897389

@@ -10873,7 +10873,7 @@ <h2 class="mb-0">
1087310873
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"
1087410874
/>
1087510875
</svg>
10876-
<a href="#objectA_signature_oneOf_i1_chain_items">signer</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
10876+
<a href="#objectA_signature_oneOf_i1_chain_items">Signature</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
1087710877

1087810878

1087910879

docs/examples/examples_js_default/recursive_full_schema.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ <h2 class="mb-0">
111111
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"
112112
/>
113113
</svg>
114-
<a href="#RecursiveArray_items" onclick="anchorLink('RecursiveArray_items')">#</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
114+
<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/>
115115
<span class="description"><p>Display the issue.</p>
116116
</span><a href="#root" onclick="anchorLink('root')" class="ref-link">Same definition as Bug</a>
117117
</div>
@@ -258,7 +258,7 @@ <h2 class="mb-0">
258258
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"
259259
/>
260260
</svg>
261-
<a href="#DecoratedRecursiveArray_items_TheThing" onclick="anchorLink('DecoratedRecursiveArray_items_TheThing')">TheThing</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
261+
<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/>
262262
<span class="description"><p>Display the issue.</p>
263263
</span><a href="#root" onclick="anchorLink('root')" class="ref-link">Same definition as Bug</a>
264264
</div>

docs/examples/examples_js_default/recursive_full_schema_simple.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h2 class="mb-0">
4949
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"
5050
/>
5151
</svg>
52-
<a href="#itself" onclick="anchorLink('itself')">itself</a></div><span class="badge badge-dark value-type">Type: object</span><br/>
52+
<a href="#itself" onclick="anchorLink('itself')">itself</a></div><h4>Person</h4><span class="badge badge-dark value-type">Type: object</span><br/>
5353
<a href="#root" onclick="anchorLink('root')" class="ref-link">Same definition as Person</a>
5454
</div>
5555
</div>

docs/examples/examples_js_default/ref_merge.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ <h2 class="mb-0">
4949
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"
5050
/>
5151
</svg>
52-
<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/>
52+
<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/>
5353
<span class="description"><p>This is the description from the definition</p>
5454
</span>
5555

0 commit comments

Comments
 (0)