mirror of
https://github.com/fastapi/fastapi.git
synced 2026-04-19 06:20:23 -04:00
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
20 lines
303 B
Python
20 lines
303 B
Python
from typing import List, Union
|
|
|
|
from fastapi._compat.v1 import BaseModel
|
|
|
|
|
|
class SubItem(BaseModel):
|
|
name: str
|
|
|
|
|
|
class Item(BaseModel):
|
|
title: str
|
|
size: int
|
|
description: Union[str, None] = None
|
|
sub: SubItem
|
|
multi: List[SubItem] = []
|
|
|
|
|
|
class ItemInList(BaseModel):
|
|
name1: str
|