Skip to content
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

Feature/api validation #107

Merged
merged 6 commits into from
Nov 9, 2024

Conversation

anishmu20
Copy link
Contributor

This pull request adds API validation for the Book, Borrowing, and Member modules. I have validated all the API endpoints that accept data related to these modules and have also handled the exceptions associated with these actions. This ensures that the API endpoints return appropriate responses for valid and invalid data, improving the robustness and reliability of the API.
i have tested api using the postmen .

issues #81

validation-1

![Uploading validation-1.png…](
validation-2
exception handle
)
InvalidResponse

@Guhapriya01
Copy link
Collaborator

Guhapriya01 commented Nov 7, 2024

Hi @anishmu20,

Great job on the validations! Could you please add similar validations to UpdatePasswordDto as well?

@anishmu20
Copy link
Contributor Author

hii @Guhapriya01

The changes have been implemented as advised. Validation has been applied only to the newPassword field in the UpdatePasswordDto, ensuring it meets specified security requirements. The currentPassword field remains unvalidated in this DTO, as it is assumed to have already been validated and securely stored in the database.
updatePasswordDTo
)

@Guhapriya01
Copy link
Collaborator

Hi @anishmu20,

I reviewed your work, and thanks for making those changes!

Just make these 2 changes:

  1. Add @NotBlank to the ISBN field in the Book DTO, as it's throwing an error when not passed.
  2. Remove @NotBlank from the role field in the Members DTO, as it's not required.

Once these changes are made, we can proceed with the merge!

Thanks!

 2.Removed @notblank from the role field in the Members DTO
@anishmu20
Copy link
Contributor Author

changes done !!

@Guhapriya01 Guhapriya01 merged commit 70142f9 into ajaynegi45:main Nov 9, 2024
1 of 2 checks passed
@Guhapriya01 Guhapriya01 added enhancement New feature or request hacktoberfest-accepted hacktoberfest gssoc GirlScript Summer Of Code gssoc-ext level3 GirlScript Summer Of Code - 35 points labels Nov 9, 2024
@Guhapriya01
Copy link
Collaborator

Hi @anishmu20,

Thank you for your thorough work on adding validations across all the key DTOs. The comprehensive validation will greatly enhance data integrity across the API.

Level Update: Although initially marked as Level 2, this contribution has been recognized as Level 3 due to the extensive impact and effort involved in implementing validations across multiple DTOs.

Looking forward to more collaborations. Thanks again for your contribution! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gssoc GirlScript Summer Of Code gssoc-ext hacktoberfest hacktoberfest-accepted level3 GirlScript Summer Of Code - 35 points
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants