mirror of
https://github.com/fastapi/fastapi.git
synced 2025-12-23 22:29:34 -05:00
15 lines
248 B
Python
15 lines
248 B
Python
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
|