This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import uuid | |
from datetime import datetime | |
from typing import Optional | |
from humps import camelize # This is from the pyhumps library (https://pypi.org/project/pyhumps/) | |
from pydantic import BaseModel as PydanticBase | |
class BaseModel(PydanticBase): | |
# Standard config settings. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Schema input manipulation. Very hacky, but it generates nice docs. | |
# Copied from https://github.com/tiangolo/fastapi/issues/318#issuecomment-691121286 | |
# These don't work for nested Pydantic models. | |
import inspect | |
from types import FunctionType | |
from typing import Dict, Type | |
from fastapi import ( # noqa | |
BackgroundTasks, |