Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 242 for example1 (0.04 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"},
                },
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  2. tests/test_schema_extra_examples.py

            item: Item = Body(
                examples=[
                    {"data": "Data in Body examples, example1"},
                    {"data": "Data in Body examples, example2"},
                ],
            ),
        ):
            return item
    
        with pytest.warns(FastAPIDeprecationWarning):
    
            @app.post("/example_examples/")
            def example_examples(
                item: Item = Body(
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 32.2K bytes
    - Viewed (0)
  3. tests/test_file_and_form_order_issue_9116.py

    
    client = TestClient(app)
    
    
    @pytest.fixture
    def tmp_file_1(tmp_path: Path) -> Path:
        f = tmp_path / "example1.txt"
        f.write_text("foo")
        return f
    
    
    @pytest.fixture
    def tmp_file_2(tmp_path: Path) -> Path:
        f = tmp_path / "example2.txt"
        f.write_text("bar")
        return f
    
    
    @pytest.mark.parametrize("endpoint_path", ("/file_before_form", "/file_after_form"))
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 17 21:25:59 UTC 2025
    - 2.3K bytes
    - Viewed (0)
  4. docs/en/docs/tutorial/schema-extra-example.md

    ## `examples` in JSON Schema - OpenAPI { #examples-in-json-schema-openapi }
    
    When using any of:
    
    * `Path()`
    * `Query()`
    * `Header()`
    * `Cookie()`
    * `Body()`
    * `Form()`
    * `File()`
    
    you can also declare a group of `examples` with additional information that will be added to their **JSON Schemas** inside of **OpenAPI**.
    
    ### `Body` with `examples` { #body-with-examples }
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 20 15:55:38 UTC 2025
    - 8.9K bytes
    - Viewed (0)
  5. docs/de/docs/tutorial/schema-extra-example.md

    ### OpenAPI-spezifische `examples` { #openapi-specific-examples }
    
    Schon bevor **JSON Schema** `examples` unterstützte, unterstützte OpenAPI ein anderes Feld, das auch `examples` genannt wurde.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Wed Dec 24 10:28:19 UTC 2025
    - 10.6K bytes
    - Viewed (0)
  6. docs/es/docs/tutorial/schema-extra-example.md

    ### `examples` específicos de OpenAPI { #openapi-specific-examples }
    
    Desde antes de que **JSON Schema** soportara `examples`, OpenAPI tenía soporte para un campo diferente también llamado `examples`.
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Tue Dec 16 16:33:45 UTC 2025
    - 10.3K 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=FastAPIDeprecationWarning,
                    stacklevel=4,
                )
            self.example = example
            self.include_in_schema = include_in_schema
            self.openapi_examples = openapi_examples
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 26.3K bytes
    - Viewed (0)
  8. 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,
        )
    
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 63K bytes
    - Viewed (0)
  9. scripts/translate.py

    Do not translate the content of code snippets, keep the original in English. For example, «`list`», «`dict`», keep them as is.
    
    
    ### Content of code blocks
    
    Do not translate the content of code blocks, except for comments in the language which the code block uses.
    
    Examples:
    
        Source (English) – The code block is a bash code example with one comment:
    
            «««
            ```bash
            # Print greeting
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 19:05:53 UTC 2025
    - 34.1K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_schema_extra_example/test_tutorial005.py

                                "application/json": {
                                    "schema": {"$ref": "#/components/schemas/Item"},
                                    "examples": {
                                        "normal": {
                                            "summary": "A normal example",
                                            "description": "A **normal** item works correctly.",
                                            "value": {
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 6.1K bytes
    - Viewed (0)
Back to top