Skip to content

Commit 95718aa

Browse files
committed
Fix: renderDisplayName
1 parent ddd2d7d commit 95718aa

File tree

2 files changed

+23
-16
lines changed

2 files changed

+23
-16
lines changed

docs/api/schemas.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -122,19 +122,19 @@
122122

123123
### Properties
124124

125-
| Name | Type | Required | Restrictions | Description |
126-
| ---------------------------- | ------ | -------- | ------------ | ----------- |
127-
| `canceled_at` | string | false | none | none |
128-
| `completed_at` | string | false | none | none |
129-
| `created_at` | string | false | none | none |
130-
| `error` | string | false | none | none |
131-
| `file_id` | string | false | none | none |
132-
| `id` | string | false | none | none |
133-
| `started_at` | string | false | none | none |
134-
| `status` | string | false | none | none |
135-
| `tags` | object | false | none | none |
136-
| `» **additionalProperties**` | string | false | none | none |
137-
| `worker_id` | string | false | none | none |
125+
| Name | Type | Required | Restrictions | Description |
126+
| ------------------ | ------ | -------- | ------------ | ----------- |
127+
| `canceled_at` | string | false | none | none |
128+
| `completed_at` | string | false | none | none |
129+
| `created_at` | string | false | none | none |
130+
| `error` | string | false | none | none |
131+
| `file_id` | string | false | none | none |
132+
| `id` | string | false | none | none |
133+
| `started_at` | string | false | none | none |
134+
| `status` | string | false | none | none |
135+
| `tags` | object | false | none | none |
136+
| » `[any property]` | string | false | none | none |
137+
| `worker_id` | string | false | none | none |
138138

139139
## codersdk.PutExtendWorkspaceRequest
140140

@@ -545,13 +545,13 @@
545545
| `directory` | string | false | none | none |
546546
| `disconnected_at` | string | false | none | none |
547547
| `environment_variables` | object | false | none | none |
548-
| `» **additionalProperties**` | string | false | none | none |
548+
| » `[any property]` | string | false | none | none |
549549
| `first_connected_at` | string | false | none | none |
550550
| `id` | string | false | none | none |
551551
| `instance_id` | string | false | none | none |
552552
| `last_connected_at` | string | false | none | none |
553553
| `latency` | object | false | none | DERPLatency is mapped by region name (e.g. "New York City", "Seattle"). |
554-
| `» **additionalProperties**` | [codersdk.DERPRegion](#codersdkderpregion) | false | none | none |
554+
| » `[any property]` | [codersdk.DERPRegion](#codersdkderpregion) | false | none | none |
555555
| `name` | string | false | none | none |
556556
| `operating_system` | string | false | none | none |
557557
| `resource_id` | string | false | none | none |

scripts/apidocgen/markdown-template/main.dot

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,13 @@
1717
}
1818
return renderSinglePropertyType(p);
1919
}
20+
21+
function renderDisplayName(p) {
22+
if (p.displayName == "» **additionalProperties**") {
23+
return "» `[any property]`";
24+
}
25+
return "`" + p.displayName + "`";
26+
}
2027
}}
2128

2229
{{? data.api.components && data.api.components.securitySchemes }}{{#def.security}}{{?}}
@@ -92,7 +99,7 @@
9299

93100
{{? block.rows.length}}|Name|Type|Required|Restrictions|Description|
94101
|---|---|---|---|---|{{?}}
95-
{{~ block.rows :p}}|`{{=p.displayName}}`|{{= renderPropertyType(p)}}|{{=p.required}}|{{=p.restrictions||'none'}}|{{=p.description||'none'}}|
102+
{{~ block.rows :p}}|{{= renderDisplayName(p)}}|{{= renderPropertyType(p)}}|{{=p.required}}|{{=p.restrictions||'none'}}|{{=p.description||'none'}}|
96103
{{~}}
97104
{{~}}
98105
{{? (blocks[0].rows.length === 0) && (blocks.length === 1) }}

0 commit comments

Comments
 (0)