Start annotating which version of the spec added a thing (#3425)
* Introduce a new "added-in" template and use it on endpoints * Use "added-in" on schema properties too * Annotate sections of the spec with their added versions * Demo of "added-in" on a room version (to be fleshed out) * Use clearer versioning semantics * Update and fix validator for Swagger custom properties * Fix docs
This commit is contained in:
parent
649fc2bdd2
commit
5be0df02c5
32 changed files with 380 additions and 22 deletions
|
@ -82,7 +82,7 @@
|
|||
<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 }}</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>
|
||||
</tr>
|
||||
|
||||
{{ end }}
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
{{ partial "alert" (dict "type" "warning" "omit_title" "true" "content" "This API is deprecated and will be removed from a future release.") }}
|
||||
{{ end }}
|
||||
|
||||
{{ if (index $operation_data "x-addedInMatrixVersion") }}
|
||||
{{ partial "added-in" (dict "v" (index $operation_data "x-addedInMatrixVersion")) }}
|
||||
{{ end }}
|
||||
|
||||
<p>{{ $operation_data.description | markdownify }}</p>
|
||||
|
||||
</summary>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue