Search Options

Results per page
Sort
Preferred Languages
Advance

Results 451 - 460 of 1,021 for openat (0.09 sec)

  1. tests/test_tutorial/test_behind_a_proxy/test_tutorial002.py

        assert response.status_code == 200
        assert response.json() == {"message": "Hello World", "root_path": "/api/v1"}
    
    
    def test_openapi():
        response = client.get("/openapi.json")
        assert response.status_code == 200
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/app": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_query_param_models/test_tutorial002.py

                    )
                ]
            }
        )
    
    
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == snapshot(
            {
                "openapi": "3.1.0",
                "info": {"title": "FastAPI", "version": "0.1.0"},
                "paths": {
                    "/items/": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Tue Sep 17 18:54:10 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_schema_extra_example/test_tutorial005_an_py39.py

            },
        )
        assert response.status_code == 200
    
    
    @needs_py39
    def test_openapi_schema(client: TestClient) -> None:
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items/{item_id}": {
                    "put": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Aug 26 18:03:13 UTC 2023
    - 6.8K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_generate_clients/test_tutorial003.py

            {"name": "Plumbus", "price": 3},
            {"name": "Portal Gun", "price": 9001},
        ]
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items/": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  5. docs/pt/docs/tutorial/dependencies/dependencies-with-yield.md

    ```Python
    with open("./somefile.txt") as f:
        contents = f.read()
        print(contents)
    ```
    
    Por baixo dos panos, o código `open("./somefile.txt")` cria um objeto que é chamado de "Gerenciador de Contexto".
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 15.5K bytes
    - Viewed (0)
  6. docs/ru/docs/tutorial/path-params.md

    ///
    
    ## Преимущества стандартизации, альтернативная документация
    
    Поскольку сгенерированная схема соответствует стандарту <a href="https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.2.md" class="external-link" target="_blank">OpenAPI</a>, её можно использовать со множеством совместимых инструментов.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 14.1K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial004.py

            "description": None,
            "tax": None,
            "tags": [],
        }
    
    
    @needs_pydanticv2
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items/": {
                    "post": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 28 04:14:40 UTC 2023
    - 8.7K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_custom_response/test_tutorial004.py

        assert response.status_code == 200, response.text
        assert response.text == html_contents
    
    
    def test_openapi_schema():
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
        assert response.json() == {
            "openapi": "3.1.0",
            "info": {"title": "FastAPI", "version": "0.1.0"},
            "paths": {
                "/items/": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.2K bytes
    - Viewed (0)
  9. docs/zh/docs/advanced/using-request-directly.md

    但直接从 `Request` 对象提取数据时(例如,读取请求体),**FastAPI** 不会验证、转换和存档数据(为 API 文档使用 OpenAPI)。
    
    不过,仍可以验证、转换与注释(使用 Pydantic 模型的请求体等)其它正常声明的参数。
    
    但在某些特定情况下,还是需要提取 `Request` 对象。
    
    ## 直接使用 `Request` 对象
    
    假设要在*路径操作函数*中获取客户端 IP 地址和主机。
    
    此时,需要直接访问请求。
    
    ```Python hl_lines="1  7-8"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 2K bytes
    - Viewed (0)
  10. docs/pt/docs/tutorial/request-form-models.md

    ```console
    $ pip install python-multipart
    ```
    
    ///
    
    /// note | "Nota"
    
    Isto é suportado desde a versão `0.113.0` do FastAPI. 🤓
    
    ///
    
    ## Modelos Pydantic para Formulários
    
    Você precisa apenas declarar um **modelo Pydantic** com os campos que deseja receber como **campos de formulários**, e então declarar o parâmetro como um `Form`:
    
    //// tab | Python 3.9+
    
    ```Python hl_lines="9-11  15"
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 3.1K bytes
    - Viewed (0)
Back to top