Browse Source

Update ReDoc to 2.4.0

I decided to update the PR to use the latest released 2.4.0 version of ReDoc since we've not heard anything back yet. I also noticed there were some new translations added, so updated the texts in them as well (fortunately only code stuff was needed, as I don't know all those languages).

A bit of a question of course if we should use `[email protected]` or just `redoc@2`. If you feel like using the `@2` instead, feel free to update or request me to update.
pull/9700/head
Joakim Nordling 1 month ago
parent
commit
d8f03e2c0a
  1. 2
      docs/de/docs/how-to/custom-docs-ui-assets.md
  2. 2
      docs/en/docs/how-to/custom-docs-ui-assets.md
  3. 12
      docs/es/docs/how-to/custom-docs-ui-assets.md
  4. 12
      docs/pt/docs/how-to/custom-docs-ui-assets.md
  5. 2
      docs_src/custom_docs_ui/tutorial001.py
  6. 2
      fastapi/openapi/docs.py

2
docs/de/docs/how-to/custom-docs-ui-assets.md

@ -98,7 +98,7 @@ Sie können wahrscheinlich mit der rechten Maustaste auf jeden Link klicken und
Und **ReDoc** verwendet diese Datei:
* <a href="https://cdn.jsdelivr.net/npm/redoc@2.0.0/bundles/redoc.standalone.js" class="external-link" target="_blank">`redoc.standalone.js`</a>
* <a href="https://cdn.jsdelivr.net/npm/redoc@2.4.0/bundles/redoc.standalone.js" class="external-link" target="_blank">`redoc.standalone.js`</a>
Danach könnte Ihre Dateistruktur wie folgt aussehen:

2
docs/en/docs/how-to/custom-docs-ui-assets.md

@ -98,7 +98,7 @@ You can probably right-click each link and select an option similar to `Save lin
And **ReDoc** uses the file:
* <a href="https://cdn.jsdelivr.net/npm/redoc@2.0.0/bundles/redoc.standalone.js" class="external-link" target="_blank">`redoc.standalone.js`</a>
* <a href="https://cdn.jsdelivr.net/npm/redoc@2.4.0/bundles/redoc.standalone.js" class="external-link" target="_blank">`redoc.standalone.js`</a>
After that, your file structure could look like:

12
docs/es/docs/how-to/custom-docs-ui-assets.md

@ -98,7 +98,7 @@ Probablemente puedas hacer clic derecho en cada enlace y seleccionar una opción
Y **ReDoc** utiliza el archivo:
* <a href="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js" class="external-link" target="_blank">`redoc.standalone.js`</a>
* <a href="https://cdn.jsdelivr.net/npm/redoc@2.4.0/bundles/redoc.standalone.js" class="external-link" target="_blank">`redoc.standalone.js`</a>
Después de eso, tu estructura de archivos podría verse así:
@ -129,14 +129,8 @@ Deberías ver un archivo JavaScript muy largo de **ReDoc**.
Podría comenzar con algo como:
```JavaScript
/*!
* ReDoc - OpenAPI/Swagger-generated API Reference Documentation
* -------------------------------------------------------------
* Version: "2.0.0-rc.18"
* Repo: https://github.com/Redocly/redoc
*/
!function(e,t){"object"==typeof exports&&"object"==typeof m
/*! For license information please see redoc.standalone.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("null")):
...
```

12
docs/pt/docs/how-to/custom-docs-ui-assets.md

@ -98,7 +98,7 @@ Você provavelmente pode clicar com o botão direito em cada link e selecionar u
E o **ReDoc** usa os arquivos:
* <a href="https://cdn.jsdelivr.net/npm/redoc@next/bundles/redoc.standalone.js" class="external-link" target="_blank">`redoc.standalone.js`</a>
* <a href="https://cdn.jsdelivr.net/npm/redoc@2.4.0/bundles/redoc.standalone.js" class="external-link" target="_blank">`redoc.standalone.js`</a>
Depois disso, sua estrutura de arquivos deve se parecer com:
@ -129,14 +129,8 @@ Você deverá ver um arquivo JavaScript muito longo para o **ReDoc**.
Esse arquivo pode começar com algo como:
```JavaScript
/*!
* ReDoc - OpenAPI/Swagger-generated API Reference Documentation
* -------------------------------------------------------------
* Version: "2.0.0-rc.18"
* Repo: https://github.com/Redocly/redoc
*/
!function(e,t){"object"==typeof exports&&"object"==typeof m
/*! For license information please see redoc.standalone.js.LICENSE.txt */
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("null")):
...
```

2
docs_src/custom_docs_ui/tutorial001.py

@ -29,7 +29,7 @@ async def redoc_html():
return get_redoc_html(
openapi_url=app.openapi_url,
title=app.title + " - ReDoc",
redoc_js_url="https://unpkg.com/redoc@2.0.0/bundles/redoc.standalone.js",
redoc_js_url="https://unpkg.com/redoc@2.4.0/bundles/redoc.standalone.js",
)

2
fastapi/openapi/docs.py

@ -188,7 +188,7 @@ def get_redoc_html(
It is normally set to a CDN URL.
"""
),
] = "https://cdn.jsdelivr.net/npm/redoc@2.0.0/bundles/redoc.standalone.js",
] = "https://cdn.jsdelivr.net/npm/redoc@2.4.0/bundles/redoc.standalone.js",
redoc_favicon_url: Annotated[
str,
Doc(

Loading…
Cancel
Save