mirror of
https://github.com/rjNemo/fastapi
synced 2026-06-06 18:46:40 +00:00
14 lines
248 B
Python
14 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
|