Skip to content

Commit 8fc97b7

Browse files
chronodblanchette
andauthored
fix markdown rendering of the property table issue (coveooss#176)
* fix markdown rendering of the property table the js/flat renderer check for the node being a ref, do something similar in the markdown renderer while also keeping "defined in" working as is. ref for flat renderer: https://github.com/coveooss/json-schema-for-humans/blob/9ced1e2a71eea858e1b9c49273828dfc2ffebeaf/json_schema_for_humans/templates/flat/content.html#L37-L38 * black Co-authored-by: Denis Blanchette <[email protected]>
1 parent 2278765 commit 8fc97b7

21 files changed

+166
-161
lines changed

docs/examples/examples_md_default/description_with_ref.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@
1717

1818
## <a name="outer"></a>1. Property `root > outer`
1919

20-
| | |
21-
| ------------------------- | ------------------------------------------------------------------------- |
22-
| **Type** | `object` |
23-
| **Required** | Yes |
24-
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
25-
| **Defined in** | #/definitions/inner schema |
20+
| | |
21+
| ------------------------- | ------------------------------------------------------- |
22+
| **Type** | `object` |
23+
| **Required** | Yes |
24+
| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") |
25+
| **Defined in** | #/definitions/inner schema |
2626

2727
**Description:** We should see this
2828

@@ -41,12 +41,12 @@
4141

4242
## <a name="outer2"></a>2. Property `root > outer2`
4343

44-
| | |
45-
| ------------------------- | ------------------------------------------------------------------------- |
46-
| **Type** | `object` |
47-
| **Required** | No |
48-
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
49-
| **Same definition as** | [outer](#outer) |
44+
| | |
45+
| ------------------------- | ------------------------------------------------------- |
46+
| **Type** | `object` |
47+
| **Required** | No |
48+
| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") |
49+
| **Same definition as** | [outer](#outer) |
5050

5151
**Description:** We should see this too
5252

docs/examples/examples_md_default/ref_with_tabs.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868

6969
| | |
7070
| ------------------------- | ------------------------------------------------------------------------- |
71-
| **Type** | `object` |
71+
| **Type** | `combining` |
7272
| **Required** | No |
7373
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
7474
| **Defined in** | #/definitions/signature |
@@ -116,12 +116,12 @@
116116

117117
##### <a name="autogenerated_heading_2"></a>1.1.1.1.1. root > objectA > signature > oneOf > item 0 > signers > signer
118118

119-
| | |
120-
| ------------------------- | ------------------------------------------------------------------------- |
121-
| **Type** | `object` |
122-
| **Required** | No |
123-
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
124-
| **Defined in** | #/definitions/signer |
119+
| | |
120+
| ------------------------- | ------------------------------------------------------- |
121+
| **Type** | `object` |
122+
| **Required** | No |
123+
| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") |
124+
| **Defined in** | #/definitions/signer |
125125

126126
| Property | Pattern | Type | Deprecated | Definition | Title/Description |
127127
| ------------------------------------------------------------------------------- | ------- | --------------- | ---------- | -------------------------- | ----------------- |
@@ -201,7 +201,7 @@ Must be one of:
201201

202202
| | |
203203
| ------------------------- | ------------------------------------------------------------------------- |
204-
| **Type** | `object` |
204+
| **Type** | `combining` |
205205
| **Required** | No |
206206
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
207207
| **Defined in** | #/definitions/publicKey |
@@ -525,23 +525,23 @@ Must be one of:
525525

526526
##### <a name="autogenerated_heading_8"></a>1.1.2.1.1. root > objectA > signature > oneOf > item 1 > chain > signer
527527

528-
| | |
529-
| ------------------------- | ------------------------------------------------------------------------- |
530-
| **Type** | `object` |
531-
| **Required** | No |
532-
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
533-
| **Same definition as** | [Signature](#objectA_signature_oneOf_i0_signers_items) |
528+
| | |
529+
| ------------------------- | ------------------------------------------------------- |
530+
| **Type** | `object` |
531+
| **Required** | No |
532+
| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") |
533+
| **Same definition as** | [Signature](#objectA_signature_oneOf_i0_signers_items) |
534534

535535
#### <a name="objectA_signature_oneOf_i2"></a>1.1.3. Property `root > objectA > signature > oneOf > Signature`
536536

537537
**Title:** Signature
538538

539-
| | |
540-
| ------------------------- | ------------------------------------------------------------------------- |
541-
| **Type** | `object` |
542-
| **Required** | No |
543-
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
544-
| **Same definition as** | [Signature](#objectA_signature_oneOf_i0_signers_items) |
539+
| | |
540+
| ------------------------- | ------------------------------------------------------- |
541+
| **Type** | `object` |
542+
| **Required** | No |
543+
| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") |
544+
| **Same definition as** | [Signature](#objectA_signature_oneOf_i0_signers_items) |
545545

546546
**Description:** Unique top level property for simple signatures. (signaturecore)
547547

@@ -563,7 +563,7 @@ Must be one of:
563563

564564
| | |
565565
| ------------------------- | ------------------------------------------------------------------------- |
566-
| **Type** | `object` |
566+
| **Type** | `combining` |
567567
| **Required** | No |
568568
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
569569
| **Same definition as** | [signature](#objectA_signature) |

docs/examples/examples_md_default/references.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@
6666

6767
## <a name="anchor_with_slash"></a>3. Property `root > anchor_with_slash`
6868

69-
| | |
70-
| ------------------------- | ------------------------------------------------------------------------- |
71-
| **Type** | `object` |
72-
| **Required** | No |
73-
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
74-
| **Defined in** | #/definitions/object_def |
69+
| | |
70+
| ------------------------- | ------------------------------------------------------- |
71+
| **Type** | `object` |
72+
| **Required** | No |
73+
| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") |
74+
| **Defined in** | #/definitions/object_def |
7575

7676
| Property | Pattern | Type | Deprecated | Definition | Title/Description |
7777
| -------------------------------------------- | ------- | ------ | ---------- | ---------- | ------------------------------------------ |
@@ -135,12 +135,12 @@
135135

136136
## <a name="same_file_anchor_no_slash"></a>7. Property `root > same_file_anchor_no_slash`
137137

138-
| | |
139-
| ------------------------- | ------------------------------------------------------------------------- |
140-
| **Type** | `object` |
141-
| **Required** | No |
142-
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
143-
| **Same definition as** | [anchor_with_slash](#anchor_with_slash) |
138+
| | |
139+
| ------------------------- | ------------------------------------------------------- |
140+
| **Type** | `object` |
141+
| **Required** | No |
142+
| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") |
143+
| **Same definition as** | [anchor_with_slash](#anchor_with_slash) |
144144

145145
## <a name="same_file_nested_reference"></a>8. Property `root > same_file_nested_reference`
146146

docs/examples/examples_md_default/references_url_two_levels.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
| ------------------------- | -------------------------------------------------------------------------------------------------------------------- |
2323
| **Type** | `object` |
2424
| **Required** | No |
25-
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
25+
| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") |
2626
| **Defined in** | https://raw.githubusercontent.com/coveooss/json-schema-for-humans/main/docs/examples/cases/description_from_ref.json |
2727

2828
| Property | Pattern | Type | Deprecated | Definition | Title/Description |

docs/examples/examples_md_default/with_descriptions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@
7878

7979
| | |
8080
| ------------------------- | ------------------------------------------------------------------------- |
81-
| **Type** | `object` |
81+
| **Type** | `combining` |
8282
| **Required** | No |
8383
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
8484
| **Defined in** | #/definitions/delivery_info |

docs/examples/examples_md_nested_default/description_with_ref.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616
</summary>
1717
<blockquote>
1818

19-
| | |
20-
| ------------------------- | ------------------------------------------------------------------------- |
21-
| **Type** | `object` |
22-
| **Required** | Yes |
23-
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
24-
| **Defined in** | #/definitions/inner schema |
19+
| | |
20+
| ------------------------- | ------------------------------------------------------- |
21+
| **Type** | `object` |
22+
| **Required** | Yes |
23+
| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") |
24+
| **Defined in** | #/definitions/inner schema |
2525

2626
**Description:** We should see this
2727

@@ -50,12 +50,12 @@
5050
</summary>
5151
<blockquote>
5252

53-
| | |
54-
| ------------------------- | ------------------------------------------------------------------------- |
55-
| **Type** | `object` |
56-
| **Required** | No |
57-
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
58-
| **Same definition as** | [outer](#outer) |
53+
| | |
54+
| ------------------------- | ------------------------------------------------------- |
55+
| **Type** | `object` |
56+
| **Required** | No |
57+
| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") |
58+
| **Same definition as** | [outer](#outer) |
5959

6060
**Description:** We should see this too
6161

docs/examples/examples_md_nested_default/ref_with_tabs.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838

3939
| | |
4040
| ------------------------- | ------------------------------------------------------------------------- |
41-
| **Type** | `object` |
41+
| **Type** | `combining` |
4242
| **Required** | No |
4343
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
4444
| **Defined in** | #/definitions/signature |
@@ -131,12 +131,12 @@
131131

132132
**Title:** Signature
133133

134-
| | |
135-
| ------------------------- | ------------------------------------------------------------------------- |
136-
| **Type** | `object` |
137-
| **Required** | No |
138-
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
139-
| **Same definition as** | [Signature](#objectA_signature_oneOf_i0_signers_items) |
134+
| | |
135+
| ------------------------- | ------------------------------------------------------- |
136+
| **Type** | `object` |
137+
| **Required** | No |
138+
| **Additional properties** | [[Not allowed]](# "Additional Properties not allowed.") |
139+
| **Same definition as** | [Signature](#objectA_signature_oneOf_i0_signers_items) |
140140

141141
**Description:** Unique top level property for simple signatures. (signaturecore)
142142

@@ -172,7 +172,7 @@
172172

173173
| | |
174174
| ------------------------- | ------------------------------------------------------------------------- |
175-
| **Type** | `object` |
175+
| **Type** | `combining` |
176176
| **Required** | No |
177177
| **Additional properties** | [[Any type: allowed]](# "Additional Properties of any type are allowed.") |
178178
| **Same definition as** | [signature](#objectA_signature) |

0 commit comments

Comments
 (0)