Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 121 for tags (0.14 sec)

  1. docs_src/generate_clients/tutorial004.js

          for (const method of Object.keys(pathData)) {
            const operation = pathData[method]
            if (operation.tags && operation.tags.length > 0) {
              const tag = operation.tags[0]
              const operationId = operation.operationId
              const toRemove = `${tag}-`
              if (operationId.startsWith(toRemove)) {
                const newOperationId = operationId.substring(toRemove.length)
    JavaScript
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Mar 14 11:40:05 GMT 2024
    - 1K bytes
    - Viewed (0)
  2. docs_src/generate_clients/tutorial002.py

    @app.post("/items/", response_model=ResponseMessage, tags=["items"])
    async def create_item(item: Item):
        return {"message": "Item received"}
    
    
    @app.get("/items/", response_model=List[Item], tags=["items"])
    async def get_items():
        return [
            {"name": "Plumbus", "price": 3},
            {"name": "Portal Gun", "price": 9001},
        ]
    
    
    @app.post("/users/", response_model=ResponseMessage, tags=["users"])
    async def create_user(user: User):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Mar 04 22:02:18 GMT 2022
    - 755 bytes
    - Viewed (0)
  3. docs_src/path_operation_configuration/tutorial005.py

        - **name**: each item must have a name
        - **description**: a long description
        - **price**: required
        - **tax**: if the item doesn't have tax, you can omit this
        - **tags**: a set of unique tag strings for this item
        """
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 741 bytes
    - Viewed (0)
  4. tests/test_tutorial/test_path_operation_configurations/test_tutorial006.py

                                "description": "Successful Response",
                                "content": {"application/json": {"schema": {}}},
                            }
                        },
                        "tags": ["items"],
                        "summary": "Read Items",
                        "operationId": "read_items_items__get",
                    }
                },
                "/users/": {
                    "get": {
    Python
    - Registered: Sun Apr 28 07:19:10 GMT 2024
    - Last Modified: Fri Jun 30 18:25:16 GMT 2023
    - 2.3K bytes
    - Viewed (0)
  5. docs_src/path_operation_configuration/tutorial003.py

        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: Set[str] = set()
    
    
    @app.post(
        "/items/",
        response_model=Item,
        summary="Create an item",
        description="Create an item with all the information, name, description, price, tax and a set of unique tags",
    )
    async def create_item(item: Item):
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 517 bytes
    - Viewed (0)
  6. docs_src/response_model/tutorial004.py

        name: str
        description: Union[str, None] = None
        price: float
        tax: float = 10.5
        tags: List[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    @app.get("/items/{item_id}", response_model=Item, response_model_exclude_unset=True)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 633 bytes
    - Viewed (0)
  7. docs_src/body_updates/tutorial001_py39.py

        description: Union[str, None] = None
        price: Union[float, None] = None
        tax: float = 10.5
        tags: list[str] = []
    
    
    items = {
        "foo": {"name": "Foo", "price": 50.2},
        "bar": {"name": "Bar", "description": "The bartenders", "price": 62, "tax": 20.2},
        "baz": {"name": "Baz", "description": None, "price": 50.2, "tax": 10.5, "tags": []},
    }
    
    
    @app.get("/items/{item_id}", response_model=Item)
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 900 bytes
    - Viewed (0)
  8. docs/em/docs/tutorial/metadata.md

    โฎ๏ธ ๐Ÿ‘‰ ๐Ÿ“ณ, ๐Ÿง ๐Ÿ› ๏ธ ๐Ÿฉบ ๐Ÿ”œ ๐Ÿ‘€ ๐Ÿ’–:
    
    <img src="/img/tutorial/metadata/image01.png">
    
    ## ๐Ÿ—ƒ ๐Ÿ”–
    
    ๐Ÿ‘† ๐Ÿ’ช ๐Ÿšฎ ๐ŸŒ– ๐Ÿ—ƒ ๐ŸŽ ๐Ÿ”– โš™๏ธ ๐Ÿ‘ช ๐Ÿ‘† โžก ๐Ÿ› ๏ธ โฎ๏ธ ๐Ÿ”ข `openapi_tags`.
    
    โšซ๏ธ โœŠ ๐Ÿ“‡ โš— 1๏ธโƒฃ ๐Ÿ“– ๐Ÿ”  ๐Ÿ”–.
    
    ๐Ÿ”  ๐Ÿ“– ๐Ÿ’ช ๐Ÿ”Œ:
    
    * `name` (**โœ”**): `str` โฎ๏ธ ๐ŸŽ ๐Ÿ“› ๐Ÿ‘† โš™๏ธ `tags` ๐Ÿ”ข ๐Ÿ‘† *โžก ๐Ÿ› ๏ธ* &amp; `APIRouter`โ“‚.
    * `description`: `str` โฎ๏ธ ๐Ÿ“ ๐Ÿ“› ๐Ÿ”–. โšซ๏ธ ๐Ÿ’ช โœ”๏ธ โœ &amp; ๐Ÿ”œ ๐ŸŽฆ ๐Ÿฉบ ๐ŸŽš.
    * `externalDocs`: `dict` ๐Ÿ”ฌ ๐Ÿ”ข ๐Ÿงพ โฎ๏ธ:
    Plain Text
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Thu Apr 18 19:53:19 GMT 2024
    - 4.2K bytes
    - Viewed (0)
  9. docs_src/body_nested_models/tutorial003_py39.py

    from fastapi import FastAPI
    from pydantic import BaseModel
    
    app = FastAPI()
    
    
    class Item(BaseModel):
        name: str
        description: Union[str, None] = None
        price: float
        tax: Union[float, None] = None
        tags: set[str] = set()
    
    
    @app.put("/items/{item_id}")
    async def update_item(item_id: int, item: Item):
        results = {"item_id": item_id, "item": item}
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Sat May 14 11:59:59 GMT 2022
    - 409 bytes
    - Viewed (0)
  10. docs_src/body_nested_models/tutorial007_py310.py

    app = FastAPI()
    
    
    class Image(BaseModel):
        url: HttpUrl
        name: str
    
    
    class Item(BaseModel):
        name: str
        description: str | None = None
        price: float
        tax: float | None = None
        tags: set[str] = set()
        images: list[Image] | None = None
    
    
    class Offer(BaseModel):
        name: str
        description: str | None = None
        price: float
        items: list[Item]
    
    
    @app.post("/offers/")
    Python
    - Registered: Sun May 05 07:19:11 GMT 2024
    - Last Modified: Fri Jan 07 14:11:31 GMT 2022
    - 520 bytes
    - Viewed (0)
Back to top