Search Options

Results per page
Sort
Preferred Languages
Advance

Results 21 - 30 of 44 for get_item (0.1 sec)

  1. 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"])
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Mar 04 22:02:18 UTC 2022
    - 755 bytes
    - Viewed (0)
  2. docs/en/docs/advanced/generate-clients.md

    ////
    
    //// tab | Node.js
    
    ```Javascript
    {!> ../../docs_src/generate_clients/tutorial004.js!}
    ```
    
    ////
    
    With that, the operation IDs would be renamed from things like `items-get_items` to just `get_items`, that way the client generator can generate simpler method names.
    
    ### Generate a TypeScript Client with the Preprocessed OpenAPI
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  3. docs_src/metadata/tutorial004.py

    ]
    
    app = FastAPI(openapi_tags=tags_metadata)
    
    
    @app.get("/users/", tags=["users"])
    async def get_users():
        return [{"name": "Harry"}, {"name": "Ron"}]
    
    
    @app.get("/items/", tags=["items"])
    async def get_items():
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sat Jun 13 11:58:06 UTC 2020
    - 693 bytes
    - Viewed (0)
  4. docs_src/sql_databases_peewee/sql_app/crud.py

        fake_hashed_password = user.password + "notreallyhashed"
        db_user = models.User(email=user.email, hashed_password=fake_hashed_password)
        db_user.save()
        return db_user
    
    
    def get_items(skip: int = 0, limit: int = 100):
        return list(models.Item.select().offset(skip).limit(limit))
    
    
    def create_user_item(item: schemas.ItemCreate, user_id: int):
        db_item = models.Item(**item.dict(), owner_id=user_id)
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 843 bytes
    - Viewed (0)
  5. docs_src/generate_clients/tutorial003_py39.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"])
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Mar 04 22:02:18 UTC 2022
    - 914 bytes
    - Viewed (0)
  6. tests/test_tutorial/test_generate_clients/test_tutorial003.py

            "paths": {
                "/items/": {
                    "get": {
                        "tags": ["items"],
                        "summary": "Get Items",
                        "operationId": "items-get_items",
                        "responses": {
                            "200": {
                                "description": "Successful Response",
                                "content": {
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Fri Jun 30 18:25:16 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  7. docs_src/sql_databases_peewee/sql_app/main.py

        return crud.create_user_item(item=item, user_id=user_id)
    
    
    @app.get("/items/", response_model=List[schemas.Item], dependencies=[Depends(get_db)])
    def read_items(skip: int = 0, limit: int = 100):
        items = crud.get_items(skip=skip, limit=limit)
        return items
    
    
    @app.get(
        "/slowusers/", response_model=List[schemas.User], dependencies=[Depends(get_db)]
    )
    def read_slow_users(skip: int = 0, limit: int = 100):
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Thu Mar 26 19:09:53 UTC 2020
    - 2.2K bytes
    - Viewed (0)
  8. docs/em/docs/advanced/generate-clients.md

    ๐Ÿ‘ฅ ๐Ÿ’ช โฌ ๐Ÿ—„ ๐ŸŽป ๐Ÿ“ `openapi.json` & โคด๏ธ ๐Ÿ‘ฅ ๐Ÿ’ช **โŽ ๐Ÿ‘ˆ ๐Ÿ”ก ๐Ÿ”–** โฎ๏ธ โœ ๐Ÿ’– ๐Ÿ‘‰:
    
    ```Python
    {!../../docs_src/generate_clients/tutorial004.py!}
    ```
    
    โฎ๏ธ ๐Ÿ‘ˆ, ๐Ÿ› ๏ธ ๐Ÿ†” ๐Ÿ”œ ๐Ÿ“ โšช๏ธโžก๏ธ ๐Ÿ‘œ ๐Ÿ’– `items-get_items` `get_items`, ๐Ÿ‘ˆ ๐ŸŒŒ ๐Ÿ‘ฉโ€๐Ÿ’ป ๐Ÿš‚ ๐Ÿ’ช ๐Ÿ— ๐Ÿ™… ๐Ÿ‘ฉโ€๐Ÿ”ฌ ๐Ÿ“›.
    
    ### ๐Ÿ— ๐Ÿ“• ๐Ÿ‘ฉโ€๐Ÿ’ป โฎ๏ธ ๐Ÿ—œ ๐Ÿ—„
    
    ๐Ÿ”œ ๐Ÿ”š ๐Ÿ ๐Ÿ“ `openapi.json`, ๐Ÿ‘† ๐Ÿ”œ ๐Ÿ”€ `package.json` โš™๏ธ ๐Ÿ‘ˆ ๐Ÿ‡ง๐Ÿ‡ฟ ๐Ÿ“, ๐Ÿ–ผ:
    
    ```JSON  hl_lines="7"
    {
      "name": "frontend-app",
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 8.4K bytes
    - Viewed (0)
  9. src/main/java/org/codelibs/fess/helper/PopularWordHelper.java

                    stream(baseExcludes).of(stream -> stream.forEach(exclude -> popularWordsRequestBuilder.addExcludeWord(exclude)));
                    try {
                        popularWordsRequestBuilder.execute().getResponse().getItems().stream().forEach(item -> wordList.add(item.getText()));
                    } catch (final SuggesterException e) {
                        logger.warn("Failed to generate popular words.", e);
                    }
    
    Registered: Thu Oct 31 13:40:30 UTC 2024
    - Last Modified: Thu Feb 22 01:53:18 UTC 2024
    - 5.6K bytes
    - Viewed (0)
  10. docs/de/docs/advanced/generate-clients.md

    ```
    
    ////
    
    //// tab | Node.js
    
    ```Javascript
    {!> ../../docs_src/generate_clients/tutorial004.js!}
    ```
    
    ////
    
    Damit wรผrden die Operation-IDs von Dingen wie `items-get_items` in `get_items` umbenannt, sodass der Client-Generator einfachere Methodennamen generieren kann.
    
    ### Einen TypeScript-Client mit der modifizierten OpenAPI generieren
    
    Registered: Sun Nov 03 07:19:11 UTC 2024
    - Last Modified: Sun Oct 06 20:36:54 UTC 2024
    - 11.9K bytes
    - Viewed (0)
Back to top