Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Support custom naming for GenericModel subclasses #859
Right now, it is not easy to use a custom naming scheme for a generic models. But I think this could be useful in some cases.
I recently faced this problem when I realized that the generated schema for
My workaround was to create a wrapper class for optionals:
class OptionalWrapper(GenericModel, Generic[T]): value: Optional[T]
But I wanted to override the
Given how small a code change this requires, I think it should be reasonable, but I figured I'd create an issue for discussion just in case.