-
Notifications
You must be signed in to change notification settings - Fork 20
added Validation using Pydantic #48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
I have not reviewed everything. Please work on these while I get back. |
|
Check the new PR @aditeyabaral . All changes have been made |
Changes (from my end)
|
|
The rest of the changes look good, and this can be merged. Please note the following:
|
|
@aditeyabaral Should I merge this PR and get started on FastAPI?? |
|
I will merge it in an hour or so. Since we migrated to a new org, I just want to ensure that the CI/CD pipeline isn't broken first. |
🔧 Implement Pydantic-based Input Validation
Summary
Replaces manual assertion-based validation with robust Pydantic models for the
/authenticateendpoint, providing better type safety, clearer error messages, and improved developer experience.Changes Made
🆕 New Features
ValidateInputModelPydantic class (models/validate_input_model.py)ConfigDict(strict=True)🔄 Updated Components
Route Handler (
app/app.py):API Documentation:
Dependencies (
pyproject.toml):pydantic>=2.6.0to project dependencies🧪 Test Updates
tests/unit/test_validation.py):ValidationErrorinstead ofAssertionError📚 Documentation
README.md):Benefits
Validation Rules
usernamestrpasswordstrprofileboolfieldsOptional[list[str]]Testing