pythonasyncioapiasyncfastapiframeworkjsonjson-schemaopenapiopenapi3pydanticpython-typespython3redocreststarletteswaggerswagger-uiuvicornweb
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
325 B
19 lines
325 B
from typing import List, Union
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class SubItem(BaseModel):
|
|
dup_sub_name: str
|
|
|
|
|
|
class Item(BaseModel):
|
|
dup_title: str
|
|
dup_size: int
|
|
dup_description: Union[str, None] = None
|
|
dup_sub: SubItem
|
|
dup_multi: List[SubItem] = []
|
|
|
|
|
|
class ItemInList(BaseModel):
|
|
dup_name2: str
|
|
|