mirror of
https://github.com/fastapi/fastapi.git
synced 2026-02-01 09:51:27 -05:00
18 lines
300 B
Python
18 lines
300 B
Python
from typing import List
|
|
|
|
from fastapi import FastAPI
|
|
from pydantic import BaseModel
|
|
from pydantic.types import UrlStr
|
|
|
|
app = FastAPI()
|
|
|
|
|
|
class Image(BaseModel):
|
|
url: UrlStr
|
|
name: str
|
|
|
|
|
|
@app.post("/images/multiple/")
|
|
async def create_multiple_images(*, images: List[Image]):
|
|
return images
|