Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 29 for examples (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. 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)
  4. 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)
  5. 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)
  6. fastapi/openapi/models.py

        allowReserved: Optional[bool] = None
    
    
    class MediaType(BaseModelWithConfig):
        schema_: Optional[Union[Schema, Reference]] = Field(default=None, alias="schema")
        example: Optional[Any] = None
        examples: Optional[dict[str, Union[Example, Reference]]] = None
        encoding: Optional[dict[str, Encoding]] = None
    
    
    class ParameterBase(BaseModelWithConfig):
        description: Optional[str] = None
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 12:54:56 UTC 2025
    - 15.1K bytes
    - Viewed (0)
  7. 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)
  8. docs/zh/llm-prompt.md

    2) Never change punctuation inside inline code, code blocks, URLs, or file paths.
    
    ### Ellipsis
    
    1) Keep ellipsis style consistent within each document, prefer `...` over  `……`.
    2) Never change ellipsis in code, URLs, or CLI examples.
    
    ### Preferred translations / glossary
    
    Use the following preferred translations when they apply in documentation prose:
    
    - request (HTTP): 请求
    - response (HTTP): 响应
    - path operation: 路径操作
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:49:08 UTC 2025
    - 1.4K bytes
    - Viewed (0)
  9. docs/zh-hant/llm-prompt.md

    ### Ellipsis
    
    1) Keep ellipsis style consistent within each document, prefer `...` over `……`.
    2) Never change ellipsis in code, URLs, or CLI examples.
    
    ### Preferred translations / glossary
    
    1. Should avoid using simplified Chinese characters and terms. Always examine if the translation can be easily comprehended by the Traditional Chinese readers.
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:49:46 UTC 2025
    - 2.2K bytes
    - Viewed (0)
  10. tests/test_tutorial/test_schema_extra_example/test_tutorial004.py

                                "application/json": {
                                    "schema": {
                                        "$ref": "#/components/schemas/Item",
                                        "examples": [
                                            {
                                                "name": "Foo",
                                                "description": "A very nice Item",
    Registered: Sun Dec 28 07:19:09 UTC 2025
    - Last Modified: Sat Dec 27 18:19:10 UTC 2025
    - 5.4K bytes
    - Viewed (0)
Back to top