Support rendering schema definitions in the spec
parent
bc3e45d642
commit
ea307b5bdb
@ -0,0 +1,21 @@
|
||||
{% import 'tables.tmpl' as tables -%}
|
||||
|
||||
``{{definition.title}}`` Schema
|
||||
{{(11 + definition.title | length) * title_kind}}
|
||||
|
||||
{% if 'description' in definition %}
|
||||
{{definition.description}}
|
||||
{% endif %}
|
||||
|
||||
{% for table in definition.tables -%}
|
||||
{{"``"+table.title+"``" if table.title else "" }}
|
||||
{{ tables.paramtable(table.rows) }}
|
||||
{% endfor %}
|
||||
|
||||
Example{% if examples | length > 1 %}s{% endif %}:
|
||||
|
||||
{% for example in examples %}
|
||||
.. code:: json
|
||||
|
||||
{{example | jsonify(4, 4)}}
|
||||
{% endfor %}
|
Loading…
Reference in New Issue