pydantic-sqlalchemy
pydantic-sqlalchemy copied to clipboard
Pydantic not enforcing maximum column length
` class User(db.Model): tablename = 'user' id = db.Column(db.Integer, autoincrement=True, primary_key=True) first_name = db.Column(db.String(40), nullable=False) last_name = db.Column(db.String(40), nullable=False)
UserSchema = sqlalchemy_to_pydantic(User, exclude=['id'])
UserSchema doesn't enforce the maximum length on the first_name and last_name fields. `