Comments (9)
Hi @RohanNagar. I would like to take this issue on. You wrote pretty well what you want to be done.
from thunder.
I had a little trouble, but after a while i suceeded with fork and push, thanks
from thunder.
I have an idea of how to do this, so sync with me if you want to take this issue on.
Basically, move the logic to the RequestValidator
class, create overloading methods
validateRequest(User user)
validateRequest(String email, String password)
validateRequest(String email, String password, User user)
These methods do the validation and if something is invalid, throw a ValidationException
. The exception has a method to buildResponse(String requestType)
and it will build the proper response (status code and response body) for the validation issue.
The resource methods can then call validateRequest
and catch the exception, and return the result of buildResponse
.
from thunder.
@alexsuperdev please do! Feel free to let me know if you have any questions!
from thunder.
@RohanNagar can you send me your formatter configuration if you use eclipse? I have already 630 Checkstyle violations founded by maven-checkstyle-plugin :)
from thunder.
@alexsuperdev Haha wow that's a lot! I actually use IntelliJ, not Eclipse. Perhaps you can try to create a formatter configuration from the Checkstyle configuration? See here for a possible answer on how to do it: https://stackoverflow.com/questions/984778/how-to-generate-an-eclipse-formatter-configuration-from-a-checkstyle-configurati
The Checkstyle configuration is the checkstyle.xml
file in the root.
from thunder.
@RohanNagar I have done this issue locally and also corrected Checkstyle violations :) I could push my branch or attach here the classes for review
from thunder.
@alexsuperdev great! You can go ahead and create a pull request with your changes and I can review.
from thunder.
Also let me know if you need help getting that up. You should be able to fork the repo, push to a branch on your fork, and then create the PR in Github (from your fork to this repo).
from thunder.
Related Issues (20)
- Publish to Kafka Stream rather than write to Database
- Thunder Client verify() should return String or User HOT 1
- New Secrets Provider: AWS Secrets Manager
- Create local version of AWS Secrets Manager
- Provide Docker image flavors to reduce size HOT 1
- Improve Database error logging HOT 1
- Use Async Responses in Jersey Resources
- Performance Tuning HOT 1
- Custom Timeout per Request
- Option to set TTL on Users Stored in DB
- Bootstrap CSS Update Action is Broken
- Migrate from artillery to k6 for integration tests
- Allow more specific property validation
- In-Memory Database can throw OutOfMemoryError
- Expose email address validation configuration options HOT 1
- BlackbirdModule: Unable to find Java 9+ MethodHandles.privateLookupIn. Blackbird is not performing optimally! HOT 2
- Run automated load testing
- Default Email to disabled
- Update Swagger Project version using resource filtering
- Feature: Additional DBs to store arbitrary data associated with a user
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from thunder.