Search Options

Results per page
Sort
Preferred Languages
Advance

Results 171 - 180 of 1,021 for openat (0.1 sec)

  1. docs/zh/docs/tutorial/metadata.md

    每个标签元数据字典的顺序也定义了在文档用户界面显示的顺序。
    
    例如按照字母顺序,即使 `users` 排在 `items` 之后,它也会显示在前面,因为我们将它的元数据添加为列表内的第一个字典。
    
    ## OpenAPI URL
    
    默认情况下,OpenAPI 模式服务于 `/openapi.json`。
    
    但是你可以通过参数 `openapi_url` 对其进行配置。
    
    例如,将其设置为服务于 `/api/v1/openapi.json`:
    
    ```Python hl_lines="3"
    {!../../docs_src/metadata/tutorial002.py!}
    ```
    
    如果你想完全禁用 OpenAPI 模式,可以将其设置为 `openapi_url=None`,这样也会禁用使用它的文档用户界面。
    
    ## 文档 URLs
    
    你可以配置两个文档用户界面,包括:
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.6K bytes
    - Viewed (0)
  2. tests/test_tutorial/test_handling_errors/test_tutorial002.py

        assert response.json() == {"detail": "Item not found"}
    
    
    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-header/{item_id}": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 3.3K bytes
    - Viewed (0)
  3. tests/test_tutorial/test_body_updates/test_tutorial001_py39.py

            "tax": 10.5,
            "tags": [],
        }
    
    
    @needs_py39
    @needs_pydanticv2
    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}": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Sep 28 04:14:40 UTC 2023
    - 11.8K bytes
    - Viewed (0)
  4. docs/ru/docs/tutorial/body-fields.md

    
    /// warning | "Внимание"
    
    Дополнительные ключи, переданные в функцию `Field`, также будут присутствовать в сгенерированной OpenAPI схеме вашего приложения.
    Поскольку эти ключи не являются обязательной частью спецификации OpenAPI, некоторые инструменты OpenAPI, например, [валидатор OpenAPI](https://validator.swagger.io/), могут не работать с вашей сгенерированной схемой.
    
    ///
    
    ## Резюме
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 4.3K bytes
    - Viewed (0)
  5. tests/test_tutorial/test_header_params/test_tutorial002_an.py

        assert response.status_code == expected_status
        assert response.json() == expected_response
    
    
    def test_openapi_schema():
        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": {
                "/items/": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4K bytes
    - Viewed (0)
  6. README.md

    * **Robust**: Get production-ready code. With automatic interactive documentation.
    * **Standards-based**: Based on (and fully compatible with) the open standards for APIs: <a href="https://github.com/OAI/OpenAPI-Specification" class="external-link" target="_blank">OpenAPI</a> (previously known as Swagger) and <a href="https://json-schema.org/" class="external-link" target="_blank">JSON Schema</a>.
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Oct 31 09:13:26 UTC 2024
    - 23.6K bytes
    - Viewed (0)
  7. docs/zh/docs/advanced/custom-response.md

    ///
    
    /// info | "提示"
    
    当然,实际的 `Content-Type` 头,状态码等等,将来自于你返回的 `Response` 对象。
    
    ///
    
    ### OpenAPI 中的文档和重载 `Response`
    
    如果你想要在函数内重载响应,但是同时在 OpenAPI 中文档化「媒体类型」,你可以使用 `response_class` 参数并返回一个 `Response` 对象。
    
    接着 `response_class` 参数只会被用来文档化 OpenAPI 的 *路径操作*,你的 `Response` 用来返回响应。
    
    ### 直接返回 `HTMLResponse`
    
    比如像这样:
    
    ```Python hl_lines="7 23 21"
    {!../../docs_src/custom_response/tutorial004.py!}
    ```
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 7.7K bytes
    - Viewed (0)
  8. tests/test_tutorial/test_cookie_params/test_tutorial001_an_py310.py

    
    @needs_py310
    def test_openapi_schema():
        from docs_src.cookie_params.tutorial001_an_py310 import app
    
        client = TestClient(app)
        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": {
                "/items/": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.1K bytes
    - Viewed (0)
  9. tests/test_tutorial/test_header_params/test_tutorial002_an_py310.py

        assert response.json() == expected_response
    
    
    @needs_py310
    def test_openapi_schema(client: TestClient):
        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": {
                "/items/": {
                    "get": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jul 07 17:12:13 UTC 2023
    - 4.2K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_path_operation_advanced_configurations/test_tutorial007.py

                }
            ]
        }
    
    
    @needs_pydanticv2
    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/": {
                    "post": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Apr 18 19:40:57 UTC 2024
    - 3.3K bytes
    - Viewed (0)
Back to top