Browse Source

Remove outdated `SwaggerUIBundle.SwaggerUIStandalonePreset` from `presets`

pull/14762/head
Yurii Motov 4 months ago
parent
commit
02d8c6e258
  1. 3
      docs/en/docs/how-to/configure-swagger-ui.md
  2. 1
      fastapi/openapi/docs.py
  3. 3
      tests/test_tutorial/test_configure_swagger_ui/test_tutorial001.py
  4. 3
      tests/test_tutorial/test_configure_swagger_ui/test_tutorial002.py
  5. 3
      tests/test_tutorial/test_configure_swagger_ui/test_tutorial003.py

3
docs/en/docs/how-to/configure-swagger-ui.md

@ -60,8 +60,7 @@ FastAPI also includes these JavaScript-only `presets` settings:
```JavaScript
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIBundle.SwaggerUIStandalonePreset
SwaggerUIBundle.presets.apis
]
```

1
fastapi/openapi/docs.py

@ -141,7 +141,6 @@ def get_swagger_ui_html(
html += """
presets: [
SwaggerUIBundle.presets.apis,
SwaggerUIBundle.SwaggerUIStandalonePreset
],
})"""

3
tests/test_tutorial/test_configure_swagger_ui/test_tutorial001.py

@ -18,9 +18,6 @@ def test_swagger_ui():
assert "SwaggerUIBundle.presets.apis," in response.text, (
"default configs should be preserved"
)
assert "SwaggerUIBundle.SwaggerUIStandalonePreset" in response.text, (
"default configs should be preserved"
)
assert '"layout": "BaseLayout",' in response.text, (
"default configs should be preserved"
)

3
tests/test_tutorial/test_configure_swagger_ui/test_tutorial002.py

@ -21,9 +21,6 @@ def test_swagger_ui():
assert "SwaggerUIBundle.presets.apis," in response.text, (
"default configs should be preserved"
)
assert "SwaggerUIBundle.SwaggerUIStandalonePreset" in response.text, (
"default configs should be preserved"
)
assert '"layout": "BaseLayout",' in response.text, (
"default configs should be preserved"
)

3
tests/test_tutorial/test_configure_swagger_ui/test_tutorial003.py

@ -24,9 +24,6 @@ def test_swagger_ui():
assert "SwaggerUIBundle.presets.apis," in response.text, (
"default configs should be preserved"
)
assert "SwaggerUIBundle.SwaggerUIStandalonePreset" in response.text, (
"default configs should be preserved"
)
assert '"layout": "BaseLayout",' in response.text, (
"default configs should be preserved"
)

Loading…
Cancel
Save