mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-27 11:28:38 +01:00
Address review comments
This commit is contained in:
parent
2d3d317923
commit
b7d2462b02
|
|
@ -1,4 +1,23 @@
|
|||
{{/* Minimal list of API endpoints for the current page. */}}
|
||||
{{/*
|
||||
|
||||
Renders a list of API endpoints for the current page, given:
|
||||
|
||||
The outer page's Scratch must contain an "api_endpoints" key, which is either
|
||||
a slice of maps (a list of endpoint metadata dicts) or a map of module name ->
|
||||
slice of endpoint metadata dicts (representing the API modules and the
|
||||
endpoints they each contain). Each slice item must contain the Each endpoint
|
||||
dict must contain the following keys:
|
||||
|
||||
* `anchor`: the HTML anchor for the endpoint
|
||||
* `method`: the HTTP method
|
||||
* `endpoint`: the endpoint path
|
||||
* `summary`: a short summary of the endpoint
|
||||
* `deprecated`: whether the endpoint is deprecated
|
||||
* `module`: the CS API module name, if any, for grouping purposes. If empty,
|
||||
the endpoint is considered "base" or "required".
|
||||
|
||||
*/}}
|
||||
|
||||
{{ $raw := .Scratch.Get "api_endpoints" }}
|
||||
{{/* Normalize to a slice */}}
|
||||
{{ $endpoints := slice }}
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
We use this single template to render the all API spec pages *except* the
|
||||
Client-Server API. The Client-Server API spec page contains modules, and thus
|
||||
is handled separately.
|
||||
is handled separately, via the `layouts/docs/list.html` template.
|
||||
|
||||
The contents of the "main" block below are inserted into the `./baseof.html`
|
||||
base template.
|
||||
|
|
@ -16,4 +16,4 @@
|
|||
*/}}
|
||||
{{ define "main" }}
|
||||
{{ partial "spec-content.html" . }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
|
|
|
|||
Loading…
Reference in a new issue