Search Options

Results per page
Sort
Preferred Languages
Advance

Results 461 - 470 of 944 for openat (0.05 sec)

  1. docs/en/docs/tutorial/response-status-code.md

    ///
    
    It will:
    
    * Return that status code in the response.
    * Document it as such in the OpenAPI schema (and so, in the user interfaces):
    
    <img src="/img/tutorial/response-status-code/image01.png">
    
    /// note
    
    Some response codes (see the next section) indicate that the response does not have a body.
    
    FastAPI knows this, and will produce OpenAPI docs that state there is no response body.
    
    ///
    
    ## About HTTP status codes
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Mon Oct 28 11:13:18 UTC 2024
    - 3.9K bytes
    - Viewed (0)
  2. tests/test_tuples.py

        assert response.status_code == 422, response.text
    
    
    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": {
                "/model-with-tuple/": {
                    "post": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  3. docs/em/docs/tutorial/schema-extra-example.md

    `Path()`, `Query()`, `Header()`, &amp; `Cookie()`, `example` ⚖️ `examples` 🚮 <a href="https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.0.3.md#parameter-object" class="external-link" target="_blank">🗄 🔑, `Parameter Object` (🔧)</a>.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 5.5K bytes
    - Viewed (0)
  4. tests/test_tutorial/test_security/test_tutorial001_an.py

        assert response.headers["WWW-Authenticate"] == "Bearer"
    
    
    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.9K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_body_multiple_params/test_tutorial001_an.py

                    }
                ]
            }
        )
    
    
    def test_openapi_schema(client: TestClient):
        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: Thu Apr 18 19:40:57 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  6. tests/test_tutorial/test_request_files/test_tutorial001_an_py39.py

        path.write_bytes(b"<file content>")
    
        with path.open("rb") as file:
            response = client.post("/uploadfile/", files={"file": file})
        assert response.status_code == 200, response.text
        assert response.json() == {"filename": "test.txt"}
    
    
    @needs_py39
    def test_openapi_schema(client: TestClient):
        response = client.get("/openapi.json")
        assert response.status_code == 200, response.text
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  7. tests/test_tutorial/test_request_form_models/test_tutorial001_an_py39.py

                    },
                ]
            }
        )
    
    
    @needs_py39
    def test_openapi_schema(client: TestClient):
        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": {
                "/login/": {
                    "post": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 05 15:16:50 UTC 2024
    - 7.5K bytes
    - Viewed (0)
  8. docs/en/docs/alternatives.md

    At some point, Swagger was given to the Linux Foundation, to be renamed OpenAPI.
    
    That's why when talking about version 2.0 it's common to say "Swagger", and for version 3+ "OpenAPI".
    
    /// check | "Inspired **FastAPI** to"
    
    Adopt and use an open standard for API specifications, instead of a custom schema.
    
    And integrate standards-based user interface tools:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 20 19:20:23 UTC 2024
    - 23.2K bytes
    - Viewed (0)
  9. tests/test_security_api_key_header.py

        assert response.json() == {"detail": "Not authenticated"}
    
    
    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": {
                "/users/me": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 1.8K bytes
    - Viewed (0)
  10. docs/zh/docs/advanced/security/oauth2-scopes.md

    **FastAPI** 无缝集成 OAuth2 作用域(`Scopes`),可以直接使用。
    
    作用域是更精密的权限系统,遵循 OAuth2 标准,与 OpenAPI 应用(和 API 自动文档)集成。
    
    OAuth2 也是脸书、谷歌、GitHub、微软、推特等第三方身份验证应用使用的机制。这些身份验证应用在用户登录应用时使用 OAuth2 提供指定权限。
    
    脸书、谷歌、GitHub、微软、推特就是 OAuth2 作用域登录。
    
    本章介绍如何在 **FastAPI** 应用中使用 OAuth2 作用域管理验证与授权。
    
    /// warning | "警告"
    
    本章内容较难,刚接触 FastAPI 的新手可以跳过。
    
    OAuth2 作用域不是必需的,没有它,您也可以处理身份验证与授权。
    
    但 OAuth2 作用域与 API(通过 OpenAPI)及 API 文档集成地更好。
    
    不管怎么说,**FastAPI** 支持在代码中使用作用域或其它安全/授权需求项。
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.8K bytes
    - Viewed (0)
Back to top