mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-25 07:08:11 -05:00
* Fix for - [FEATURE] Remove *, where it's not needed #1234 * 🔥 Remove unnecessary arg *, * 🎨 Update docs format highlight lines Co-authored-by: Sebastián Ramírez <tiangolo@gmail.com>
17 lines
273 B
Python
17 lines
273 B
Python
from typing import List
|
|
|
|
from fastapi import FastAPI
|
|
from pydantic import BaseModel, HttpUrl
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
class Image(BaseModel):
|
|
url: HttpUrl
|
|
name: str
|
|
|
|
|
|
@app.post("/images/multiple/")
|
|
async def create_multiple_images(images: List[Image]):
|
|
return images
|