Move prev_content to unsigned (#3524)

This commit is contained in:
Richard van der Hoff 2021-12-02 17:22:58 +00:00 committed by GitHub
parent 1e12b45f97
commit 7f200c53e8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 48 additions and 9 deletions

View file

@ -0,0 +1,14 @@
{{/*
Renders the "Changed in [version]:" blocks for x-changedInMatrixVersion
annotations for openapi parameters
Takes a single 'changes_dict' parameter, which should be a map of
version -> details pairs.
*/ -}}
{{ range $ver, $details := .changes_dict -}}
<br><br>
<strong>
Changed in <code>v{{ $ver }}</code>:
</strong>
{{ $details | markdownify }}
{{ end }}

View file

@ -28,6 +28,9 @@
{{ if (index $event_data "x-addedInMatrixVersion") }}
{{ partial "added-in" (dict "v" (index $event_data "x-addedInMatrixVersion")) }}
{{ end }}
{{ if (index $event_data "x-changedInMatrixVersion") }}
{{ partial "changed-in" (dict "changes_dict" (index $event_data "x-changedInMatrixVersion")) }}
{{ end -}}
{{ $event_data.description | markdownify }}

View file

@ -82,7 +82,13 @@
<tr>
<td><code>{{ $property_name }}</code></td>
<td><code>{{ $type }}</code></td>
<td>{{ if $required }}<strong>Required: </strong>{{end}}{{ $property.description | markdownify }}{{ if eq $type "enum"}}<p>One of: <code>{{ $property.enum }}</code>.</p>{{ end }}{{ if (index $property "x-addedInMatrixVersion") }}{{ partial "added-in" (dict "v" (index $property "x-addedInMatrixVersion")) }}{{ end }}</td>
<td>
{{ if $required }}<strong>Required: </strong>{{end -}}
{{ $property.description | markdownify -}}
{{ if eq $type "enum"}}<p>One of: <code>{{ $property.enum }}</code>.</p>{{ end -}}
{{ if (index $property "x-addedInMatrixVersion") }}{{ partial "added-in" (dict "v" (index $property "x-addedInMatrixVersion")) }}{{ end -}}
{{ if (index $property "x-changedInMatrixVersion") }}{{ partial "changed-in" (dict "changes_dict" (index $property "x-changedInMatrixVersion")) }}{{ end -}}
</td>
</tr>
{{ end }}

View file

@ -42,6 +42,9 @@
{{ if (index $operation_data "x-addedInMatrixVersion") }}
{{ partial "added-in" (dict "v" (index $operation_data "x-addedInMatrixVersion")) }}
{{ end }}
{{ if (index $operation_data "x-changedInMatrixVersion") }}
{{ partial "changed-in" (dict "changes_dict" (index $operation_data "x-changedInMatrixVersion")) }}
{{ end -}}
<p>{{ $operation_data.description | markdownify }}</p>