name: Feature Request
description: Suggest an idea or ask for a feature that you would like to have in FastAPI
labels: [enhancement]
body:
  - type: markdown
    attributes:
      value: |
        Thanks for your interest in FastAPI! 🚀

        Please follow these instructions, fill every question, and do every step. 🙏
        
        I'm asking this because answering questions and solving problems in GitHub issues is what consumes most of the time.
        
        I end up not being able to add new features, fix bugs, review pull requests, etc. as fast as I wish because I have to spend too much time handling issues.

        All that, on top of all the incredible help provided by a bunch of community members, the [FastAPI Experts](https://fastapi.tiangolo.com/fastapi-people/#experts), that give a lot of their time to come here and help others.

        That's a lot of work they are doing, but if more FastAPI users came to help others like them just a little bit more, it would be much less effort for them (and you and me 😅).

        By asking questions in a structured way (following this) it will be much easier to help you.
        
        And there's a high chance that you will find the solution along the way and you won't even have to submit it and wait for an answer. 😎

        As there are too many issues with questions, I'll have to close the incomplete ones. That will allow me (and others) to focus on helping people like you that follow the whole process and help us help you. 🤓
  - type: checkboxes
    id: checks
    attributes:
      label: First Check
      description: Please confirm and check all the following options.
      options:
        - label: I added a very descriptive title to this issue.
          required: true
        - label: I used the GitHub search to find a similar issue and didn't find it.
          required: true
        - label: I searched the FastAPI documentation, with the integrated search.
          required: true
        - label: I already searched in Google "How to X in FastAPI" and didn't find any information.
          required: true
        - label: I already read and followed all the tutorial in the docs and didn't find an answer.
          required: true
        - label: I already checked if it is not related to FastAPI but to [Pydantic](https://github.com/samuelcolvin/pydantic).
          required: true
        - label: I already checked if it is not related to FastAPI but to [Swagger UI](https://github.com/swagger-api/swagger-ui).
          required: true
        - label: I already checked if it is not related to FastAPI but to [ReDoc](https://github.com/Redocly/redoc).
          required: true
  - type: checkboxes
    id: help
    attributes:
      label: Commit to Help
      description: |
        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.

      options:
        - label: I commit to help with one of those options 👆
          required: true
  - type: textarea
    id: example
    attributes:
      label: Example Code
      description: |
        Please add a self-contained, [minimal, reproducible, example](https://stackoverflow.com/help/minimal-reproducible-example) with your use case.

        If I (or someone) can copy it, run it, and see it right away, there's a much higher chance I (or someone) will be able to help you.

      placeholder: |
        from fastapi import FastAPI

        app = FastAPI()


        @app.get("/")
        def read_root():
            return {"Hello": "World"}
      render: python
    validations:
      required: true
  - type: textarea
    id: description
    attributes:
      label: Description
      description: |
        What is your feature request?

        Write a short description telling me what you are trying to solve and what you are currently doing.
      placeholder: |
        * Open the browser and call the endpoint `/`.
        * It returns a JSON with `{"Hello": "World"}`.
        * I would like it to have an extra parameter to teleport me to the moon and back.
    validations:
      required: true
  - type: textarea
    id: wanted-solution
    attributes:
      label: Wanted Solution
      description: |
        Tell me what's the solution you would like.
      placeholder: |
        I would like it to have a `teleport_to_moon` parameter that defaults to `False`, and can be set to `True` to teleport me.
    validations:
      required: true
  - type: textarea
    id: wanted-code
    attributes:
      label: Wanted Code
      description: Show me an example of how you would want the code to look like.
      placeholder: |
        from fastapi import FastAPI

        app = FastAPI()


        @app.get("/", teleport_to_moon=True)
        def read_root():
            return {"Hello": "World"}
      render: python
    validations:
      required: true
  - type: textarea
    id: alternatives
    attributes:
      label: Alternatives
      description: |
        Tell me about alternatives you've considered.
      placeholder: |
        To wait for Space X moon travel plans to drop down long after they release them. But I would rather teleport.
  - type: dropdown
    id: os
    attributes:
      label: Operating System
      description: What operating system are you on?
      multiple: true
      options:
        - Linux
        - Windows
        - macOS
        - Other
    validations:
      required: true
  - type: textarea
    id: os-details
    attributes:
      label: Operating System Details
      description: You can add more details about your operating system here, in particular if you chose "Other".
  - type: input
    id: fastapi-version
    attributes:
      label: FastAPI Version
      description: |
        What FastAPI version are you using?

        You can find the FastAPI version with:

        ```bash
        python -c "import fastapi; print(fastapi.__version__)"
        ```
    validations:
      required: true
  - type: input
    id: python-version
    attributes:
      label: Python Version
      description: |
        What Python version are you using?

        You can find the Python version with:

        ```bash
        python --version
        ```
    validations:
      required: true
  - type: textarea
    id: context
    attributes:
      label: Additional Context
      description: Add any additional context information or screenshots you think are useful.
