You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This must be one of the renderers defined in ``openapi_renderers``.
52
+
53
+
:Type: A string corresponding to the alias of a registered renderer.
54
+
:Default: ``'httpdomain:old'``
55
+
56
+
36
57
Options
37
58
=======
38
59
39
-
The ``openapi`` directive supports the following options:
60
+
The ``openapi`` directive supports different options depending on the renderer in use.
61
+
62
+
Options for the ``httpdomain`` renderer
63
+
---------------------------------------
64
+
65
+
The following options take a value.
66
+
67
+
``encoding``
68
+
Encoding to be used to read an OpenAPI spec. If not passed, Sphinx's source encoding will be used.
69
+
70
+
``markup``
71
+
The format to use when parsing markup.
72
+
73
+
:Type: One of ``commonmark``, ``restructuredtext``
74
+
:Default: ``commonmark``
75
+
76
+
``http-methods-order``
77
+
The preferred order in which to output HTTP methods.
78
+
79
+
:Type: An CSV string of HTTP methods.
80
+
:Default: ``None``
81
+
82
+
``response-examples-for``
83
+
The response codes to render samples for.
84
+
85
+
:Type: A sequence of strings, with each string corresponding to a `HTTP status code <https://spec.openapis.org/oas/v3.1.0#http-status-codes>`__ that response examples should be rendered for.
86
+
:Default: ``["200", "201", "202", "2XX"]``
87
+
88
+
``request-parameters-order``
89
+
The preferred order in which to output parameters.
90
+
91
+
:Type: An ordered sequence of strings, with each string corresponding to a `supported parameter type <https://spec.openapis.org/oas/v3.1.0#fixed-fields-9>`__.
92
+
:Default: ``None``
93
+
94
+
``example-preference``
95
+
The preferred example format to render for requests and responses.
96
+
97
+
:Type: An ordered sequence of strings, with each string corresponding to a `supported media type <https://spec.openapis.org/oas/v3.1.0#media-types>`__.
98
+
:Default: ``None``
99
+
100
+
``request-example-preference``
101
+
The preferred example format to render for requests. This takes precedence over ``example-preference``.
102
+
103
+
:Type: An ordered sequence of strings, with each string corresponding to a `supported media type <https://spec.openapis.org/oas/v3.1.0#media-types>`__.
104
+
:Default: ``None``
105
+
106
+
``response-example-preference``
107
+
The preferred example format to render for responses. This takes precedence over ``example-preference``.
108
+
109
+
:Type: An ordered sequence of strings, with each string corresponding to a `supported media type <https://spec.openapis.org/oas/v3.1.0#media-types>`__.
110
+
:Default: ``None``
111
+
112
+
The following options are boolean flags.
113
+
114
+
``generate-examples-from-schemas``
115
+
116
+
Whether examples should be generated from the schema if they are not provided in the spec. If unset, examples will not be generated.
117
+
118
+
:Type: Flag.
119
+
120
+
``no-json-schema-description``
121
+
122
+
Whether to disable rendering of JSON schema hints.
123
+
124
+
:Type: Flag.
125
+
126
+
Options for the ``httpdomain:old`` renderer
127
+
-------------------------------------------
128
+
129
+
The following options are supported when using the ``httpdomain:old`` renderer:
40
130
41
131
``encoding``
42
132
Encoding to be used to read an OpenAPI spec. If not passed, Sphinx's source encoding will be used.
@@ -123,7 +213,6 @@ When used together, ``exclude`` takes precedence over ``include`` and ``paths``.
123
213
124
214
Would render the ``head`` method, followed by the ``get`` method, followed by the rest of the methods in their declared ordered.
0 commit comments