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
Copy file name to clipboardExpand all lines: docs/Usage/Configuration.md
+68-4Lines changed: 68 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,12 @@
1
1
Flask supports many [configurations](https://flask.palletsprojects.com/en/latest/config/), and there are also some
2
2
configurations in this library that can be used.
3
3
4
+
## SWAGGER_HTML_STRING
5
+
6
+
You can customize the custom behavior of this template.
7
+
8
+
[The default `SWAGGER_HTML_STRING` is here](https://github.com/luolingchun/flask-openapi3-plugins/blob/master/flask-openapi3-swagger/flask_openapi3_swagger/templates/__init__.py).
9
+
4
10
## SWAGGER_CONFIG
5
11
6
12
You can change the default behavior of the Swagger UI.
[More configuration options for Swagger UI](https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/oauth2.md).
40
+
41
+
## SCALAR_HTML_STRING
42
+
43
+
You can customize the custom behavior of this template.
44
+
45
+
[The default `SCALAR_HTML_STRING` is here](https://github.com/luolingchun/flask-openapi3-plugins/blob/master/flask-openapi3-scalar/flask_openapi3_scalar/templates/__init__.py).
46
+
47
+
## SCALAR_CONFIG
48
+
49
+
You can change the default behavior of the Scalar UI.
50
+
51
+
[More configuration options for Swagger UI](https://github.com/scalar/scalar/blob/main/documentation/configuration.md).
52
+
53
+
## REDOC_HTML_STRING
54
+
You can customize the custom behavior of this template.
55
+
56
+
[The default `REDOC_HTML_STRING` is here](https://github.com/luolingchun/flask-openapi3-plugins/blob/master/flask-openapi3-redoc/flask_openapi3_redoc/templates/__init__.py).
57
+
58
+
## REDOC_CONFIG
59
+
60
+
You can change the default behavior of the Redoc UI.
61
+
62
+
[More configuration options for Redoc UI](https://github.com/Redocly/redoc/blob/main/docs/config.md).
63
+
64
+
## RAPIDOC_HTML_STRING
65
+
66
+
You can customize the custom behavior of this template.
67
+
68
+
[The default `RAPIDOC_HTML_STRING` is here](https://github.com/luolingchun/flask-openapi3-plugins/blob/master/flask-openapi3-rapidoc/flask_openapi3_rapidoc/templates/__init__.py).
69
+
70
+
## RAPIDOC_CONFIG
71
+
72
+
You can change the default behavior of the Rapidoc UI.
73
+
74
+
[More configuration options for Rapidoc UI](https://rapidocweb.com/examples.html).
75
+
76
+
## RAPIPDF_HTML_STRING
77
+
78
+
You can customize the custom behavior of this template.
79
+
80
+
[The default `RAPIPDF_HTML_STRING` is here](https://github.com/luolingchun/flask-openapi3-plugins/blob/master/flask-openapi3-rapipdf/flask_openapi3_rapipdf/templates/__init__.py).
81
+
82
+
## RAPIPDF_CONFIG
83
+
84
+
You can change the default behavior of the Rapipdf UI.
85
+
86
+
[More configuration options for Rapipdf UI](https://mrin9.github.io/RapiPdf/).
87
+
88
+
## ELEMENTS_HTML_STRING
89
+
90
+
You can customize the custom behavior of this template.
91
+
92
+
[The default `ELEMENTS_HTML_STRING` is here](https://github.com/luolingchun/flask-openapi3-plugins/blob/master/flask-openapi3-elements/flask_openapi3_elements/templates/__init__.py).
93
+
94
+
95
+
## ELEMENTS_CONFIG
96
+
97
+
You can change the default behavior of the Elements UI.
98
+
99
+
[More configuration options for Rapipdf UI](https://github.com/stoplightio/elements/blob/main/docs/getting-started/elements/elements-options.md).
Here's more information about [OAuth 2.0 configuration](https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/oauth2.md)
202
-
203
140
## responses
204
141
205
142
You can add `responses` for each API under the `app` wrapper.
@@ -267,87 +204,6 @@ def get_book():
267
204
...
268
205
```
269
206
270
-
## doc_expansion
271
-
272
-
!!! Deprecated-Warning warning
273
-
274
-
The `doc_expansion` is deprecated in v4.x, use `app.config['SWAGGER_CONFIG']` instead.
275
-
276
-
```python
277
-
from flask_openapi3 import OpenAPI
278
-
279
-
app = OpenAPI(__name__)
280
-
281
-
app.config["SWAGGER_CONFIG"] = {
282
-
"docExpansion": "none",
283
-
"validatorUrl": "https://www.b.com"
284
-
}
285
-
```
286
-
287
-
Just for Swagger UI.
288
-
289
-
String=["list", "full", "none"].
290
-
291
-
Controls the default expansion setting for the operations and tags. It can be 'list' (expands only the tags), full' (expands the tags and operations) or 'none' (expands nothing).
292
-
293
-
More information to see [Configuration](https://github.com/swagger-api/swagger-ui/blob/master/docs/usage/configuration.md).
The following are the default values of these configurations. Of course, you can change them:
344
-
345
-
- doc_prefix = "/openapi"
346
-
- api_doc_url = "/openapi.json"
347
-
- swagger_url= "/swagger"
348
-
- redoc_url = "/redoc"
349
-
- rapidoc_url = "/rapidoc"
350
-
351
207
## servers
352
208
353
209
An array of Server Objects, which provide connectivity information to a target server. If the server's property is not provided, or is an empty array, the default value would be a Server Object with an url value of /.
0 commit comments