Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 1,743 for examples (0.2 sec)

  1. tests/test_openapi_examples.py

        data: str
    
    
    @app.post("/examples/")
    def examples(
        item: Item = Body(
            examples=[
                {"data": "Data in Body examples, example1"},
            ],
            openapi_examples={
                "Example One": {
                    "summary": "Example One Summary",
                    "description": "Example One Description",
                    "value": {"data": "Data in Body examples, example1"},
                },
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 17K bytes
    - Viewed (0)
  2. tests/test_schema_extra_examples.py

                return item
    
        @app.post("/examples/")
        def examples(
            item: Item = Body(
                examples=[
                    {"data": "Data in Body examples, example1"},
                    {"data": "Data in Body examples, example2"},
                ],
            ),
        ):
            return item
    
        with pytest.warns(DeprecationWarning):
    
            @app.post("/example_examples/")
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Tue Oct 24 20:26:06 GMT 2023
    - 37.7K bytes
    - Viewed (0)
  3. docs/ru/docs/tutorial/schema-extra-example.md

        {!> ../../../docs_src/schema_extra_example/tutorial003.py!}
        ```
    
    ### Аргумент "example" в UI документации
    
    С любым из вышеуказанных методов это будет выглядеть так в `/docs`:
    
    <img src="/img/tutorial/body-fields/image01.png">
    
    ### `Body` с аргументом `examples`
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 11.6K bytes
    - Viewed (0)
  4. docs/ko/docs/tutorial/schema-extra-example.md

    그리고 Swagger UI는 이 특정한 `examples` 필드를 한동안 지원했습니다. 그래서, 이를 다른 **문서 UI에 있는 예제**를 **표시**하기 위해 사용할 수 있습니다.
    
    이 OpenAPI-특화 필드인 `examples`의 형태는 (`list`대신에) **다중 예제**가 포함된 `dict`이며, 각각의 별도 정보 또한 **OpenAPI**에 추가될 것입니다.
    
    이는 OpenAPI에 포함된 JSON 스키마 안으로 포함되지 않으며, *경로 작동*에 직접적으로 포함됩니다.
    
    ### `openapi_examples` 매개변수 사용하기
    
    다음 예시 속에 OpenAPI-특화 `examples`를 FastAPI 안에서 매개변수 `openapi_examples` 매개변수와 함께 선언할 수 있습니다:
    
    * `Path()`
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Feb 09 12:35:46 GMT 2024
    - 13.6K bytes
    - Viewed (0)
  5. docs/pt/docs/tutorial/schema-extra-example.md

    Portanto, embora `example` não seja parte do JSON Schema, é parte da versão customizada do JSON Schema usada pelo OpenAPI, e é isso que vai ser usado dentro da UI de documentação.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Fri Mar 22 01:42:11 GMT 2024
    - 6.1K bytes
    - Viewed (0)
  6. docs/en/docs/tutorial/schema-extra-example.md

    ### Using the `openapi_examples` Parameter
    
    You can declare the OpenAPI-specific `examples` in FastAPI with the parameter `openapi_examples` for:
    
    * `Path()`
    * `Query()`
    * `Header()`
    * `Cookie()`
    * `Body()`
    * `Form()`
    * `File()`
    
    The keys of the `dict` identify each example, and each value is another `dict`.
    
    Each specific example `dict` in the `examples` can contain:
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 11.8K bytes
    - Viewed (0)
  7. fastapi/params.py

            **extra: Any,
        ):
            if example is not _Unset:
                warnings.warn(
                    "`example` has been deprecated, please use `examples` instead",
                    category=DeprecationWarning,
                    stacklevel=4,
                )
            self.example = example
            self.include_in_schema = include_in_schema
            self.openapi_examples = openapi_examples
            kwargs = dict(
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 27.5K bytes
    - Viewed (1)
  8. docs/de/docs/tutorial/schema-extra-example.md

    ### OpenAPI-spezifische `examples`
    
    Schon bevor **JSON Schema** `examples` unterstützte, unterstützte OpenAPI ein anderes Feld, das auch `examples` genannt wurde.
    
    Diese **OpenAPI-spezifischen** `examples` finden sich in einem anderen Abschnitt der OpenAPI-Spezifikation. Sie sind **Details für jede *Pfadoperation***, nicht für jedes JSON-Schema.
    
    Plain Text
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Sat Mar 30 20:19:53 GMT 2024
    - 13.3K bytes
    - Viewed (0)
  9. fastapi/param_functions.py

            strict=strict,
            multiple_of=multiple_of,
            allow_inf_nan=allow_inf_nan,
            max_digits=max_digits,
            decimal_places=decimal_places,
            example=example,
            examples=examples,
            openapi_examples=openapi_examples,
            deprecated=deprecated,
            include_in_schema=include_in_schema,
            json_schema_extra=json_schema_extra,
            **extra,
        )
    
    
    Python
    - Registered: Sun Apr 21 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:40:57 GMT 2024
    - 62.5K bytes
    - Viewed (0)
  10. .idea/encodings.xml

        <file url="file://$PROJECT_DIR$/libraries/examples/browser-example/src/main/resources" charset="UTF-8" />
        <file url="file://$PROJECT_DIR$/libraries/examples/js-example" charset="UTF-8" />
        <file url="file://$PROJECT_DIR$/libraries/examples/js-example/src/main/kotlin" charset="UTF-8" />
    XML
    - Registered: Fri Apr 26 08:18:10 GMT 2024
    - Last Modified: Mon Aug 22 14:23:18 GMT 2022
    - 5.9K bytes
    - Viewed (0)
Back to top