Turn on code highlighting for HTTP api responses and add a
code highlighting stylesheet for the specification.
This commit is contained in:
parent
d2e39095fe
commit
6b5b8432b3
3 changed files with 10 additions and 2 deletions
6
scripts/codehighlight.css
Normal file
6
scripts/codehighlight.css
Normal file
|
@ -0,0 +1,6 @@
|
|||
pre.code .comment, code .comment { color: green }
|
||||
pre.code .keyword, code .keyword { color: darkred; font-weight: bold }
|
||||
pre.code .name.builtin, code .name.builtin { color: darkred; font-weight: bold }
|
||||
pre.code .literal.number, code .literal.number { color: blue }
|
||||
pre.code .name.tag, code .name.tag { color: darkgreen }
|
||||
pre.code .literal.string, code .literal.string { color: darkblue }
|
|
@ -12,7 +12,7 @@ import sys
|
|||
os.chdir(os.path.dirname(os.path.abspath(__file__)))
|
||||
|
||||
stylesheets = {
|
||||
"stylesheet_path": ["basic.css", "nature.css"]
|
||||
"stylesheet_path": ["basic.css", "nature.css", "codehighlight.css"]
|
||||
}
|
||||
|
||||
title_style_matchers = {
|
||||
|
|
|
@ -62,7 +62,9 @@ Response{{"s" if endpoint.example.responses|length > 1 else "" }}:
|
|||
|
||||
{{res["description"]}}
|
||||
|
||||
Example::
|
||||
Example
|
||||
|
||||
.. code:: json
|
||||
|
||||
{{res["example"] | indent_block(2)}}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue