Fastapi: Add a common switcher for alternatives in the documentation

Created on 14 Oct 2020  路  3Comments  路  Source: tiangolo/fastapi

First check

  • [x] I added a very descriptive title to this issue.
  • [x] I used the GitHub search to find a similar issue and didn't find it.
  • [x] I searched the FastAPI documentation, with the integrated search.
  • [x] I already searched in Google "How to X in FastAPI" and didn't find any information.
  • [x] I already read and followed all the tutorial in the docs and didn't find an answer.
  • [x] I already checked if it is not related to FastAPI but to Pydantic.
  • [x] I already checked if it is not related to FastAPI but to Swagger UI.
  • [x] I already checked if it is not related to FastAPI but to ReDoc.
  • [x] After submitting this, I commit to one of:

    • Read open issues with questions until I find 2 issues where I can help someone and add a comment to help there.

    • I already hit the "watch" button in this repository to receive notifications and I commit to help at least 2 people that ask questions in the future.

    • Implement a Pull Request for a confirmed bug.

Description

In the documentation, there are pages which suggest two alternatives for a problem. Like here, it suggests either Uvicorn or Hypervisor to deploy the code. However, in the multiple instances of the examples, the switching as to be done manually for each one of them.

Ideally, could it be shifted to something where switching in one example switches all the snippets to that option. Like this maybe where switching between Kotlin and Java for one switches it for all

Environment

Not relevant

question

Most helpful comment

I believe he means that if you switch to 'hypercorn' all the other optional code samples should also switch.
Aka I shouldn't be able to do this:

Screenshot 2020-10-20 010737

All 3 comments

I did not understand the problem here, in the example you sent you are also switching the snippet manually. Can you elaborate this?

I believe he means that if you switch to 'hypercorn' all the other optional code samples should also switch.
Aka I shouldn't be able to do this:

Screenshot 2020-10-20 010737

Yes, that is what I meant. Thank you @ArcLightSlavik

Was this page helpful?
0 / 5 - 0 ratings